Insert Record in a Table with primary key value

I came across a problem where i deleted on record accidentally and that record id was in use. So I had to Enter that ID in Identity Column and rest of the data in respective fields of that record line. I could add values in other fields but could not enter in Identity Column. So [...]

Get Database Size

Database size keeps on growing daily, and I wanted to know the size of my database. Finally i got a query that fulfills my requirement: SELECT sysDa.Name,sysDa.create_date,sysDa.recovery_model_desc, temp.DBSize8KBPage FROM ( SELECT sysMas.database_ID, sysMas.size, SUM(size) as DBSize8KBPage FROM sys.master_Files sysMas GROUP BY sysMas.DataBase_ID, sysMas.size ) temp INNER JOIN Sys.Databases sysDa on temp.Database_ID = sysDa.DataBase_ID

Execute Stored Procedure when SQL Server starts

For a Stored Procedure to be eligible to be executed when SQL Server starts, the stored procedure must be in the “master” database and cannot contain INPUT or OUTPUT parameters. The sp_procoption system stored procedure is useful in setting the Stored Procedure for autoexecution – i.e it runs every time SQL Server service is started. [...]

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 [...]

Internet Explorer issue in Compatibility Mode

Web Sites/Web Page should be rendered in Standard Mode or in Compatibility Mode. For few web page developed in .NET Platform, we face problem in rendering the Pages. In such case we need to enable Compatibility mode in Internet Explorer. However the following meta tag produces some good result in such problem. The following meta [...]

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%’

Windows 7 God Mode

Although you might have heard of God Mode in games, but in Windows 7 there is also such mode which contains hundreds of settings that the operating system contain, places all in just one place. To enable such feature in your windows 7, follow the below steps: 1. Create a New Folder Any where you [...]

SQL Server 2005 Remote Connectivity

In some cases, I have seen people trying to create a database server using an ordinary desktop computer. Doing so people have come across problem where application was unable to connect to the desktop where database is hosted. Now the simple solution to such problem is: 1. All Programs > Microsoft SQL Server 2005 > [...]

MMS Configuration In Corby Pro

Finally i was able to make my samsung corby pro use the MMS feature of BMobile. The day BMobile launched its free MMS, i registered myself for the service. Having waited for its setting to receive, i tried googling and finally came to ThimphuTech website, where there was a issue on MMS. In one of [...]

Page 5 of 7« First...34567

Follow Me

Weather

Thimphu: -9° C

Condition: Clear

Sunrise: 8:34 am

Sunset: 7:59 pm

Time: 08:06:38 am

Archives

Users: 4 Guests