Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

When attaching database to MSDE receive error sp_db_attach not found

Posted on 2004-08-17
4
Medium Priority
?
439 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
  • 2
  • 2
4 Comments
 
LVL 15

Accepted Solution

by:
jdlambert1 earned 1200 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

916 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