How can we help you today? How can we help you today?

Using a Password file with sqb2mtf command line

Can I use a password file with sqb2mtf command? Or can I only use a password when the backup is encrypted. HEre is what I am trying to do.

SQB2MTF "c:\FULL_DB024_KareoMaintenance_20140120_113510_encr.sqb" "c:\FULL_DB024_KareoMaintenance_20140120_113510_encr.bak" "Password=FILE:C:\REDGATE\Backup.txt"
pamozer
0

Comments

10 comments

  • Manfred.Castro
    You can only use a password when the backup (sqb) is encrypted.
    The password is used to decrypt an encrypted sqb file during the conversion.
    Manfred.Castro
    0
  • pamozer
    My question isn't clear. I want to use a password file instead of a hard coded password,. Can I use that with the sqb2mtf?
    pamozer
    0
  • Manfred.Castro
    It doesn't appear that the password in a text file was implemented in the standalone converters.
    I tried both sqb2mtf.exe and SqbConverter.exe and was unsuccessful.
    If you want to convert a file from the command line you could use the convert command from the command line.

    SQLBackupC.exe -I {instance name} -SQL "CONVERT 'C:\Backups\pubs.sqb' TO 'C:\Backups\pubs.bak' WITH PASSWORD = 'FILE:C:\mypasswords\password.txt'"

    http://documentation.red-gate.com/displ ... RTPASSWORD
    Manfred.Castro
    0
  • pamozer
    Do you know if I can ecrypt witht a password file and decrypt with just the password using the converter?
    pamozer
    0
  • Manfred.Castro
    I just did a quick test and yes you can encrypt with a password file and decrypt with just the password using the converter.
    Manfred.Castro
    0
  • pamozer
    Thank you for all your help. Can you tell my why I am getting a syntax error with this?
    EXECUTE master..sqlbackup '-SQL "BACKUP DATABASE [10163] TO DISK = ''\\pd-cifs-1\sql_backups\db001\<AUTO>_encr.sqb'' WITH PASSWORD = ''FILE:C:\redgate\dcr.txt'', KEYSIZE=256,CHECKSUM, DISKRETRYINTERVAL = 30, DISKRETRYCOUNT = 10, COMPRESSION = 4" '
    


    SQL Backup v7.6.0.29
    Syntax error: 'FILE:C:\redgate\dcr.txt' after '='
    Password file does not exist: C:\redgate\dcr.txt

    (2 row(s) affected)

    name value

    exitcode 850
    sqlerrorcode 0
    pamozer
    0
  • Manfred.Castro
    The error indicates that: Password file does not exist: C:\redgate\dcr.txt
    Is the file name and path correct?
    It could also be permissions to the folder.
    The logon account of the SQL Backup Agent have rights to the folder?
    Manfred.Castro
    0
  • pamozer
    Yes. It is the right path and the service account has permissions. What about the syntax error message?
    pamozer
    0
  • Manfred.Castro
    The syntax is fine.
    I pretty much copied your command and it worked, I only changed the database name and the disk path.
    The main thing it is compalining about is:
    Password file does not exist: C:\redgate\dcr.txt

    Try giving the log on account of the SQL Backup Agent explicit rights to the folder.
    Manfred.Castro
    0
  • pamozer
    I figured out the problem. Stupid mistake on my part. Thanks for all your help
    pamozer
    0

Add comment

Please sign in to leave a comment.