June 6, 2006 at 8:01 am
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
June 6, 2006 at 8:58 am
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
June 6, 2006 at 9:01 am
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
June 6, 2006 at 9:24 am
Well I know that.. see the attached screen shots..
See the location of SQL 2000, 2005 master database file location
June 6, 2006 at 9:48 am
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
June 6, 2006 at 10:03 am
Yes.. otherwise I will not be able to connect to the database right...
June 6, 2006 at 10:07 am
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
June 6, 2006 at 10:08 am
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.
June 7, 2006 at 9:12 am
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.
June 7, 2006 at 10:38 am
Thanks guys....
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply