Server Name?

I have a dialog box that is requesting the server name when I'm trying to create a new SQL Server 2005 database What is that and how do I find it

Thanks.



Answer this question

Server Name?

  • aajrb

    Yep Jens, you are correct, I've been using SQL Express so much that I have become used to ALWAYS specifying the instance name (SQLExpress) which is part of the service name.

    Sorry about that.



  • Bose39814

    Having the database mdf file as part of the solution is facilitated by The "User Instance" feature of SQL Express. This allows you to treat the primary datafile (.mdf) and corresponging log file (.ldf) as though they were just files that you can use any file server operations on.

    When you're dealing with SQL Server under normal database server conditions, you cannot treat these files with the same contempt, in fact you should not necessarily need to know what constitutes the database. All you are interested in is that you are connecting to a database server with a particular connection string. This string may need to change when you go into production to connect to a database that a DBA has set up for you on the production server.

    If you can create a dataset against the database, and all the data comes through as expected, then you are well on the way to developing your database application.



  • MS Ellen

    If you have a default instacne you can use just the servername to connect to the server, If you use a named instance the server (instance) can be reached via Servername\InstanceName.

    HTH, Jens Suessmeyer.


  • Jamie Fristrom

    Remember to mark the thread as "Solved" or helpful, if the issue is solved.

    -Jens Suessmeyer.


  • Maupassant99

    The books online discusses moving the database

    http://msdn2.microsoft.com/en-us/library/ms345483.aspx

    The beauty of this is that you never have to change your connection string. Providing you're still using the same instance on th same server. If you actually want to change database server or instance, then you will need to either perform a backup/restore operation, or an attach detach operation, and then you'll have to change the connection string to point to the new instance or server.



  • EastCore

    Boy, that looks tough... it should be as easy as just changing the file location in the connection string.

    Thanks.


  • JAson_scoobyjw


    Perhaps you messed up something. Even that the service is called MSSQLSERVER, the instance name of a default instance is empty, so the connection can be achieved using the either ".",the "localhost" or the "(local)" statement.

    HTH, jens Suessmeyer.

  • Alexb1115

    Also, the DB only exists in the Server Explorer and doesn't show up in the solutions Explorer with the rest of forms (is that OK ). I did happen to create a mdfDataSet.xsd in the Solution Explorer windows to connect to the db... is this sufficient to link the DB to the application

    With SQL express, the DB showed up in the Solution Explorer as part of the application... just wondering if that could be a SQLxpress only feature too.

    Thanks.


  • bulklodd

    Creating a database requires connecting to a SQL server.

    Are you using Visual Studio, or SQL Server Management Studio

    What menu or action are you taking

    Karl Tarbet


  • uzz

    I've worked with SQLX mdf and am very familar with it. However, Isis (SQL) is going to be very big. I need to know how to move the db to a remote drive (for extra space) if and when the time arrives. In otherwords, when a client is using the app, he or she may realize that the DB is getting too big or just want to move it to a larger drive.

    The connection string that was provided doesn't specify a location. With SQLX, I was able to "access" the DB from another drive by chaning the location in the connection string. Now, I would like to be able to do the same thing with SQL DB wherever it is.

    Thanks.


  • Hilary Cotter

    Drae if you installed SQL Server with the default settings, then it should be ".\MSSQLSERVER"

    the ".\" implies your local machine.



  • JeffSchwartz1

    Hi Drae,
     
    >>Boy, that looks tough... it should be as easy as just changing the file location in the connection string.
     
    Oh no, please not!
     
    Keep in mind that SQL Server is not a personal database but a database SERVER. Many users can connect to the server and query the same database. Do you really feel that the connection string on all clients should be changed when a DBA decides to move a database to a new disk array
     
    The client just logs in to a server or an instance of a server (identified by a servername that has to be unique within the network, and optionally an instancename), then connects to a database (identified by unique databasename within the server/instsance). There's no need for the client to know where the database's files are stored - the server will handle that.

    --
    Hugo Kornelis, SQL Server MVP

  • Jose Miguel Torres

    I'm using VS2005 Standard with SQL2005 Standard.  I did the default install and I used the Server name .\MSSQLSERVER    It comes back with the normal error that... An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (Provider: SQL Network Interfaces, error: 25 - Connection string is not valid).

    From Server Explorer window, I clicked on Data Connections Icon and Create New SQL Server Database...

    Okay, please help... it created (I specified: Isis) n-x2.Isis.mdf.dbo file   Is this a SQL 2005 file    I was expecting Isis.mdf.

    The problem with SQLexpress is that it's limited to 4GB, 1CPU,  1GB RAM so I don't want to use SQLexpress; whereas, SQL2005 has much, much more capacity.

    This newly created db doesn't have a file location and isn't present in the current project folder... what's up with that

    Thanks.


  • Server Name?