Highlighted
Absent Member.. Absent Member..
Absent Member..
1171 views

How to refresh Test from Prod

Jump to solution

On SM 7.11 with Oracle dbms.  We have a Production system and a test system. The data in the test system is getting quite old. What can I do, without involving the DBAs, like a dump/re-load, to refresh the data in Test from Prod?

Any tips welcomed. Thanks!

0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.. Absent Member..
Absent Member..

It Worked! Here is what we did:

Our Unix Admin took a backup of the database, and used that. We do this process frequently for Oracle, so he knew what he was doing.

I asked our DBA to start the Oracle listener.

Then I connected to the database using an SQL editor (we use Benthic Golden).

I did this query: select * from INFOOLDM1

This returned only 25 records, so  I looked for the scdb.system record, it was there.

Deleted the scdb.system record with:

   delete from INFOOLDM1 where "TYPE"='scdb.system' and format='info.system';
   commit;

Started the Service Manager service with smstart.

Connect using Client - It Works!

Thanks everyone.

 

View solution in original post

0 Likes
9 Replies
Highlighted
Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class

I suppose my question is why wouldn't you want to involve your DBAs? Surely it should be a quick and easy process for them to refresh it using the latest database backup from Prod?

 

Otherwise you could perhaps try and do an unload of the entire probsummary table, but i'm not sure if that's a recommended action to take, or even how long it would take.

0 Likes
Highlighted
Fleet Admiral Fleet Admiral
Fleet Admiral

Hello,

Backuping the production and restoring the production backup on the test is not solution? Or you dont have access to DB?

 

The worst  solution might be using unloads but i am pretty sure that you will forget to unload something necessary unless you unload almost everything.

Highlighted
You can use the sm -system_unload to unload the data from production and use the sm -system_load to load those data into your test system.

\RUN sm -system_load -system_directory:C:\xxxx
The same for system_unload

For some reasons i cannot find it on the help server.
Shut a post if you need more info....
Highlighted
Absent Member.. Absent Member..
Absent Member..
We tried doing an Oracle back and restore to Test about 18 months ago and it failed. Was not documented properly, but now we are reluctant to do this. Seems there was a conflict, like with a license key or something that identified the server, and it it was not the right server, the backup could not be used.
0 Likes
Highlighted
Absent Member.
Absent Member.
Hi,
DB restoring is the only easy way to do so.Just askl your DBA team to export all the data from prod DB and to import in test DB.
It is easy to do.Just a single line command from DB side will do the import /export.

hth,
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
Highlighted
Absent Member.
Absent Member.

As already mentioned, restoring a copy/backup of the PROD Oracle database is the appropriate option.

 

There could be a simple fix if SM failed to start with an "already running" message in the log file. Either delete the scdb.system record in the info file or run sm -unlockdatabase in current versions of SM.

Highlighted
Fleet Admiral
Fleet Admiral

Hi

 

    I recommend using oracle export/import functionality. You can use either

 

   exp/imp commands to export data from production server to test server

 

   or

 

   expdp/impdp commands to export data from production server to test server.

 

   Using either commands you can export/import data from unix to windows or from windows to unix servers.

 

   For help on this commands, please refer Oracle documentation.

 

   You need to keep following things in mind before export/import,

 

   1.    Oracle version should be the same both in production and test server

   2.    Oracle character set should be the same in production and test server

   3.    SM Tablespace/DB name should be same in production and test server

   4.    Look out sm.ini files in your production server and note down the Oracle user and create the same user

          in Test server Oracle system and then do the import of data.

 

-R.

Highlighted
Absent Member.. Absent Member..
Absent Member..

It Worked! Here is what we did:

Our Unix Admin took a backup of the database, and used that. We do this process frequently for Oracle, so he knew what he was doing.

I asked our DBA to start the Oracle listener.

Then I connected to the database using an SQL editor (we use Benthic Golden).

I did this query: select * from INFOOLDM1

This returned only 25 records, so  I looked for the scdb.system record, it was there.

Deleted the scdb.system record with:

   delete from INFOOLDM1 where "TYPE"='scdb.system' and format='info.system';
   commit;

Started the Service Manager service with smstart.

Connect using Client - It Works!

Thanks everyone.

 

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

The alternate way to remove the entry of the production server from the INFOOLDM1 file is to run the following cmd from the RUN directory of the SM server you are trying to implement

 

RUN>sm -unlockdatabase

 

it does the same thing which you did in the following. These are equivalent cmds, one from the SM server and one from the oracle backend database.

 

  SQLPLUS> delete from INFOOLDM1 where "TYPE"='scdb.system' and format='info.system';
   commit;

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.