Using the SafeToSQL Utility

5
Contents Implementing the SafeToSQL Utility ..............1 Using SafeToSQL ..............1 SafeToSQL Examples .......3 Using the SafeToSQL Utility Technical Solution This Technical Solution provides the information you need to successfully use the SafeToSQL utility. The SAFETOSQL utility helps you easily convert your SQLSAFE archive files for use with Microsoft SQL Server. With SAFETOSQL, you can use a simple command line statement to save your archive files in .bak format, ensuring they are stored in an industry-wide format.

Transcript of Using the SafeToSQL Utility

Page 1: Using the SafeToSQL Utility

Contents

Implementing the SafeToSQL Utility..............1

Using SafeToSQL..............1

SafeToSQL Examples .......3

Using the SafeToSQL Utility Technical Solution

This Technical Solution provides the information you need to successfully use the SafeToSQL utility.

The SAFETOSQL utility helps you easily convert your SQLSAFE archive files for use with Microsoft SQL Server. With SAFETOSQL, you can use a simple command line statement to save your archive files in .bak format, ensuring they are stored in an industry-wide format.

Page 2: Using the SafeToSQL Utility

Idera – a division of BBS Technologies, Inc. IntelliCompress, DTx, SQL change manager, SQLcheck, SQLconfig, SQL compliance manager, SQLcompliance, SQL defrag manager, SQL diagnostic manager, SQLdm, SQL mobile manager, SQLpermissions, SQLsafe, SQLsafe Freeware Edition, SQLscaler, SQLschedule, SQL schema manager, SQLsecure, SQLsmarts, SQLstats, SQLtool, Idera, BBS Technologies and the Idera logo are trademarks or registered trademarks of BBS Technologies, Inc., or its subsidiaries in the United States and other jurisdictions. All other company and product names may be trademarks or registered trademarks of their respective companies. © 2007 BBS Technologies, Inc., all rights reserved.

THIS DOCUMENT AND THE SOFTWARE DESCRIBED IN THIS DOCUMENT ARE FURNISHED UNDER AND ARE SUBJECT TO THE TERMS OF A LICENSE AGREEMENT. EXCEPT AS EXPRESSLY SET FORTH IN SUCH LICENSE AGREEMENT, BBS TECHNOLOGIES, INC., PROVIDES THIS DOCUMENT AND THE SOFTWARE DESCRIBED IN THIS DOCUMENT “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SOME STATES DO NOT ALLOW DISCLAIMERS OF EXPRESS OR IMPLIED WARRANTIES IN CERTAIN TRANSACTIONS; THEREFORE, THIS STATEMENT MAY NOT APPLY TO YOU. YOU ARE ENCOURAGED TO READ THE LICENSE AGREEMENT BEFORE INSTALLING OR USING THIS DOCUMENTATION OR SOFTWARE.

Some companies, names, and data in this document are used for illustration purposes and may not represent real companies, individuals, or data.

This document could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein. These changes may be incorporated in new editions of this document. BBS Technologies, Inc., may make improvements in or changes to the software described in this document at any time.

© 2003-2007 BBS Technologies, Inc., all rights reserved.

U.S. Government Restricted Rights: The software and the documentation are commercial computer software and documentation developed at private expense. Use, duplication, or disclosure by the Government is subject to the terms of the BBS Technologies, Inc., standard commercial license for the software, and where applicable, the restrictions set forth in the Rights in Technical Data and Computer Software clauses and any successor rules or regulations.

Using the SafeToSQL Utility Technical Solution Version 4.5

Page 3: Using the SafeToSQL Utility

Technical Solution Using the SafeToSQL Utility 1

Implementing the SafeToSQL Utility Use the following requirements and installation procedure to implement the SafeToSQL utility in your production SQL Server environment.

How SafeToSQL Works SafeToSQL provides a quick and easy way to convert SQLSAFE archive files to the format used by Microsoft SQL Server. The conversion SafeToSQL performs is useful when you are sending your archive files to someone that may not have SQLSAFE installed, and needs to access the archive files for troubleshooting or data migration purposes.

You can execute this conversion though a simple command-line statement from the command shell or in a batch file. When SafeToSQL converts the .safe file, the utility appends the name of the backup set index to the .bak file name.

SafeToSQL Requirements Installing and running SafeToSQL requires .NET Framework 2.0, but does not require that you install SQLsafe. Because SafeToSQL will expand your SQLsafe backups to the same size as native backups, you should ensure adequate disk space is available for the converted backups.

Installing SafeToSQL You can install the SafeToSQL utility from the main setup program.

To install SafeToSQL:

1. Log on with an administrator account to the computer on which you want to install SafeToSQL.

2. Run Setup.exe in the root of the installation kit.

3. On the Install screen, click Install SafeToSQL Utility.

4. Read the Welcome window, and then click Next.

5. Review and accept the license agreement by clicking I accept the terms in the license agreement, and then click Next.

6. Choose the destination folder, and then click Next.

7. Click Install.

Using SafeToSQL The SafeToSQL utility converts SQLSAFE formatted archive (.safe) files to Microsoft SQL Server formatted backup (.bak) files. This utility works for backups created with SQLSAFE version 1.5 or later.

To use the SafeToSQL utility, run the Command Prompt, and then type the appropriate command syntax for the conversion you need to execute.

Page 4: Using the SafeToSQL Utility

2 Using the SafeToSQL Utility Technical Solution

Understanding SafeToSQL File Name Syntax SQLSAFE uses the following file naming convention for SQLSAFE backup files it converts to Microsoft SQL Server backup files:

filename_#.bak

Where the file name components are as follows:

filename

Specifies the name of the source archive file.

#

Specifies the name of the backup set index.

Understanding SafeToSQL Syntax Use the following syntax when converting a SQLSAFE archive file:

SafeToSQL source_file_path [-backupfile file_name] [-backupset #] [-password pwd] [-list]

Where the following option is mandatory:

source_file_path

Defined as the complete directory path and file name of the SQLSAFE archive containing the backup set to convert to Microsoft SQL Server backup format.

Understanding SafeToSQL Options The SafeToSQL utility provides the following options.

-backupfile filename

The backupfile option provides the names of additional files in multi-file archives. You must specify each file in a multi-file archive and provide the complete path to the file.

-backupset #

The backupset option specifies the index (1-based) of the backup set in an archive containing multiple backup sets. If you do not specify the backup set index, the backup set defaults to 1, the index of the first backup set in the archive.

-password pwd

The password option specifies the password for decrypting an encrypted backup set. If the backup set is encrypted, provide the password you specified during backup.

-list

If the list option is specified, SafeToSQL prints out the complete contents of the archive specified by source_file_path.

Understanding Threaded Backup Sets SQLsafe has the capability of creating multi-threaded backup set to multiple virtual devices. When that backup set is converted using SafeToSQL, multiple SQL Server backup files will be created, one for each virtual device.

Page 5: Using the SafeToSQL Utility

Technical Solution Using the SafeToSQL Utility 3

Understanding Multiple Backup File Output SQLSAFE uses multiple processing threads to apply compression and encryption settings during a backup operation. During the backup, SQL Server divides the data between separate backup devices. SQLSAFE then writes the finished backup from all of these devices into a single archive file. When SafeToSQL converts the .SAFE file to native format, a separate .BAK file is created for each device or thread that was used during the original backup. This approach ensures the information can be restored to SQL Server using the same number of devices that were used for the backup. This is a SQL Server requirement.

SafeToSQL Examples Use the following scenarios as examples for using SafeToSQL.

Converting an Archive with a Single Backup Set To convert an encrypted archive that contains the pubs database as the single backup set, type the following command at the command prompt:

SafeToSQL "d:\sqlsafe_backup\LT1_pubs_01_enc.safe" -password my_password

The path and name of the converted file is:

d:\sqlsafe_backup\LT1_pubs_01_enc_1.bak

Converting an Archive with Multiple Backup Sets To convert an archive that contains the northwind database as the second backup set in the archive, type the following command at the command prompt:

SafeToSQL "d:\sqlsafe_backup\LT1_multi_01.safe" -backupset 2

The path and name of the converted file is:

d:\sqlsafe_backup\LT1_multi_01_2.bak

To list the contents of the archive, type the following command at the command prompt:

SafeToSQL "d:\sqlsafe_backup\LT1_multi_01.safe" –list

Converting an Archive Saved across Multiple Files To convert an archive saved in the directory in two files, type the following command at the command prompt:

SafeToSQL “d:\sqlsafe_backup\ pubs_a.safe” –additionalfile “d:\sqlsafe_backup\ pubs_b.safe”

The path and names of the converted files are:

d:\sqlsafe_backup\ pubs_a_1.bak and d:\sqlsafe_backup\ pubs_b_1.bak