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

 All Forums
 SQL Server 2000 Forums
 MSDE (2000)
 MSDE is running but db is not attached??

Author  Topic 

automicgina
Starting Member

25 Posts

Posted - 2003-03-25 : 11:47:55

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

1974 Posts

Posted - 2003-03-25 : 22:47:53
Why can't you? Use OSQL to run the sp_attach_db stored proc.

-Chad

Go to Top of Page

simondeutsch
Aged Yak Warrior

547 Posts

Posted - 2003-03-26 : 23:03:14
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

25 Posts

Posted - 2003-05-01 : 11:14:04
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
Master Smack Fu Yak Hacker

1429 Posts

Posted - 2003-05-01 : 12:18:08
have you tried rebooting?

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-05-01 : 20:07:42
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

25 Posts

Posted - 2003-05-06 : 15:24:18
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

38200 Posts

Posted - 2003-05-06 : 15:28:27
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
   

- Advertisement -