?
Solved

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

Posted on 2013-01-07
5
Medium Priority
?
965 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
[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
  • 3
5 Comments
 
LVL 43

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 2000 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 43

Expert Comment

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

Expert Comment

by:Eugene Z
ID: 38753253
as I said - it is CS and sp_helpdb  will give you real name..
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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.

765 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