Creating a New SQL Server Database

Data connections are physical connections to a database. In Server Explorer, the Data Connections node has a list of every established database connection. To start the database creation process, right-click the Data Connections node and select the Create New SQL Server Database option. In the resulting dialog box (see Figure 13.2), you need to provide a server name, login credentials, and a name for the new database.

Image

FIGURE 13.2 Creating a new SQL Server database.

This immediately creates the indicated database and adds a connection to the new database under the Data Connections node. Figure 13.3 shows the newly created Contoso database added to the list of connections.

Image

FIGURE 13.3 The new database added to the data connections.

Connecting to an Existing Database

You can also establish a connection to an existing database. Again, you right-click the Data Connections node; this time, though, you select the Add Connection option. The Add Connection dialog box (see Figure 13.4) is similar to the New Database dialog box. You specify a data source, server name, login credentials, and database name/database filename to connect to the database.

Image

FIGURE 13.4 Connecting to an existing database.

Under each connection are folders for the following classes of database objects:

Image Database diagrams (not available with SQL Server 2012)

Image Tables

Image Views

Image Stored procedures

Image Functions

Image Synonyms

Image Types

Image Assemblies

These folders are the launching point for creating corresponding objects within the database.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset