SQLTeam.com | Weblogs | Forums

SQL Server Management Studio

sql2012

#1

Hi,

I'm just starting out out with SQL and want to set up SQL Server Management Studio on my Laptop.

I've downloaded it and the AdventureWorks2012 Database, however I need to attach the database and connect to it to begin querying it.

Please, in the most simple terms you can (as elsewhere seem to think I'm already at your Jedi level) explain how I can do the following;
Register a Local Server Group to connect to (or select one)
Connect to the newly registered local server group
Attach the AdventureWorks database and open it to query / manipulate

If you can think of anything else I need to do please tell me.

Thanks in advance of your help.
Kai.


#2

Register a Local Server Group to connect to

  • View - Registered Servers - right click Local Server Group - Add New Server Group (if desired) : Now you have a group
  • Right click your group (or Local Server Groups) - New Server Registration - Fill in the server name and select an authorization : Now you have a server in your group
    Connect to the newly registered local server group
  • Option 1:Via the group - Right click the server in your group - Select Object Explorer
  • Option 2: Via Object Explorer - Click Connect in the upper left hand side - Click Database Engine... - Fill in the server name and select an authorization
  • One way or another, now you have the server available for exploring in Object Explorer
    Attach the AdventureWorks database and open it to query / manipulate
  • Does the database already exist on the server? If no, right click Databases under the Server you want to attach to - Fill in the details. Now you have a database attached.
  • Click New Query in the Toolbar. Now you have a window to write code in.
  • Select the database from the drop-down list in the toolbar
  • Write and execute your code.