17.06.2013 Views

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Creating a Database Using the Management Studio<br />

If you run the <strong>SQL</strong> <strong>Server</strong> Management Studio and expand the Databases node, you should see something<br />

like Figure 5-1.<br />

Figure 5-1<br />

Chapter 5: Creating and Altering Tables<br />

If you look closely at this screenshot, you’ll see that my Accounting database is still showing even though<br />

we just dropped it in the previous example. You may or may not wind up seeing this, depending on<br />

whether you already had the Management Studio open when you dropped the database or you opened it<br />

after you dropped the database in the Query window.<br />

Why the difference? Well, in earlier versions of <strong>SQL</strong> <strong>Server</strong>, the tools that are now the Management<br />

Studio refreshed information such as the available databases regularly. Now it updates only when it<br />

knows it has a reason to (for example, you deleted something by using the Management Studio Object<br />

Explorer instead of a Query window, or perhaps you explicitly chose to refresh). The reason for the<br />

change was performance. The old 6.5 Enterprise Manager used to be a slug performance-wise because it<br />

was constantly making round trips to “poll” the server. The newer approach performs much better, but<br />

doesn’t necessarily have the most up-to-date information.<br />

The bottom line on this is that, if you see something in the Management Studio that you don’t expect to,<br />

try pressing F5 (refresh), and it should update things for you.<br />

Now try right-clicking on the Databases node, and choose the New Database option.<br />

This will pull up the Database Properties dialog box, and allow you to fill in the information on how you<br />

want your database created. We’ll use the same choices that we did when we created the Accounting<br />

database at the beginning of the chapter. First comes the basic name and size info, as shown in Figure 5-2.<br />

First, the name — this is pretty basic. We called it Accounting before, and, because we deleted the first<br />

one we created, there’s no reason not to call it that again.<br />

145

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!