| Author |
Message |
kepr00
Joined: 28 Nov 2006 Posts: 25
|
Posted: Mon Jun 16, 2008 3:26 pm Post subject: Trouble with SQL Backup stored proc |
|
|
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 |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6348 Location: Red Gate Software
|
Posted: Mon Jun 16, 2008 4:29 pm Post subject: |
|
|
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]' _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
kepr00
Joined: 28 Nov 2006 Posts: 25
|
Posted: Mon Jun 16, 2008 5:07 pm Post subject: |
|
|
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 |
|
 |
sam88jeep
Joined: 04 Jun 2007 Posts: 12
|
Posted: Wed Feb 17, 2010 7:41 pm Post subject: Wrong Password Entered |
|
|
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 |
|
 |
|
|
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