oracle deployment
Enter the oracle-docker directory under hoslink
[root@stpass-15 oracle]# chown -R 1000:1000 dpdump
[root@stpass-15 oracle]# chmod +x run [root@stpass-15 oracle]#./run
Create tablespaces and users
[root@stpass-15 oracle]# docker exec -it oracle bash
root@oracle_db:/# cd init root@oracle_db:/init# sqlplus sys/oracle as sysdba; SQL> @000-install.pdc
Fill in the corresponding content and press Enter, which are:
- car
- /u01/app/oracle/admin/XE/dpdump/
- oracle
The creation and authorization of tablespaces and users can be completed.
import database
root@oracle_db:/init# sqlplus sys/oracle as sysdba;
SQL> GRANT READ,WRITE ON DIRECTORY DATA_PUMP_DIR to system;
SQL> exit
root@oracle_db:/init# impdp system/oracle@xe directory=DATA_PUMP_DIR dumpfile=synergy20180306.dmp table_exists_action=replace schemas=synergy,ids logfile=synergy.log
Solve the problem that the WM_CONCAT function is not found
root@oracle_db:/init# sqlplus sys/oracle as sysdba;
SQL> @owmaggrb.plb
If the execution result reports an error saying that the WMSYS user cannot be found, execute @owmctab.plb, and then execute @owmaggrs.plb and @owmaggrb.plb.
Change the valid time of the password to permanent and system user password
root@oracle_db:/init# sqlplus sys/oracle as sysdba;
SQL> select * from dba_profiles where profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME'; SQL> alter profile default limit password_life_time unlimited; SQL> commit; SQL> select * from dba_profiles where profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME'; SQL> alter user system identified by springiscoming; SQL> commit; SQL> exit root@oracle_db:/init# exit
Database export (database backup use)
root@oracle_db:/init# expdp system/oracle@xe directory=DATA_PUMP_DIR content=METADATA_ONLY dumpfile=synergy20180306.dmp schemas=synergy,ids logfile=synergy.log