What are the challenges you face when working across database platforms? Take the survey
Options

Using a Password file with sqb2mtf command line

pamozerpamozer Posts: 16 New member
edited January 24, 2014 4:43PM in SQL Backup Previous Versions
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"

Comments

  • Options
    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
    Product Support
    Red Gate Software
  • Options
    pamozerpamozer Posts: 16 New member
    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?
  • Options
    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
    Product Support
    Red Gate Software
  • Options
    pamozerpamozer Posts: 16 New member
    Do you know if I can ecrypt witht a password file and decrypt with just the password using the converter?
  • Options
    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
    Product Support
    Red Gate Software
  • Options
    pamozerpamozer Posts: 16 New member
    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
  • Options
    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
    Product Support
    Red Gate Software
  • Options
    pamozerpamozer Posts: 16 New member
    Yes. It is the right path and the service account has permissions. What about the syntax error message?
  • Options
    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
    Product Support
    Red Gate Software
  • Options
    pamozerpamozer Posts: 16 New member
    I figured out the problem. Stupid mistake on my part. Thanks for all your help
Sign In or Register to comment.