What is the correct procedure to move my Harvest database to a new Oracle database server?
Release : 13.0.3 and higher
Component : CA Harvest Software Change Manager
In this example we will assume that the same Oracle Client installation on the broker machine will be used to connect to the Harvest database in its new location.
Linux Example (logged in as the user that owns the SCM software folder and processes):
bkrd -shutdown
pgrep rtserver | xargs kill
ps -ef | grep 'hserver\|bkrd\|rtserver'
Windows Example (from command prompt window):
bkrd -shutdown=all
(or you can go to Control Panel -> Administrative Tools -> Services and stop the CA SCM Broker Service)
rtserver -stop_all
(or you can go to Task Manager and kill the rtserver.exe process from there)
Example:
expdp <user-name>/<password> SCHEMAS=harvest DUMPFILE=harvest.dmp LOGFILE=harvest-exp.log
(On Linux you should be logged in as the “oracle” user; user-name should be Oracle system level user for example "system")
Linux Example (logged in as the “oracle” user):
$ cd /app/oracle/oradata/cl/admin/orcl/dpdump/
$ sftp <old oracle server>
@<old oracle server>'s password:
Connected to <old oracle server>.
sftp> cd /app/oracle/admin/orcl/dpdump/
sftp> get harvest.dmp
sftp> quit
Windows Example:
Use an sftp utility such as WinSCP or FileZilla, or Windows shared network drives to copy the file.
Linux Example (logged in as the “oracle” user):
$ cd /app/oracle/oradata/cl/admin/orcl/dpdump/
$ sftp <old scm server>
@<old scm server>'s password:
Connected to <old scm server>.
sftp> cd /opt/CA/scm/Database/
sftp> get crtblspc.sql
sftp> get creatusr.sql
sftp> quit
Windows Example:
Use an sftp utility such as WinSCP or FileZilla, or Windows shared network drives to copy the files.
Example:
sqlplus <user-name>/<password> @crtblspc.sql HARVESTMETA HARVESTBLOB HARVESTINDEX HarvestMeta.ora
HarvestBlob.ora HarvestIndex.ora 50 50 50 crtblspc.log
(The sizes of the tablespaces mentioned here (50 50 50) represents 50 MB which is the default for all the table spaces HARVESTMETA HARVESTBLOB HARVESTINDEX. It may be the case that the AUTO EXTEND of the table spaces could be ON or OFF as configured by the DBA. You should be aware so that you can anticipate future space requirements when used with harvest. This point could be considered and assessed by the harvest admin and the DBA.)
sqlplus <user-name>/<password> @creatusr.sql harvest harvest HARVESTMETA HARVESTBLOB HARVESTINDEX TEMP UNDOTBS1 creatusr_harvest.log
sqlplus <user-name>/<password> @creatusr.sql harrep harvest HARVESTMETA HARVESTBLOB HARVESTINDEX TEMP UNDOTBS1 creatusr_harrep.log
(On Linux you should be logged in as the “oracle” user; user-name should be Oracle system level user)
Example:
impdp <user-name>/<password> SCHEMAS=harvest DUMPFILE=harvest.dmp LOGFILE=harvest-imp.log
(On Linux you should be logged in as the “oracle” user; user-name should be SCM system administrator (default is harvest))
(On Linux you should be logged in as the “oracle” user)
(On Linux you should be logged in as the user that owns the SCM software folder and processes)
Linux Example (logged in as the user that owns the SCM software folder and processes):
./bkrd
ps -ef | grep 'bkrd\|hserver\|rtserver'
./hgetusg -b $HOSTNAME -prompt -cu ; cat hgetusg.log
Windows Example (from command prompt window):
bkrd
(or you can go to Control Panel -> Administrative Tools -> Services and start the CA SCM Broker Service)
tasklist | findstr "bkrd hserver rtserver"
(or you can go to Task Manager and check for bkrd.exe, hserver.exe and rtserver.exe processes)
hgetusg -b %COMPUTERNAME% -prompt -cu & type hgetusg.log
(or you can try to connect with Workbench)
A key factor is that the tablespace names remain the same. If this is the case for your database migration, then the above document will work.
Above condition of tablespace names holds true for Exadata based implementations of Oracle