When attaching database to MSDE receive error sp_db_attach not found

I don't know why I am getting the error sp_db_attach not found when trying to attach a database to MSDE.  I have done it once in the past without any problems, but it has been a while and I can't seem to find the sample I used to do it. I type in the following at the C:\Prompt
Osql -E
1>EXEC sp_db_attach "dbname", "c:\path\db.mdf", "C:\path\db.ldf"
2> go
This is when I get the sp_db_attach not found.  Know this is a simple problem, but I need immediate help.

mbartAsked:
Who is Participating?
 
jdlambert1Connect With a Mentor Commented:
Try:

Osql -E
1>USE master
2>go
3>EXEC sp_db_attach "dbname", "c:\path\db.mdf", "C:\path\db.ldf"
4> go
0
 
mbartAuthor Commented:
Found my problem, brain must be on vacation
0
 
mbartAuthor Commented:
Used your input jdlambert1 but I had to change to sp_Attach_db
0
 
jdlambert1Commented:
My brain is on sabbatical. If my brain sees yours, I'll say hello.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.