Category: SQL Server

Display size of tables in SQL Server

A very simple query but yet so useful in getting the information of tables size in your database: USE [yourdbname] EXEC sp_MSforeachtable @command1=”EXEC sp_spaceused ‘?’”

Check how many users are logged into SQL Server 2005

Have you ever wondered how to check how many users are logged in to the SQL Server? You must have right’ so here is the solution to find it out. Execute any one of the below query in your SQL Server. select * from sys.sysprocesses or EXEC sp_who or EXEC sp_who2 To know more about [...]

Seaching for a matching Text in Stored Procedure SQL Server

I had a rough time, open each stored procedure in my MS SQL Server 2005 and then looking for the text that i needed to change. Then i finally came to a very short query but yet so helpful: SELECT object_name(id) FROM syscomments WHERE text LIKE ‘%Text%’

SQL Server Insert Data From One Table to another Table

There are times when you need to copy all the content of one table to another for certain reason like backup or so. Doing manual method would take you longer time, hence to ease such task use the sql query to simplify your job: INSERT INTO new_table (field name1,field name2) SELECT field name1,field name2 FROM [...]

SQL Server Maintenance Plan

After changing your sa password, your maintenance plan might stop working and you might face a problem where you cannot delete the maintenance plan or edit. If you are facing such problem with your MS SQL server Maintenance Plan when you change your sa account password. Follow the following steps: 1. Select msdb database 2. [...]

Install IIS7 to work with MS SQL Server 2005 on Vista/Win7

You need to enable the following features to make your MS SQL Server 2005 work with Vista/Windows 7 before installing MS SQl Server 2005. Here is the list of IIS 7 role services that need to be installed: Start 1. Control Panel 2. Programs and Features 3. Turn Windows features on or off 4. Enable [...]

Page 2 of 212

Follow Me

Weather

Thimphu: 6° C

Condition: Mostly Cloudy

Sunrise: 7:12 am

Sunset: 8:46 pm

Time: 11:24:03 am

Archives

Users: 4 Guests, 1 Bot