cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Oracle Database import question

HK_10985243
1-Newbie

Oracle Database import question

I am using Windchill PDMLink Release 11.1 and Datecode with CPS M020-CPS27

Can we import database using the following command: (This command has exclude=statistics)
impdp system/manager@wind directory=export dumpfile=EXPDP_acumedprd_19032023_01.dmp,EXPDP_acumedprd_19032023_02.dmp,EXPDP_acumedprd_19032023_03.dmp,EXPDP_acumedprd_19032023_04.dmp exclude=statistics LOGFILE=import_acumedprd.log schemas=acumedprd
And then run the following command as per article https://www.ptc.com/en/support/article/CS129969 to gather statistics manually:
execute dbms_stats.gather_schema_stats('DBUSER', DBMS_STATS.AUTO_SAMPLE_SIZE , CASCADE =>TRUE);
1 ACCEPTED SOLUTION

Accepted Solutions
BenLoosli
23-Emerald II
(To:HK_10985243)

Here is what I do:

a. Export the current database with the expdp command and Windchill shutdown

expdp System/@wind schemas=PDM directory=expdp_full dumpfile=full_exp.dmp exclude=statistics logfile=full_expdp.log

b. Import the Oracle backup into the PDM user space

Impdp System/<password>@wind  schemas=PDM directory=expdp_full dumpfile=full_exp.dmp logfile=full_imp.txt

c. Gather DB Statistics

SQLplus PDM/<password>@wind

Execute dbms_stats.gather_schema_stats(‘PDM’,DBMS_STATS.AUTO_SAMPLE_SIZE, CASCADE =>TRUE

 

I do not see any reason your method should not work since in both cases the statistics are not part of the imported DB.

View solution in original post

1 REPLY 1
BenLoosli
23-Emerald II
(To:HK_10985243)

Here is what I do:

a. Export the current database with the expdp command and Windchill shutdown

expdp System/@wind schemas=PDM directory=expdp_full dumpfile=full_exp.dmp exclude=statistics logfile=full_expdp.log

b. Import the Oracle backup into the PDM user space

Impdp System/<password>@wind  schemas=PDM directory=expdp_full dumpfile=full_exp.dmp logfile=full_imp.txt

c. Gather DB Statistics

SQLplus PDM/<password>@wind

Execute dbms_stats.gather_schema_stats(‘PDM’,DBMS_STATS.AUTO_SAMPLE_SIZE, CASCADE =>TRUE

 

I do not see any reason your method should not work since in both cases the statistics are not part of the imported DB.

Top Tags