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

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

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

3 REPLIES 3
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.

Are you still dropping WCUSER before importing the new dumpfile?

BenLoosli
23-Emerald II
(To:CH_11033329)

Yes

 Between step a and b, I do the following:

Drop user <pdm_username>

@create_user.sql - this will ask for 3 pieces of infomeation

PDM username

Temp Tablespace name - TEMP

Userdata Tablesapce name - USERS

 

 

Top Tags