Академический Документы
Профессиональный Документы
Культура Документы
Volume 2
By
basisconsultant.com
If a system copy takes place between systems with same platform ( operating system and database
system ) , we call this HOMOGENEOUS SYSTEM COPY.
If The system copy takes place between systems with different platforms ( at least one of the
component must be different, OS or RDBMS ), we call this HETEROGENEOUS SYSTEM COPY.
The names of the data files are composed of the directory name and the .mdf for the master data file
or .ndf for the additional data files. The master data file is generally located in <SID>DATA1. The
same applies to the log files: <SID>DATA.ldf.
Example:
The example database SRC consists of the data directories;
SRCDATA1 with master data file SRCDATA1.mdf
SRCDATA2 with secondary data file SRCDATA2.ndf
This guide is prepared for a Homogeneous System Copy using MSSQL Tools. Steps for this kind of
system copy are briefly as below:
Prerequisites
Following conditions must be provided to copy a system:
The target database can be located on the same server or on another machine.
The target database name can (in the case of the same server, it must) differ from the initial
database name.
Directory and file names should correspond to the R/3 nomenclature.
The directories <target SID>DATA and <target SID>LOG must be created.
Sufficient place must be available for the respective data/log files.
Procedure
1. Install MSSQL Server (Same Version as Source MSSQL Server) on Target System.
2. Install SP on Target System same as Source MSSQL SP level.
3. Install R/3 Central Instance on Target System.
4. Determine Source Database Structure. For this, use the following SQL command via Query
Analyzer:
use SRC
go
sp_helpfile
5. Create Data and Log directories on target system with the same or different name. For example,
in our example, we are going to copy SRC database on different machine with name TGT. So we
have to create following directories:
<DRIVE>:\TGTDATA1
<DRIVE>:\TGTDATA2
<DRIVE>:\TGTLOG1
You can create Data and Log directories different from source. For example you can create only 1
directory for all of the files as follow:
<DRIVE>:\TGTDB
or all Data's in one dir. And All Logs in one dir. as follow:
<DRIVE>:\TGTDATA
<DRIVE>:\TGTLOG
6. Stop Source R/3 System and Detach the Source Database for copying. The stored procedure
sp_detach_db separates a database from the SQL server. This corresponds to a deletion (Drop)
of the database without eliminating the respective files. The database can be attached again
later by means of sp_attach_db.
Connect yourself by means of the query analyzer as user sa. In the master database, carry out the
following command:
use master
7. Copy Data and Log Files of SRC database on to the Target System into the corresponding target
directories. You can rename the file names for your Target Database.
8. Re-Attach Source Database by means of sp_attach_db, and the source database is made
available again. sp_attach_db expects the name of the database and a list of physical file names
(complete path names) as a parameter. The list must contain the master data file and all files
whose physical location or name were changed. Thus, for the source database, it is only required
to call sp_attach_db with the name of the outbound database and the complete path name of the
master data file.
9. Create Target Systems Database.The creation/attachment of the target database can be carried
out by means of sp_attach_db or CREATE DATABASE FOR ATTACH. Sp_attach_db supports
only up to 16 data/log files. Thus, if the database consists of more than 16 files, CREATE
DATABASE FOR ATTACH must be used for the reapplication. The FOR ATTACH option for the
CREATE DATABASE permits the generation of a database from a quantity of already existing
files. Analogously to sp_attach_db, the master data file and all files with changed physical
addresses must be entered. Unlike sp_attach_db, the logical names of the files can also be
specified.
use master
go
sp_attach_db @dbname= N'SRC',
@filename1 = N'c:\SRCDATA1\SRCDATA1.mdf',
@filename2 = N'c:\SRCDATA2\SRCDATA2.ndf',
@filename3 = N'c:\SRCLOG1\SRCLOG1.ldf'
If your Target System has no R/3 systems before this copy, then you have to complete SAP
Database Installation phases. You have to use DATABASE.R3S templete file for SAP Database
Instance installation. This file contains the following phases in 4.6C SR2. This file is usually same
in most releases. This ifle must be edited befure running with R3SETUP. Here all the phases.
Phases marked with BOLD-RED are not necessary and MUST NOT BE RUNNED. You have to
put "STATUS=OK" line at the end of all these phases by using R3EDIT, SAPPAD or NOTEPAD.
10=DATABASEINSTANCE_NT_MSS
20=DBCOMMONDBENV_NT_MSS
30=CALCRAM_NT_MSS
40=CDSERVERBASE_NT_MSS
50=OSGROUPSAPLOCAL_NT_IND
60=OSGROUPSAPLOCALADMIN_NT_IND
70=OSGROUPSAPGLOBAL_NT_IND
80=OSUSERSIDADM_NT_IND
90=OSUSERSIDADMPASSWD_NT_IND
100=OSUSERSIDADMRIGHTS_NT_IND
110=DBOSUSERMSSXP_NT_MSS
120=DBOSUSERMSSXPPASSWD_NT_MSS
130=GETDBSIZEKEYS_IND_IND
140=DBBUILDTEMPDB_NT_MSS
150=DBBUILD_NT_MSS
160=DBPOSTBUILD_NT_MSS
170=DBPRELOAD_NT_MSS
180=DBMULTISCHEMA_NT_MSS
190=DBDBSLTESTCONNECT_NT_IND
200=DBR3LOADEXECDUMMY_IND_IND
210=DBR3LOADEXEC_NT_MSS
220=DBR3LOADVIEWDUMMY_IND_IND
230=DBR3LOADVIEW_NT_IND
240=DBPOSTLOAD_NT_MSS
250=DBCONFIGURATION_NT_MSS
260=DBPROCEDURES_NT_MSS
270=DBR3LICENSECREATE_NT_MSS
280=DIPGNTAB_NT_IND
290=EXITMNLSSTARTR3_NT_IND
300=RFCRSWBOINI_IND_IND
310=RFCRADDBDIF_IND_IND
320=QUERIESFINISHED_NT_IND
After finishing Database Instance installation, you have get a new license and install onto Target
System.
Also goto SE06 and select "Database Copy or Migration" and execute "Postprocessing...".
After all, configure codepage and other settings such as default client, buffer params and so on.
11. You have completed copying an R/3 system running on NT / MSSQL platform.