Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL Backup command to named instance

Author  Topic 

bloveday
Starting Member

2 Posts

Posted - 2010-06-03 : 15:48:06
Hi

This is probably a very simple thing, but I cant find the answer with Google.

I am trying to script a backup job in SQL on a named instance.

The commands I run are:

backup database [tcr] to disk='Network Path\Automatic Backups\Tcr-DB.bak'
with format

But I get an error message:

Msg 911, Level 16, State 11, Line 1
Could not locate entry in sysdatabases for database 'tcr'. No entry found with that name. Make sure that the name is entered correctly.
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.


When i run this command on the default instance to all my other databases it works fine.

Any ideas?

Thanks,
Brett

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-06-03 : 15:55:58
It appears that the database tcr doesn't exist on that instance.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

bloveday
Starting Member

2 Posts

Posted - 2010-06-03 : 17:08:25
Hi Tara

The database definetly exists.

I can other commands like dbcc and they are fine.

I thought is was because I would need to specify the instance name in the backup command.

Brett


quote:
Originally posted by tkizer

It appears that the database tcr doesn't exist on that instance.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-06-03 : 17:18:05
Nope, you don't reference the sql instance at all in the command.

Are you able to backup the database to a local drive?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -