Red Gate forums :: View topic - Trouble with SQL Backup stored proc
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Backup Previous Versions
SQL Backup Previous Versions forum

Trouble with SQL Backup stored proc

Search in SQL Backup Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
kepr00



Joined: 28 Nov 2006
Posts: 25

PostPosted: Mon Jun 16, 2008 3:26 pm    Post subject: Trouble with SQL Backup stored proc Reply with quote

Hello
I am having difficulty with the SQL Backup stored procedure.

This is the syntax I am using.
Use [master];
EXEC sqlbackup '-SQL "Restore Database MyDB From Disk=[D:\path\backup.sqb] With MOVE [MyDB_DATA] TO [D:\databases\MyDB_DATA.MDF], MOVE [MyDB_LOG] TO [D:\databases\MyDB_LOG.LDF], MOVE [MyDB_AUDIT] TO [D:\databases\MyDB_AUDIT.NDB], PASSWORD=[myPassw3d]"'

The error I get is Error 710: Wrong password entered.

When I copy this command an use the command line tool
SqlbackupC -SQL "Restore Database MyDB From Disk=[D:\path\backup.sqb] With MOVE [MyDB_DATA] TO [D:\databases\MyDB_DATA.MDF], MOVE [MyDB_LOG] TO [D:\databases\MyDB_LOG.LDF], MOVE [MyDB_AUDIT] TO [D:\databases\MyDB_AUDIT.NDB], PASSWORD=[myPassw3d]"

It works just fine.

Is there something incorrect with the procedure syntax?

I am running both the stored procedure command and the command line command on my local box.
I have verified that the paths listed in the command exist.
I am using windows authentication for my sql logon in both cases.
My windows user has admin priviledges on the local box.
My sql logon has restore priviledges and is in the sysadmin role.
I am using SQL Backup version 5.3.0.178.

Thanks in advance for your help.
_________________
Steve T
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6674

PostPosted: Mon Jun 16, 2008 4:29 pm    Post subject: Reply with quote

Hi Steve,

Because the brackets are treated as identifiers by SQL Server, I'd imagine that passwords containing these would be handled differently by the command prompt interpreter as opposed to the SQL query parser. In the SQL query version, you may want to try padding out your password, for instance [[myPassw3rd]] or '[myPassw3rd]'
Back to top
View user's profile Send private message
kepr00



Joined: 28 Nov 2006
Posts: 25

PostPosted: Mon Jun 16, 2008 5:07 pm    Post subject: Reply with quote

There are no brackets in the password.

Quote:
From the help file, this is a sample that I was working from
master..sqlbackup '-SQL "BACKUP DATABASE pubs TO DISK = ''C:\Backups\pubs.sqb'' WITH PASSWORD = ''MyPassword'' " '

Alternatively, you can use square brackets instead of two single quotes:

master..sqlbackup '-SQL "BACKUP DATABASE pubs TO DISK = [C:\Backups\pubs.sqb] WITH PASSWORD = [MyPassword] " '


I did, however, do some further troubleshooting.
My actual password has an ascii 178(dec) or B2(hex) character in it which is a superscripted 2. This seems to be where the sqlbackup procedure is failing. When I create another backup without using this character, everything works in both the sql Command tool and the SqlBackup stored proc.

So it seems that the SqlBackup stored procedure has some difficulty with ascii characters above 122(DEC) or 7A(HEX) where the command line SqlBackupC command has no such issues.

It would be nice to see this limitation removed in a future release of SqlBackup.

BTW, I also got an exception in this post when I tried to use the actual character in the body of this message.

Thanks.
_________________
Steve T
Back to top
View user's profile Send private message
sam88jeep



Joined: 04 Jun 2007
Posts: 12

PostPosted: Wed Feb 17, 2010 7:41 pm    Post subject: Wrong Password Entered Reply with quote

I kept getting the 710 "Wrong Password Entered" error when using an older version of sqb2mtf.exe on a newer SQB file.

Just thought I'd post this for anyone running into this...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group