20.07.2013 Views

Beginning SQL

Beginning SQL

Beginning SQL

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Although it’s not strictly essential, you may want to restart your PC after installation. Now that you’ve<br />

installed <strong>SQL</strong> Server, you can learn how to use some of the tools included with it.<br />

Using <strong>SQL</strong> Server Tools<br />

Setting Up and Using the Five Database Systems<br />

The two main tools for administering the database system and running <strong>SQL</strong> queries are Enterprise<br />

Manager and Query Analyzer. You can access both by clicking Start ➪ Programs ➪ Microsoft <strong>SQL</strong><br />

Server. Enterprise Manager provides an easy-to-use user interface for managing the database system.<br />

In order to run <strong>SQL</strong> queries, you need to use Query Analyzer, which is the tool you need to use for this<br />

book, so a brief discussion of how it works follows.<br />

Load Query Analyzer by clicking Start ➪ Programs ➪ Microsoft <strong>SQL</strong> Server, and you’re presented<br />

with the database system login screen, shown in Figure B-71:<br />

Figure B-71<br />

Select the Windows Authentication option. You need to log in to the PC as the same user as you entered<br />

when installing the database system and it asked for a Domain User name and password. If you log in<br />

with a different username, you receive a login error. Alternatively, you can select the <strong>SQL</strong> Server<br />

Authentication option and enter sa for the username and whatever password you set for the username;<br />

if you installed Service Pack 3, you probably already set a password for the sa user. If you’ve never set a<br />

password for the sa user, just leave it blank — no spaces, just blank. Having a blank password for the sa<br />

user is not considered particularly secure, but it’s not so important if your PC is only a development<br />

machine. New users can be added and changes to existing users of the database system can be made<br />

using Enterprise Manager, which is a topic beyond the scope of this book.<br />

Having successfully logged in, the screen shown in Figure B-72 appears:<br />

435

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

Saved successfully!

Ooh no, something went wrong!