sql 2008r2 backup database "database 'any-database' does not exist".

SQL 2000 server upgraded to full version of 2008 R2.

Windows authentication as a member of domain admins
Regardless of the database name...

SQL Query:

backup database mydatabase
to disk = 'c:\data\backup\db.bak'

Gives error:
Msg 911, Level 16, State 11, Line 1
Database 'mydatabase' does not exist. Make sure that the name is entered correctly.
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.'


Same with "backup log [any-database] to disk..."

All say "database does not exist".

I've added my user explicitly as dbo.

"use [any-name]" works just fine.
snowdog_2112Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
appariConnect With a Mentor Commented:
may be your server is case sensitive?
check for the exact name and use it in your query.
execute
SELECT * FROM master..sysdatabases

and use the db name from the list.
0
 
Eugene ZCommented:
you may installed sql server as CS..
run sp_helpdb and check the db name: it can be upper case

can you run from the same session
use mydatabase?
0
 
snowdog_2112Author Commented:
wow - obvious, and yet, dumb.

Collation: Latin1_General_CS_AS

Case Sensitive!  First time I think I 've seen an MSSQL db in CS collation (other db's, yeah).

backup database MYDATABASE to disk = 'c:\data\db.bak'

works just fine!

Thanks a TON!!
0
 
Eugene ZCommented:
hmm- did you try my post?
0
 
Eugene ZCommented:
as I said - it is CS and sp_helpdb  will give you real name..
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.