cancel
Showing results for 
Search instead for 
Did you mean: 

system copy

Former Member
0 Kudos

We have an three-system landscape, which is made up of Development, Quality and Production. We want to refresh the data of the QAS system (client 500) with the data of the PRD system (client 500). We are reviewing the "Homogeneous and Heterogeneous system copy for sap systems based on sap web application server ABAP 6.40 SR1"

The systems are ECC5 Abap. We want to know if is necessary with this procedure to erase the central instance, the database and the database engine, or only copying the database is sufficient.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Dear

kindlly do that

HOMOGENOUS SYSTEM COPY MSSQL DETACH AND ATTACH METHOD

SOURCE (PRD)

1) Mssql query analyzer detach the

Master data file (.mdf) example: 'D:\PRDDATA1\PRDDATA1.mdf',

Additional data file (.ndf) example: 'D:\PRDDATA2\PRDDATA2.ndf',

Additional data file (.ndf) example: 'D:\PRDDATA2\PRDDATA2.ndf',

Log data file (.ldf) example: 'D:\PRDLOG1\PRDLOG1.ldf'

Use master

exec sp_detach_db 'PRD', true

2) Copy the master, additional and log data file and rename them as Target system SID, for example target system SID is DEV.

Do internal renaming of data files (inside the attach file box) for target Sid.

'D:\DEVDATA1\DEVDATA1.mdf',

'D:\DEVDATA2\DEVDATA2.ndf',

'D:\DEVDATA3\DEVDATA3.ndf',

'D:\DEVLOG1\DEVLOG1.ldf'

TARGET SYSTEM (DEV)

1) Operating System (same as source os)

2) Os service pack

3) Assign IP

4) Install Java and set environmental variables. And compile and run it.

5) Install Mssql2000 (4.6cbat), Servicepack, Hotfix, Instcoll

6) So by this your RDBMS will be installing and it is ready now so check the database is successfully up or not by starting from enterprise manager....

7) Go to query analyzer in that paste the master, additional and log data file.

..execute sp_attach_db.

Use master

exec sp_attach_db 'DEV',

'D:\DEVDATA1\DEVDATA1.mdf',

'D:\DEVDATA2\DEVDATA2.ndf',

'D:\DEVDATA3\DEVDATA3.ndf',

'D:\DEVLOG1\DEVLOG1.ldf'

Should be successfully completed...

7) Install Central Instance (keep SID for example DEV)G:\sapcd\SAPINST\NT\I386

😎 Once C.I finished

Now in central instance 2 users are created sidadm and sap service Sid as os level.

Now there are no users in data base so manually create the users in data base.

How to create....

Open Ur enterprise manager in that go with Ur master data base in left side in that right click properties in that we are having the users which is created in central instance so plz add the users by windows authentication and manually add the 2 users....

now we have to run the schema....

- Login as Sidadm now

Open Ur query analyzer in that we have to run the script sap note attach script

Cntrl A script (cntrl C) paste it

Cntrl E to execute.

IT WILL SAY ABOUT THE EXISTING DATA BASE...

9) As of this stage, you can execute sp_check_sap_login in your database:

1. Log on to the database server as <Sid>adm.

2. Start the SQL Query Analyzer and connect to the required SQL Servers instance with "Windows authentication".

3. Execute the following SQL command in text mode (Ctrl-T and Ctrl-E):

• sp_check_sap_login

As the result, you get an overview of all databases and schemas

9) Before running this script, replace the following

-- @NAME@ - your <SID> in lowercase (prd for example).

-- @PASSWORD@ - a password for your Sid login which will be created ex:

-- @DB_SID@ - your <SID> in uppercase (same as the db name)

-- @HOSTNAME@ - your computer host name

-- @PASSWORD1@ - password of local user SAPMssXPUser

-- @SIDADM@ - DOMAIN\sidadm, the r3 system administrator OS login. PROD\prdadm for example

-- NOTE: The case is important. Should be all lowercase.

-- @SAPSERVICE@ - DOMAIN\SAPServiceSID, the r3 service OS login. PROD\SAPServicePRD for example

-- NOTE: Case is also important here, and it should be exactly as shown above.

REPALACE ALL THIS THINGS ACCORDING TO THE SCRIPT AND AND THEN AGAIN OPEN UR QUREY ANALYZER

CNTRL A

CNTRL C

OPEN QUERY ANALYZER IN THAT

CNTRL T

CNTRL E

THIS WILL AUTOMATICALLY EXECUTE AND UR DATA BASE WILL COME UP AUTOMATICAALLY ONCE THIS IS SUCCESSFULLY EXECUTED...

use master

EXEC sp_addlogin '@NAME@', '@PASSWORD@', @DB_SID@

go

use @DB_SID@

EXEC sp_change_users_login 'Update_One','@NAME@','@NAME@'

EXEC sp_grantdbaccess '@NAME@'

EXEC sp_addrolemember 'db_owner', '@NAME@'

go

use master

EXEC sp_grantdbaccess '@NAME@'

EXEC sp_addrolemember 'db_owner', '@NAME@'

go

use msdb

EXEC sp_grantdbaccess '@NAME@'

EXEC sp_addrolemember 'db_owner', '@NAME@'

go

use model

EXEC sp_grantdbaccess '@NAME@'

EXEC sp_addrolemember 'db_owner', '@NAME@'

go

use tempdb

EXEC sp_grantdbaccess '@NAME@'

EXEC sp_addrolemember 'db_owner', '@NAME@'

go

use master

grant all on xp_cmdshell to @NAME@

go

EXEC sp_addsrvrolemember '@NAME@', 'serveradmin'

EXEC sp_addsrvrolemember '@NAME@', 'dbcreator'

EXEC sp_addsrvrolemember '@NAME@', 'bulkadmin'

go

if @@microsoftversion / power(2, 24) < 9

EXEC xp_sqlagent_proxy_account 'SET', '@HOSTNAME@', 'SAPMssXPUser', N'@PASSWORD1@'

go

EXEC sp_grantlogin '@SIDADM@'

EXEC sp_grantlogin '@SAPSERVICE@'

EXEC sp_defaultdb '@SIDADM@','@DB_SID@'

EXEC sp_defaultdb '@SAPSERVICE@','@DB_SID@'

go

EXEC sp_addsrvrolemember '@SIDADM@', 'sysadmin'

EXEC sp_addsrvrolemember '@SAPSERVICE@', 'sysadmin'

go

Regards

Pritpal

Former Member
0 Kudos

Hi Victor,

In my opinion it is not necessary to wipe out central instance but you need to clear database folder before you import/restore.

-Pinkle