Wednesday, May 2, 2012

Drink Plenty Of Water


Drink Plenty Of Water :

Usage of drinking water:

  • Composes 75% of your brain.
  • Regulates your body temperature.
  • Makes up 83% of your blood.
  • Removes Waste.
  • Composes 22% of your bones.
  • Cushions your joints.
 
  • Helps carry nutrients and oxygen to your cells.
  • Moistens oxygen for breathing.
  • Helps convert food to energy.
  • Protects and cushions your vital organs.
  • Helps your body absorb nutrients.
  • Makes up 75% of your muscles.
  • etc.,
So drink plenty of water to cool your body in this summer.

Tuesday, May 1, 2012

Move the mouse cursor using the keyboard in windows


Move the mouse cursor using the keyboard in windows:

There is an alternative way to the mouse using the arrow keys on the numeric keypad when you find it difficult to move the mouse.
follow the below steps.
Microsoft Windows users can enable the accessibility feature to move the mouse using their arrow keys by following the below steps.
1.     Click Start --> Settings--> Control Panel.
2.     In Control Panel open Accessibility Options or Ease of Access
3.     Click the Mouse tab and Check the "Use Mouse Keys" check box.


4.     If you wish to increase the speed or change any other settings, click on the Settings button.

5.     Click Apply and then close out of the box.

After performing the above steps you will be able to used the numeric keypad as a mouse moving up, down, left, right, and all the diagonals. In addition, you may also use the center "5" key as a left click.
Note: You must have the Number lock on for this feature to work by default. This can be changed through the settings.

Sunday, January 22, 2012

How to obtain size of all tables in SQL server??


There is a stored procedure to retrieve the information on the creation and modification dates and on the size usage of the every table of a database. This takes the input as the table name.

The syntax for this as below,

EXEC sp_spaceused “db_table_name”

But to revieve the meta data information of every table of a single database we can make use of the iteration procedure ‘sp_msForEachTable’.

And so we can give the query as below which gives the metadata for every table of the selected database but as multiple table results and not as a single view.

EXEC sp_msForEachTable ‘EXEC sp_spaceused ”?””
To achieve the result as a single view we can follow the following steps.

First create a temporary table,

CREATE TABLE temp_table
(
[name] NVARCHAR(128),
[rows] CHAR(11),
reserved VARCHAR(18),
data VARCHAR(18),
index_size VARCHAR(18),
unused VARCHAR(18)
)

Then insert the result of the above defined procedures,

INSERT #t EXEC sp_msForEachTable ‘EXEC sp_spaceused ”?””

Now we can view the result of all the tables in a single view as and can drop the table after use to avoid use of disk space,

Select * from temp_table
DROP TABLE temp_table

So we can have the required result of all the meta details of the single database as a single shot view. Thanks for reading this post. Feel free to share your views and comments.