Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 MSDE (2000)
 MSDE is running but db is not attached??
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

automicgina
Starting Member

USA
25 Posts

Posted - 03/25/2003 :  11:47:55  Show Profile  Reply with Quote

Hi,

I have a program that should connect to my_local_db. I check the MSDE is running but the program still show no data. So I check the ODBC DSN configuration and there I found the problem: I try to set my_local_db as the default db but it is not in the list. I know in SQL server I can attach my_local_db using query analyzer and that would solve the problem, but in MSDE there's no way for me to do that. Any suggestion? Thanks!

chadmat
The Chadinator

USA
1974 Posts

Posted - 03/25/2003 :  22:47:53  Show Profile  Visit chadmat's Homepage  Reply with Quote
Why can't you? Use OSQL to run the sp_attach_db stored proc.

-Chad

Go to Top of Page

simondeutsch
Aged Yak Warrior

USA
547 Posts

Posted - 03/26/2003 :  23:03:14  Show Profile  Reply with Quote
BTW, OSQL is a command line utitility. It is included in the Binn folder under the MSSQL7 folder. You cannot run it by double-clicking its icon, you must run it from the command line like this:
C:\MSSQL7\Binn\OSQL -U username -P password and press enter or the run button. You should see a > (greter than) sign with a number one if osql opened. Then you can type a line: sp_attach_db 'dbname','dbpath' and press enter. You will get another > sign with a number two. Type GO and press enter. You will get a message if the database attached properly.

Sarah Berger MCSD
Go to Top of Page

automicgina
Starting Member

USA
25 Posts

Posted - 05/01/2003 :  11:14:04  Show Profile  Reply with Quote
I tried the osql command and got the message "Successfully attached database 'my_local_db'" but when I go back into the ODBC my db is still not attached even though the MSDE is running correctly. This is a Windows 2000 computer and MSDE 1.0. Anyone knows what else I can try?

Thanks!
Go to Top of Page

ValterBorges
Flowing Fount of Yak Knowledge

USA
1429 Posts

Posted - 05/01/2003 :  12:18:08  Show Profile  Reply with Quote
have you tried rebooting?

Go to Top of Page

tkizer
Almighty SQL Goddess

USA
38200 Posts

Posted - 05/01/2003 :  20:07:42  Show Profile  Visit tkizer's Homepage  Reply with Quote
You can use the SQL Server Client Tools, including Query Analyzer, to connect to an MSDE server. Have you tried registering your MSDE server in Enterprise Manager or Query Analyzer?

Tara
Go to Top of Page

automicgina
Starting Member

USA
25 Posts

Posted - 05/06/2003 :  15:24:18  Show Profile  Reply with Quote
I tried reboot system and that didn't work. And the computer only has MSDE. So no Query Analyzer or anything that came with MS SQL Server.
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
38200 Posts

Posted - 05/06/2003 :  15:28:27  Show Profile  Visit tkizer's Homepage  Reply with Quote
How do you know that the database it not attached? Just because the ODBC screen isn't showing the database doesn't mean that it is not attached. Which account are you using for your DSN? Is that account orphaned (if it's sa then it's not orphaned)? Using OSQL, what do you get when you run this: SELECT name from master.dbo.sysdatabases?

Tara
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000