Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Solved! Go to Solution.
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.
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?
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