Solved

When attaching database to MSDE receive error sp_db_attach not found

Posted on 2004-08-17
4
435 Views
Last Modified: 2013-12-25
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.

0
Comment
Question by:mbart
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 15

Accepted Solution

by:
jdlambert1 earned 300 total points
ID: 11822233
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
 

Author Comment

by:mbart
ID: 11822467
Found my problem, brain must be on vacation
0
 

Author Comment

by:mbart
ID: 11822502
Used your input jdlambert1 but I had to change to sp_Attach_db
0
 
LVL 15

Expert Comment

by:jdlambert1
ID: 11822503
My brain is on sabbatical. If my brain sees yours, I'll say hello.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question