Solved

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

Posted on 2013-01-07
5
932 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 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 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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

726 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