Solved

MSDE osql checkdb

Posted on 2006-06-15
4
1,488 Views
Last Modified: 2008-01-09
I need to run a checkdb on an MSDE database.  I'm logged into the server running MSDE as an Administrator and typed the following at the command prompt:

c:\osql -E -d Mydb

and get the following error:

Cannot open database requested in login 'Mydb'.  Login Fails.

If I type in c:\osql -E
I get the >1
Then I type in the following, but nothing happens:
 >1 use Mydb
>2  dbcc checkdb

Any suggestions?  Thanks.







0
Comment
Question by:drees727
[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 5

Expert Comment

by:bwdowhan
ID: 16913062
Hi drees727,

You just need to add the GO keyword after each command:

If I type in c:\osql -E
I get the >1
Then I type in the following, but nothing happens:
 >1 use Mydb
>2 GO
>1 dbcc checkdb
>2 GO
>1

Brian
0
 

Author Comment

by:drees727
ID: 16913224
Thanks.  I just realized my database name has a space 'My db'.  If I use:

use 'My db'
or
use "My db"
or
use ('My db')

I get an incorrect syntax error.
0
 
LVL 5

Accepted Solution

by:
bwdowhan earned 125 total points
ID: 16913289
Use [My db]
0
 

Author Comment

by:drees727
ID: 16913362
Very helpful.  Thank you.
0

Featured Post

Industry Leaders: 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

Suggested Solutions

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

738 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