O'Reilly logo

Visual Basic® .NET Database Programming by Rod Stephens

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Learning About Databases

In SQL Server, a single server can contain many databases. The following sections explain SQL Server stored procedures that return information about those databases.

sp_databases

The sp_databases stored procedure lists the databases available on a server. After connecting to the server, the program executes this SQL statement:

sp_databases 

The following text shows the results of this statement on the book’s test server. The database named master contains information about the server, such as server user login information. Most of the other databases shown here are used by the examples in this book:

 DATABASE_NAME DATABASE_SIZE REMARKS =============== ============= ======= Contacts 3072 NULL Customers 3072 NULL master ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required