none
Trouble with 70-433 training kit/attaching databases RRS feed

  • Question

  • I have the training kit for 70-433 and am on page xx and am having trouble when I get to step 7. I have all the software installed and FILESTREAM enabled but am not sure how to connect to my SQL server instance. I am running this on my desktop at home. I can get to the new query window (though I'm not sure how I'm doing that) but the Databases node is not there so I have nothing to attach to. Thank you.
    Sunday, August 21, 2011 3:23 PM

Answers

  • From my experience, you should always connect to the database engine. The Compact one is not required (at least if I remember my learning / exam correctly).

    If you installed SQL Server localy including the Tools, then you can just start SSMS and the connect box is filled correctly. Just see my other reply to jdmerkel above for more details about the content of the connect box.

    The object browser should be visible, too (you can always open it with F8 or just go to the View menu and choose Object Explorer). But if the database is missing, then you have to get that first!

    With kind regards,

    Konrad

    • Marked as answer by jdmerkel Monday, August 22, 2011 12:05 PM
    Monday, August 22, 2011 4:18 AM
    Answerer

All replies

  • If you are not seeing the databases node, this means that you have Object Explorer hidden in SQL Server Management Studio. You can make it visible from the View menu (View->Object Explorer(F8)). Normally, it is visible by default if you login to the SQL Server, but if you press Cancel in the login form, the Object Explorer is hidden. Onde you make it visible, right-click on Databases and select "Attach...".

     

    Sunday, August 21, 2011 6:19 PM
  • I can see the Object Explorer so I guess what I am asking is what to choose at the login. If I login as SQL compact then I see object explorer but not the database node. Thanks for your help. 

     

    Do I need to get a website to act as my SQL server? I am trying to do this all of my home machine.

    Sunday, August 21, 2011 7:53 PM
  • Hi,

    did you install the sample databases? There is a Databases folder on the cd and the html file in there says:

     To install the samples and sample databases from the SQL Server Setup, you need to click the Advanced button on the Components to Install page, then expand Books Online and Samples and select Samples. This only installs the Samples MSI on your machine. To complete the installation, you need to run the Samples MSI. You can do this from the Start menu: click All Programs, click Microsoft SQL Server, click Documentation and Tutorials, click Samples, and then click Microsoft SQL Server Samples.

    Also possible is to copy the mdf/sdf files and then attach the database using the SSMS. But I didn't try that.

    With kind regards,

    Konrad

    Sunday, August 21, 2011 8:14 PM
    Answerer
  • Thanks running installer now. Question: When I start the SSMS  what do I choose from the top dropdown list?

    It says connect to your SQL server instance but I'm not certain what that means (database, compact etc ?)

    Sunday, August 21, 2011 8:33 PM
  • I try to follow lesson on querying on pg 10 and get 

     

    Major Error 0x80040E14, Minor Error 25501

    > USE AdventureWorks2008

    There was an error parsing the query. [ Token line number = 1,Token line offset = 1,Token in error = USE ]

    Sunday, August 21, 2011 9:17 PM
  • I can see the Object Explorer so I guess what I am asking is what to choose at the login. If I login as SQL compact then I see object explorer but not the database node. Thanks for your help.

    ----------------------------------------------

    article présenter

    Monday, August 22, 2011 3:14 AM
  • Hi,

    that simply means, that you do not have the AdventureWorks2008 database on your system.

    I do not own the CD (I read the book online with a books24x7 subscription), I only had the download offered by oreilly.com. In that ZIP file is a folder called databases and in there you find the databases required.

    To use these databases, you have to copy them to a path where the SQL Server is able to access them and then you can attach them. That way you get the database up and running on your server.

    Regarding the start of SSMS: SQL Server is using a client/serer concept. So you can start the SSMS (client) anywhere and then connect to the Server. But when you installed everything on your own system, then at startup, the connect-Dialog should be filled correctly already. (It is very hard to tell you, what is required in there. It all depends on how you installed the system! Normaly you use:

    - Database Engine
    - Server name is the name of your system (you could also type there (local) )  which can be followed by an Instance Name (divided by a backslash). When you installed the SQL Server, you had to choose the instance name. (If you installed the express edition, the default instance name is not the "default instance".)
    - Windows Authentication

    If you never fooled around there, then SSMS should start up with the correct settings already.

    Once you connected to you database engine, you should see a node with the name of your computer inside the object explorer.

    Open it, open Databases and check if there are any databases. (I think you have none so far)

    Copy the folder Databases\AdventureWorks2008 from CD to your system and make sure, that also the used user of the SQL Server Engine Service (The system user is the default on express edition if I remember correctly) have access to it. Also make sure, that the files are not marked as read only (which can happen if you copy files from a CD).

    Then you can right click the Database folder in Object Explorer and Choose "Attach...". here you cna choose the mdf file and ater successfully attaching you should be able to work with the database.

    (The database might also be avvailable trough the SQL Server Setup. Then you have much less work.)

    I didn't try it, but maybe you can get the database from http://msftdbprodsamples.codeplex.com/, too. But I am not sure, that you get exactly the version that is required for the book. But there you would get an easy to use installer if I am correct.

    In general I would suggest to read a lot about database administration, too. I think that you cannot be a database developer if you have no clue about database administration.

    With kind regards,

    Konrad

    Monday, August 22, 2011 4:14 AM
    Answerer
  • From my experience, you should always connect to the database engine. The Compact one is not required (at least if I remember my learning / exam correctly).

    If you installed SQL Server localy including the Tools, then you can just start SSMS and the connect box is filled correctly. Just see my other reply to jdmerkel above for more details about the content of the connect box.

    The object browser should be visible, too (you can always open it with F8 or just go to the View menu and choose Object Explorer). But if the database is missing, then you have to get that first!

    With kind regards,

    Konrad

    • Marked as answer by jdmerkel Monday, August 22, 2011 12:05 PM
    Monday, August 22, 2011 4:18 AM
    Answerer