-
When does grant statement take into effect
-
Total row counts of all tables in a Sql Server database
Sometimes you may want to know the total row counts of all tables in a database. The script below will give you a rough idea. However, it is not guaranteed to be accurate, though. It works in both Sql Server 2000 and Sql Server 2005. select sum(rowcnt) from sysindexes inner join sysobjects on sysindexes.id=sysobjects.id where…
-
Executing sql scripts using command line tools
SQL Server 2005 has a command line tool named sqlcmd. MySQL has a command line tool named mysql. Oracle has a command line tool called sqlplus. They can all be used for interactive query processing and batch scripts processing. They do similar things, albeit in different ways. They are functionally equivalent. For SQL Server 2005,…
-
desc is sp_columns in Sql Server
-
Troubleshoot Sql Server cluster and ClusterRecovery
With some San disk configuration and drive letter changes, a two-node 64-bit Sql Server 2005 cluster on Windows 2003 boxes would not start, as evidenced in Cluster Administrator. Here are some errors in Event Viewer: Sql Server application error in Event Viewer [sqsrvres] OnlineThread: Error 435 bringing resource online. Sql Server Agent [sqagtres] CheckServiceAlive: QueryServiceStatus…