Feeds:
Posts
Comments

Posts Tagged ‘undocumented SQL’

When I am not blogging, I am typically working on SQL Server Optimization projects. Time and again, I only have access to SQL Server Management Studio that I can remotely connect to server but do not have access to Operating System, and it works just fine. At one point in optimization project, I have to [...]

Read Full Post »

Today we will go over very simple script which will list all the tables for all the database. sp_msforeachdb ‘select ”?” AS db, * from [?].sys.tables’ Update: Based on comments received below I have updated this article. Thank you to all the readers. This is good example where something small like this have good participation from readers. Reference : Pinal Dave [...]

Read Full Post »

Long time blog reader and SQL Server Expert Simon Worth has suggested two additional method to achieve same results as described in article SQL SERVER – Find Table in Every Database of SQL Server. Method 1 sp_msforeachdb “SELECT ‘?’ DatabaseName, Name FROM ?.sys.Tables WHERE Name LIKE ‘%address%’” Method 2 CREATE TABLE #TableNameResults (DatabaseName VARCHAR(100) NOT [...]

Read Full Post »

Jr. DBA in my company only have access to the database which they need to use. Often they try to access database and if they do not have permission they face error. Jr. DBAs always check which database they have access using following system stored procedure. It is very reliable and provides accurate information. Sytanx: [...]

Read Full Post »

Database Consistency Checker (DBCC) commands can gives valuable insight into what’s going on inside SQL Server system. DBCC commands have powerful documented functions and many undocumented capabilities. Current DBCC commands are most useful for performance and troubleshooting exercises. To learn about all the DBCC commands run following script in query analyzer. DBCC TRACEON(2520) DBCC HELP [...]

Read Full Post »

Older Posts »

Follow

Get every new post delivered to your Inbox.

Join 15,916 other followers