Undocumented SQL Server 2017 distributed queries stored procedures SQL Server 2017 supports the following useful undocumented distributed queries stored procedures: sp_catalogs_rowset sp_catalogs_rowset2 sp_catalogs_rowset_rmt sp_linkedservers_rowset sp_linkedservers_rowset2 sp_catalogs_rowset The sp_catalogs_rowset stored procedure returns the database name for the specified database if the current user has access for this database. Syntax sp_catalogs_rowset [ @catalog_name = ] ‘catalog_name’ Arguments [ @catalog_name = ] ‘catalog_name’...
Author: Alexander Chigrik
Undocumented SQL Server 2017 Database Engine Stored Procedures
Undocumented SQL Server 2017 Database Engine Stored Procedures SQL Server 2017 supports the following useful undocumented database engine stored procedures: sp_bcp_dbcmptlevel sp_objectfilegroup sp_MSforeachdb sp_MSforeachtable sp_MSindexspace sp_MStablespace sp_bcp_dbcmptlevel The sp_bcp_dbcmptlevel stored procedure is used to get the database compatibility level for the specified database. Syntax sp_bcp_dbcmptlevel [ @dbname = ] ‘dbname’ Arguments [ @dbname = ] ‘dbname’ The database name to...
Some tips to use System Monitor with SQL Server 2017
Some tips to use System Monitor with SQL Server 2017 System Monitor works on Windows operating systems and can be used to monitor an instance of SQL Server 2017. The difference between SQL Server Profiler and System Monitor is that SQL Server Profiler monitors Database Engine events, whereas System Monitor monitors resource usage associated with server processes. To start System...
SQL Server 2017 Profiler Optimization Tips
SQL Server 2017 Profiler Optimization Tips SQL Server 2017 Profiler is a graphical user interface for monitoring an instance of the Database Engine or Analysis Services. SQL Server Profiler allows to capture and save data about each event to a file or table to analyze later. In this article, you can find some helpful tips to performance tune and optimize...
Useful undocumented SQL Server 2017 extended stored procedures
Useful undocumented SQL Server 2017 extended stored procedures In this article, you can find the description of some useful undocumented SQL Server 2017 extended stored procedures. xp_availablemedia This extended stored procedure returns available drives and free space in bytes on these drives. In comparison with xp_fixeddrives, the xp_availablemedia extended stored procedure returns not only the hard drives, but all available...
Useful Undocumented SQL Server 2017 DBCC Commands (Part 2)
Useful Undocumented SQL Server 2017 DBCC Commands (Part 2) In this article, you can find the description of some useful undocumented DBCC commands, and find out how you can use these commands in SQL Server 2017. 1. DBCC addinstance This DBCC command can be used to add an object instance to track in Performance Monitor. Syntax: DBCC addinstance (objectname, instancename)...
Useful Undocumented SQL Server 2017 DBCC Commands (Part 1)
Useful Undocumented SQL Server 2017 DBCC Commands (Part 1) In this article, you can find the description of some useful undocumented DBCC commands, and find out how you can use these commands in SQL Server 2017. 1. DBCC CONFIG This command shows the server’s level DS_CONFIG information. The DBCC CONFIG returns the same DS_CONFIG information as the DBCC RESOURCE returns,...
Useful SQL Server 2017 trace flags
Useful SQL Server 2017 trace flags There are 3 types of trace flags in SQL Server 2017: query trace flags global trace flags session trace flags Query trace flags are active for the context of a specific query. A global trace flag is enabled for the entire time SQL Server 2017 service is running and is applied to each of...
Tips to work with SQL Server 2017 alerts
Tips to work with SQL Server 2017 alerts SQL Server 2017 writes the events into the Windows Application log. SQL Server Agent checks the Windows application log for SQL Server events. When an event occurs, the SQL Server Agent checks if the appropriate alert exists and if so perform the defined response. Alerts can be used to execute a SQL...
Tips for using SQL Server 2017 distributed queries
Tips for using SQL Server 2017 distributed queries Try to avoid using the TOP clause in the distributed queries. Because distributed queries that involve the TOP clause are never delegated to an OLE DB provider and are always evaluated locally, you should avoid using the TOP clause in the distributed queries to increase the local SQL Server performance. The first...