Which SQL Server

  • Hi

    I have both SQL Server 2000 & 2005 installed on my computer. Both server has a database called 'bha' and the database has the user t2. When I use the following connection string

    Provider=SQLOLEDB;Locale Identifier=2057;Data Source=(local);Initial Catalog=bha;User Id=t2;Password=t2;

    It connect to 2000, why..? why it is not using sql 2005.. How can i connect to 2005 with out creating any dsn in control panel

     

    Thanks

    XXXX

  • If you are connecting to SQL Server 2000 using (local), then SQL Server 2005 is installed as a named instance.  You'll need to use the instance name such as (local)\INSTANCE_NAME, to connect to the 2005 instance.

    Tim Mitchell, Microsoft Data Platform MVP
    Data Warehouse and ETL Consultant
    TimMitchell.net | @Tim_Mitchell | Tyleris.com
    ETL Best Practices

  • You probably installed SQL 2000 first as the default instance.  When you installed SQL 2005, you had to install it as a named instance.  In your connection string, you are connecting to the default instance, in this case the SQL 2000 instance.

    You need to change your connection string to use the named instance to connect to your SQL 2005 instance.  On my system that would be MachineName\SQL2K5DEVELOPER to connect to the SQL 2005 instance.

    Hope this helps.

    Lynn

  • Well I know that.. see the attached screen shots.. 

    See the location of SQL 2000, 2005 master database file location

  • I'm not sure how you could have gotten both SQL Server instances wired up to the same master database location.  Have you verified that the SQL Server 2005 service (sqlservr.exe) is actually running?  I suspect it's probably not.

    Tim Mitchell, Microsoft Data Platform MVP
    Data Warehouse and ETL Consultant
    TimMitchell.net | @Tim_Mitchell | Tyleris.com
    ETL Best Practices

  • Yes.. otherwise I will not be able to connect to the database right...

  • Seeing both databases mapped to the same master database location, my first thought would be that one of the database instances would start and the other would fail.

    Tim Mitchell, Microsoft Data Platform MVP
    Data Warehouse and ETL Consultant
    TimMitchell.net | @Tim_Mitchell | Tyleris.com
    ETL Best Practices

  • Looking at your screen prints, it looks like your SQL Server Management Studio connection to "Kenny" is also looking at your SQL 2000 instance.  The version number showning there is 8.0.194.  If it was connecting to your SQL 2005 instance it would show as 9.?.???.  On my desktops the my SQL 2005 Developer Editions show as 9.0.2047.  Double check that both instances are up are running and the the SQL Server Management Studio sees both.  I use MS to support multiple SQL 2000 servers as well as my SQL 2005 development servers.

     

  • Lynn caught what I caught and that's you're using Management Studio to connect the SQL2K instance on the machine. You can use Management Studio (new in SQL2K5) to manage both SQL2K and SQL2K5 instances. If you want to review exactly what SQL2K5 components you've installed you can get an installation report from Add/Remove Programs (ARP).

    Launch Control Panel

    Launch Add/Remove Programs

    Scroll down and select the entry "Microsoft SQL Server 2005"

    Click the "Change" button

    On the resulting dialog click the "Report" button

    You'll see an inventory of all SQL2K5 instances and features installed.

  • Thanks guys....

Viewing 10 posts - 1 through 9 (of 9 total)

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