Sunday, February 14, 2010

CSS Properties

http://www.w3schools.com/css/css_reference.asp

http://www.devguru.com/Technologies/css/quickref/css_index.html


Thursday, February 11, 2010

ESX Architecture


  1. Service Console (COS -Console Operating System)
- Red Hat Enterprise Linux 3 (Update 6) based Linux distribution that is heavily modified and stripped down to provide a lightweight management interface of the VMkernel to the end user.
- primary function of the Service Console is to bootstrap and turn over full control of all hardware resources to the VMkernel.
- assigned a default value of 272 MB of physical host memory to execute processes and manage the small amount of physical hardware that the VMkernel doesn’t manage.
- runs as a privileged virtual machine inside the VMkernel and is subject to resource allocation
and scheduling alongside other virtual machines running on the ESX host.
- responsible for user interaction with ESX (SSH, web, Virtual Client,Direct console access)

VMware VMotion

  • shared storage
  • same virtual switches
Process:
  1. memory state transferred from source to dest
  2. vm configuration settings sent from source to dest
  3. final memory state transferred from source to dest
  4. control of the vm taken by the destination host (includes transferring the SCSI reservation for the VMDKs and sending an arp request from the VM NICs to dictate the MAC address has switched network ports)
When you will need this?
- Maintenance
- Patching
- Resource utilization load balance (automated with DRS)

Wednesday, February 10, 2010

mySQL commands - User Account Management

A MySQL account is defined in terms of a user name and the client host or hosts from which the user can connect to the server.
MySQL user names can be up to 16 characters long.

shell>mysql --u monty --pguess db_name
shell>mysql --user=monty --password=guess dbname

Create a db and user, assign privilges to the user for db access
mysql>create database wordpress;

mysql>create user 'wpuser'@'localhost' IDENTIFIED BY 'P@$$w0rd';

mysql>grant usage on *.* to wpuser@localhost;
(allow user wpuser to connect to the server from localhost using the password P@$$w0rd)

mysql>grant all privileges on wordpress.* to wpuser@localhost;
(grant all privileges on the wordpress database to user wpuser)

mySQL commands with database and tables

Keywords may be entered in any lettercase.

mysql> quit
mysql> select version(), current_date;
mysql> select now();
mysql> select user();

mysql>select
->user()
->\c
mysql>
\c use to cancel a command

mysql>show databases;
mysql>create database test;
mysql>use test
Database changed
mysql>create table pet (name VARCHAR(20), owner VARCHAR(20),
->species VARCHAR(20), sex CHAR(1), birth DATE, death DATE);
mysql>show tables;
mysql>describe pet;

Insert data into table
mysql>load data local infile '/path/pet.txt' into table pet;
mysql>insert into pet values ('puffball','diane','hamster','f','1999-03-30',NULL);

SELECT statement is used to pull information
mysql>SELECT what to select FROM which table WHERE conditions_to_satisfy;
mysql>SELECT * FROM pet;
mysql>SELECT * FROM pet WHERE name = 'Bowser';
mysql>SELECT * FROM pet WHERE species = 'dog' AND sex = 'f';
mysql>SELECT * FROM pet WHERE species = 'snake' OR species = 'bird';
mysql>SELECT * FROM pet WHERE (species = 'cat' AND sex = 'm')
->OR (species = 'dog' AND sex = 'f'');
mysql>SELECT name,birth FROM pet;
mysql>SELECT DISTINCT owner FROM pet; (minimize output,retrieve each unique output record just once by adding keyword DISTINCT)
mysql>SELECT name,birth FROM pet ORDER BY birth;
mysql>SELECT name,birth FROM pet ORDER BY birth DESC; (DESC keyword to sort in reverse order)

UPDATE changes only the record in question and does not require you to reload the table
mysql>UPDATE pet SET birth = '1989-08-31' WHERE name = 'Bowser';

DATE CALCULATION
mysql>SELECT name,birth, CURDATE(),
->(YEAR(CURDATE()) - YEAR(birth))
-> - (RIGHT(CURDATE(),5)AS age
->FROM pet ORDER BY age;

mysql>SELECT name,birth, CURDATE(),
->(YEAR(CURDATE()) - YEAR(birth))
-> - (RIGHT(CURDATE(),5)AS age
->FROM pet WHERE death IS NOT NULL ORDER BY age;






















Missing Microsoft SQL Management Studio after installation

If after you spend few hours install Microsoft SQL 2005 and found that Management Studio missing.

Don't panic, here's the solution!

1. Look for SqlRun_Tools.msi under your Setup folder CD2.

2. Select install "Client Components".


You're done.



However, you may received the following error message during the process.

"a component that you have specified in the ADD_LOCAL property is already installed. To upgrade the existing component, refer to the template.ini and set the UPGRADE property to the name of the component"

Then you need to do few more steps:

3. Go to Add/Remove Programs, select Microsoft SQL Server 2005 and Remove.

4. Check "Workstation Components" to remove and proceed.
P/S: Uncheck any other components!

5. After removal of "Workstation components", repeat Step 1 and 2 again to install Management Studio.

Tuesday, February 9, 2010

Planning - Upgrading VMware VirtualCenter

Expected downtime
  1. Virtual center server
- In-place upgrade: about 10 minutes, no reboot
- Migration upgrade: no downtime

2. VMware license server: no downtime

3. ESX host: no downtime

4. Virtual machines: no downtime

Prerequisites
  • installation media
  • license key for all purchase functionality
  • login credentials (db name, db server name. The database server name is typically the ODBC Systemdata store name (DSN) connection name for the VirtualCenter database.)

VMware - Stages of Upgrading

You can take any amount of time to complete each of the upgrade stages. However:
  • You must complete one stage before you move to the next stage.
  • After you start an upgrade stage, you cannot revert to the previous stage. Each of these stages is an irreversible process.
  • Some major stages have minor steps within them. Follow the directions within each stage regarding the required sequence of minor steps.
Stage 1–Upgrading VMware VirtualCenter
- backup SQL db
Stage 2–Upgrading Your ESX Server Hosts and Datastores
Stage 2A–Upgrading a VMware ESX Server Host
Stage 2B–Upgrading a Datastore from VMFS2 to VMFS3
Stage 3–Upgrading Your Virtual Machines
Stage 4–Upgrading VMware Tools Within the Guest Operating System

Backup SQL db
Open the management studio in SQL 2005 and connect to the SQL server engine that manage the virtual center and update manager DB. right click and select stop the database engine. Follow by that, open you my computer and browse to the folder which contain the DB and DB log for your databse.

The path of the DB folder could look similiar as D:\SQL2005\MSSQL.2\MSSQL\Data which end with .mdf and .ldf.