How to restore database to a new location (WITH MOVE) using a command line script
RESOLUTION:
To run the command line utility:
Display a command prompt for your operating system.
If the LiteSpeed 2005 directory is not placed in the environment PATH, change the directory until you are in the directory containing sqllitespeed.exe.
On a default installation this is:
%PROGRAM_FILES%\IMCEDA\LiteSpeed\SQL Server\Engine
Example:
sqllitespeed -Rdatabase -T -DNorthwind -F"C:\temp\Northwind.BKP" -W"MOVE 'Northwind' TO 'C:\Program Files\Microsoft SQL Server\MSSQL\data\Northwind1_Data.mdf'" -W"MOVE 'Northwind_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL\DATA\Northwind1_Log.ldf'"
Syntax:
sqllitespeed
[-?]
[
{
{-U login_id [-P password]} | -T
}
Connection Arguments
[-S server_name [\instance_name]]
[-T]
SQL Server Operations
[-B backup_operation]
[-R restore_operation]
[-D db_name]
[-f file_name]
[-g filegroup_name]
Backup File:
[-F backup_device_name]
Misc:
[-K encryption_key]
[-t number_of_threads]
[-I]
[-N file_number]
[-A affinity ]
[-L logging_number]
[-W with_arguments]
[-n backup_name]
[-d backup_description]
[-p priority ]
[-C compression_level ]
[-e encryption_level]
[-Y comment ]
[--doubleclick]
[--attachedfile path/file]
[--checksum]
Optimization Arguments
[-h throttle]
[-o buffer_count]
[-x maximum_transfer_size]
Tape Arguments
[-m format_tape]
[-w rewind]
[-u unload]
TSM Arguments
[-c TSM_client_node]
[-M TSM_connection_user_name]
[-J TSM_connection_password]
[-i TSM_object]
[-l TSM_filespace]
[-k TSM_client_owner_password]
[-j TSM_configuration_file]
[-q TSM_query]
[-a delete]
[-z TSM_management_class]
[--tsmpointtime yyyy-mm-dd hh:mm:ss]
[--tsmxmlcachesize n]
]
Note: Parameters are case sensitive and can be preceded with "-" or "/".
For more information on the parameters, refer to LiteSpeed 2005 Command Line Parameters.
Returns:
0 (success) or 1 (failure)
For more information, please check the litespeed help file
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Termini di utilizzo Privacy Cookie Preference Center