Technology Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
sajaysurya7
Explorer
997

Introduction : 

In this blog, we will go thought the steps involved in system refresh(entire database) of convergent charging from non-production to production environment.

Version : 

Applicaition : Convergent Charging 5.0

Database : Sybase ASE 16

Steps to be followed :

1. Take a export of jco destination export using below command .

E:\usr\sap\SID\DBname\script>setup.bat jcodestination export SID_200 F:\jcodest.xml

Hardware key was retrieved.

Hardware key was retrieved.

Login: admin

Password:

ERP JCo destination export successful

2. Exporting all the below tables using Interactive SQL commands.

 

1.png

3. Exporting all the required tables using bcp utility batch file

Go to the BCP utility batch file in the \sybase\OCS-16\bin directory and export all the required tabled. Refer to the below sap help blog for the list of tables that needs to be exported.

link: https://help.sap.com/docs/Convergent_Charging/d1d04c0d65964a9b91589ae7afc1bd45/2b32e184c4ce49ae99031...

E:\sybase\OCS-16_0\bin>bcp SID.dbo.LICENSE out F:\bcpnew1\LICENSE.out -c -Usa -PPassword -SCHPRD

Use the same command to export all the remaining tables based on the help document which is pasted above.

4. Exporting the CONFIGURATION table 

2.png

We have to export the configuration table row by row. There is some xml format lines involved in the configuration table. Hence we have to export the 21 rows one by one.

In our case, there was 21 rows in configuration table. TWe exported all the rows as 2 files.

bcp SID.dbo.CONFIGURATION out F:\bcpconfigout\CONFIGURATION1.out -c -Y -Usa -PPassword -SCHPRD -t/t -F1 -L1

bcp SID.dbo.CONFIGURATION out F:\bcpconfigout\CONFIGURATION1X.out -n -Y -Usa -PPassword -SCHPRD -t/t -F1 -L1

bcp SID.dbo.CONFIGURATION out F:\bcpconfigout\CONFIGURATION2.out -c -Y -Usa -PPassword -SCHPRD -t/t -F2 -L2

bcp SID.dbo.CONFIGURATION out F:\bcpconfigout\CONFIGURATION2X.out -n -Y -Usa -PPassword -SCHPRD -t/t -F2 -L2

Repeat for all the 21 rows. Should get you 42 files in total.

5. Export the configtool output

Now take a configuration export using the config tool

11.png

 

6. Take a dump database backup of the target CC (NON PRD) and source CC (PRD) database and move the PRD database dump into NON-PRD server.

 

7. Turn off the SAP Convergent Charging application instances.

 

12.png

8. Changing the Sybase bulkcopy setting to true

1> sp_dboption <database_name>,

2> "select into/bulkcopy", true

3> go

1> use <database_name>

2> go

9. Restore the NON-PRD database with PRD dump file

 

Now restore the NON-PRD dump into PRD database using load command.

3.png

Load database <PRD databaseSID> from <dump file with directory>

 

10. Bring the database online using the below command

ONLINE DATABASE <database name>

Screenshot 2024-08-24 230219.png

11. Emptying the database tables in the target system post restore

Now Open Interactive SQL and empty all the tables(tables exported in the first step) using delete command similar to below.

14.png

If the tabled are marked with Overwrite in the SAP help blog(attached below), use the below bcp import command for the tables which needs to be overwritten.

REF : CC COPY BLOG

 

12. Importing the tables(except configuration table) using bcp utility batch file

E:\sybase\OCS-16_0\bin>bcp SID.dbo.LICENSE in F:\bcpnew1\LICENSE.out -c -Y -Usa -PPassword -SCHPRD

Repeat the same command for the all the other tables except for configuration table.

        12.1 CONFIGURATION table bcp import :

We have taken configuration table export row by row(each row as 2 files). Now there are two type of values in the configuration table and for both, we have to follow different import command.

 

  • Rows with xml content, use the below command to import –

E:\sybase\OCS-16_0\bin>bcp SID.dbo.CONFIGURATION in F:\bcpconfigout\CONFIGURATION4.out -c -Y -Usa -PPassword -SCHPRD -t/t -F1 -L1

Note : no need to import configuration4X.out.

  • Rows with ## content, use the below command to import –

E:\sybase\OCS-16_0\bin>bcp SID.dbo.CONFIGURATION in F:\bcpconfigout\CONFIGURATION4X.out -n -Y -Usa -PPassword -SCHPRD -t/t -F1 -L1

Make sure to do it in order one by one and compare it with the previous export file. It values of configuration table should be similar to the values which were present before the restore of NON-PRD.

 

13. Import the configtool xml file 

The  configtooloutput exported in the step 5 need to be imported using the below command.

13.png

14. Import the jco destination file using below command.

setup.bat jcodestination import ERP SID_200 F:\ jcodest.xml

note : if xml import is not working, try to import the same file in text formart.

 

15. Changing ERP JCO destination using Core tool.

Make sure you have the same JCO destination which was present before the restore.

13.png

Choose the appropriate ERP Jco destination of non-prd.

 

16. Start the SAP application instances now.

 

Reference: CC COPY - SAP Help Portal 

 

 

 

 

 

 

 

 

1 Comment