Learning About Servers

SQL Server provides several stored procedures for learning about a database server. The following sections describe stored procedures that provide this kind of information.

sp_server_info

The SQL Server sp_server_info stored procedure lists information about a server. After connecting to a database server, the program simply executes the SQL statement:

sp_server_info 

The stored procedure returns a series of records with three fields: attribute_id, attribute_name, and attribute_value. The following text shows this procedure’s output on the server used to test this book’s example programs. Some of the simpler lines give the name of the DBMS (Database Management System) and the DBMS version:

 1 DBMS_NAME Microsoft SQL ...

Get Visual Basic® .NET Database Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.