My second (or more) stupid question(s)

  • Hello, all...

    I am having trouble connecting to my PROJ001.MDF database.

    I can connect from within MS-WebDeveloper, but NOT with SQL-Server-Management-Studio. This is very puzzling to me. It appears the SQL-Server-Mgt-Studio is requiring that the database appear in a single folder named C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data.

    My first question is... do all Sql-Srvr/Express MDF files have to reside in the same folder -- namely C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data??

    My local server-name is PC2007JOHN\SQLEXPRESS.

    My second question is...do I configure a local-server like this with NAMED-PIPES or TCP/IP or shared-memory?

    More information about my folders....

    My PROJ001.MDF is located in a folder consistent with web-developer source folders (unless I have that wrong, too, but it is working OK from the WebDeveloper source-code).

    I am running ASP.net and SQLExpress on my single computer. I have the MS-WebDeveloper installed that allows me to create web-pages with ASP and VB-code. Under that environment, the 'source-code' resides in the c:\...MyDocs...\HTML\Proj001 folder. With the ASP-convention, the DATABASE resides under Proj001 folder in the

    Proj001\App_Data folder -- thus I put a PROJ001.MDF file in this folder.

    Not only does SQL-Server-Mgt-Studio have trouble connecting, MS-ACCESS upsizing wizard can't seem to export to an existing MDF.

    I have an existing MS-ACCESS mdb that I keep trying to upsize to the PROJ001.MDF, but although it appears to succeed, the exported table(s) do not appear in the PROJ001.MDF.

    My final question...what is the releationship with CONNECTIONS, INSTANCES and MDF-files???

    Thanks, in advance...John

  • Hi,

    1. No, databases do not have to reside in this folder

    2. There is a Surface Area Configuration tool where you can set the connectivity and protocols.

    3.MDF file is just a file. It becomes a database when it is attached to SQL Server service. You can attach database permanently (using sp_attach_db system proc or Attach function in Management Studio) or you can attach database using syntax of connection string. The connection string describes parameters of connection. You can look at different connection strings for SQL Server 2005 here. Look for "attach" word there. In general, it is better to have database attached permanently.

    Instance is just a "name" of database service you are using. Typically, you have one instance with default name which happens to be your computer name although it may be that SQL Express adds SQLEXPRESS to it - then it's computername\sqlexpress.

    You can attach plenty of databases to one instance, so don't install new instances for each project you develop.

    I can't help you with MS Access.

    Regards

    Piotr

    ...and your only reply is slàinte mhath

  • Hi John

    This is a tricky one...

    You have a SQL Server called PC2007JOHN\SQLEXPRESS

    This means that in SQL Server Management Studio Express you need to either see the following:

    a server called (local) or your servername PC2007JOHN\SQLEXPRESS

    (If you are not working on this PC then ensure that you have enabled remote connections)

    If you can connect to either of the above 2 names - and you should be able to see a green arrow showing that the SQL Server is runing (if not then correct this first)

    Expand the server - you should then see Database etc... below that.

    Expand Databases - do you have any databases listed?

    Do you have any tabels listed?

    If you need to import data in - you could try the following - it works in versions above Express - but you may be lucky:

    Open the Access Database - list the contents of the table - then inside SQL - inside your database - if there is no database create on.

    Then create the table the same as it is in Access - then open the table from within SSMSE and paste the data from Access into the equivelant SQL table (ensure identical structure)

    This should allow you to "import" data into SQL

    Thanks

    Kevin

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply