Page tree
Skip to end of metadata
Go to start of metadata
Purpose

This page will help you in Restoring the following

Applicable in CAST Version
Release
Yes/No
8.2.x(tick)
8.1.x(tick)
7.3.x(tick)


Details

Restoring a .bak file

The following steps describe one procedure to load a dump on SQL server.

  • Open SQLServer Management Studio. - Start → All Program → (Main SQL Server Code Version Installed) ->SQL Server Management Studio
  • Login with the credentials for the sa user for the database. 
  • Create a new empty database by right clicking on the 'Databases' folder and following the prompts:

  

  • Right click on the “Databases”, hit “Restore Database”.

  

  •  Specify the name of the new DB you just created to restore into in the “To Database” section.

 


  • Transfer the *.bak file to the host where the SQL Server instance is located (if it is not there already).   The .bak file should be copied to your local directory for data files of your SQL Server instance, for example  C:\Program Files\Microsoft SQL Server\MSSQL10_50.LATIN1_GENERAL_CS_AS\MSSQL\Backup
  • Specify the path of the .bak file in the “From Device” section to the location of this file by selecting the elipsis (.,..) and in the next screen selecting 'Add'
  • Navigate to the bak file location in the 'Add' screen, and select the DB in the *.bak file which is being restored, and then select OK.

 

  • Now check the Database that you need to restore under – “Select the backup sets to restore”.

 

  • Navigate to the “Options” section on your left top corner.
  • change the file name and path of the .mdf files to work with your local SQL server data locations and naming conversions.  The screenshot below shows three *.mdf files which need to be changed as they are all the same name.

 

  • Leave the rest of the default settings and then click 'OK' to start the restore

Restoring a .ldf, .mdf file

  • Copy the .ldf and .mdf files to C:\Program Files\Microsoft SQL Server\MSSQL\Data 
  • In SQL Server Enterprise Manager, do the following:
  • Select DataBase
  • Right-click on the DataBase field and select the All tasks >Attach Database option.
  • The Attach Database - (local) window is displayed:
  • Attach the .mdf file by clicking on the ... button.
  • Give a name to the base by filling the Attach as field.
  • Specify database owner as sa in the Specify database owner field.
  • Click on the OK button.

Restoring a .DAT, .ZIP, .TXT file


The following steps describe the procedure to load a CAST KB or central base dump for SQL server in ZIP, TXT or DAT format.

  • Launch Server Manager and install a CAST KB or Central base on wich the export base will be loaded.
  • Then launch the command line by choosing Start -->run and by typing cmd
  • within the command line, move to CAST installation directory: cd "C:\Program Files\CAST\X.X.X for SQL Server" where X.X.X define the CAST version
  • Then type the below command to import a central base (this information is available in ADG Admin Online Help):


CastDBTransfert.exe -DATABASE(<DATABASE_TYPE>) -CONNECT(<SERVER>,<USER_NAME>,<PASSWORD>,<CENTRAL_SITE_NAME>) -IMPORT_CENTRAL(<path and name of destination file>, [ <path and name of configuration .INI file> ]))
Example: CastDBTransfert.exe -DATABASE(SQLSERVER) -CONNECT(SQL_Latin1_General_CP1_CI_AS,sa,castcast,C601_13779_FNG) -IMPORT_CENTRAL('C:\FNG_CALLs\13779\CACopyKB.zip')
The file C:\FNG_CALLs\13779\CACopyKB.zip can be a .zip, a .dat or a .txt
The import can take both single .dat OR .zip OR .txt AND .INI like this -IMPORT_CENTRAL(E:\tmp\ExpImp\CopyCL.dat, E:\tmp\ExpImp\CopyCL.ini)
The .zip, .txt, .dat must not be split (or extract) into many files

  • To import a local base or KB (this information is able in Analysis Manager Online Help):


CastDBTransfert.exe -DATABASE(<DATABASE_TYPE>) -CONNECT(<SERVER>,<USER_NAME>,<PASSWORD>,<KNOWLEDGE_BASE_NAME>) -IMPORT_LOCAL(<path and name of source file>, \<path and name of configuration .INI file>],, -NoMergeView)
The -NoMergeView option helps improving import's speed
Example: CastDBTransfert.exe -DATABASE(SQLSERVER) -CONNECT(SUPPORT02_LAT_CP1_CIAS_2k5,sa,castcast,L601_13779_FNG) -IMPORT_LOCAL('C:\FNG_CALLs\13779\CACopyKB\CACopyKB.zip',, -NoMergeView)

Restoring a differential database backup

As input:
Create a kb= KB571_12913_SAG
There are two .back files that I need to import to the 'KB571_12913_SAG':
KB_CAST_08_DB_200708272243.Backup
KB_CAST_08_Diff_200708302216.Backup'
First run the command 'restore' with 'NORECOVERY' option on the file 'KB_CAST_08_DB_200708272243.Backup':
restore database KB571_12913_SAG
from disk = 'C:\SAG\KB_CAST_08_DB_200708272243.Backup'
with move 'KB_CAST_08_data' to 'C:\SAG\KB571_12913_SAG.mdf',
move 'KB_CAST_08_log' to 'C:\SAG\KB571_12913_SAG.ldf',
stats,
NORECOVERY
Then run the command 'restore' the option 'RECOVERY' of the diff .Backup 'KB_CAST_08_Diff_200708302216.Backup':
restore database KB571_12913_SAG
from disk = 'C:\SAG\KB_CAST_08_Diff_200708302216.Backup'
with move 'KB_CAST_08_data' to 'C:\SAG\KB571_12913_SAG.mdf',
move 'KB_CAST_08_log' to 'C:\SAG\KB571_12913_SAG.ldf',
stats,
RECOVERY


Notes / Comments


Related Pages


  • No labels