Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

When attaching database to MSDE receive error sp_db_attach not found

Posted on 2004-08-17
4
Medium Priority
?
438 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 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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

704 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