Solved

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

Posted on 2013-01-07
5
877 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:EugeneZ
Comment Utility
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
Comment Utility
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
Comment Utility
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:EugeneZ
Comment Utility
hmm- did you try my post?
0
 
LVL 42

Expert Comment

by:EugeneZ
Comment Utility
as I said - it is CS and sp_helpdb  will give you real name..
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how the fundamental information of how to create a table.

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now