Showing posts with label SQL Server. Show all posts
Showing posts with label SQL Server. Show all posts

Wednesday, February 4, 2009

Shrink Database & Transaction Log

Here you can find more about shrinking of database & log file.
http://support.microsoft.com/kb/q256650/

total records in a database....tablewise record count

Sometime we need to count the total numbers of reord count in a database or in a table... given below is the query.


use windmail
go

SELECT tblname.name AS "Table Name", recordcount.rowcnt AS "Row Count"
FROM sysobjects tblname, sysindexes recordcount
WHERE recordcount.id = tblname.id
AND indid IN(0,1)
AND xtype = 'u'
AND tblname.name <> 'sysdiagrams'
ORDER BY recordcount.rowcnt DESC

COMPUTE SUM(recordcount.rowcnt);
GO

Friday, January 30, 2009

error: 26 - Error Locating Server/Instance Specified

If u are not sure why this error occurs..

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

spend 5 min in reading this simple article in the blog...

http://blogs.msdn.com/sql_protocols/archive/2007/05/13/sql-network-interfaces-error-26-error-locating-server-instance-specified.aspx