drees727
asked on
MSDE osql checkdb
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.
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.
ASKER
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.
use 'My db'
or
use "My db"
or
use ('My db')
I get an incorrect syntax error.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Very helpful. Thank you.
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