Solved

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

Posted on 2013-01-07
5
914 Views
Last Modified: 2013-01-07
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.
0
Comment
Question by:snowdog_2112
  • 3
5 Comments
 
LVL 42

Expert Comment

by:Eugene Z
ID: 38753234
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
 
LVL 39

Accepted Solution

by:
appari earned 500 total points
ID: 38753242
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
 

Author Closing Comment

by:snowdog_2112
ID: 38753246
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
 
LVL 42

Expert Comment

by:Eugene Z
ID: 38753251
hmm- did you try my post?
0
 
LVL 42

Expert Comment

by:Eugene Z
ID: 38753253
as I said - it is CS and sp_helpdb  will give you real name..
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

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to shrink a transaction log file down to a reasonable size.

696 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