My_diary/My operate logs.md
2024-12-10 21:55:00 +08:00

1.4 KiB

My operate logs

time: 2024-12-10 20:06


  • change ext1

    dblogin userid ggs_user, password dreamking123
    
    alter extract ext1, database, begin timestamp '2024-12-10 18:00:00'
    
    
    
  • add extract file

    add extract ext1, tranlog, begin now
    
    ADD EXTTRAIL ./dirdat/et, EXTRACT EXT1
    
    
    
    
  • define a directory

    
    Directory created.
    
    26:
    SQL> DROP DIRECTORY DATA_PUMP_DIR;
    SQL> create directory DATA_PUMP_DIR as '/mnt/ogg';
    
    
    
    24:
    SQL> DROP DIRECTORY DATA_PUMP_DIR;
    SQL> CREATE DIRECTORY DATA_PUMP_DIR AS '/data/oracle/ogg/dirdat';
    
    
    CREATE DIRECTORY NEW_DATA_PUMP_DIR AS '/data/oracle/ogg/dirdat';
    
    
  • trans database by schema

    expdp ggs_user/dreamking123 directory=DATA_PUMP_DIR dumpfile=laozhao_export.dmp schemas=laozhao
    expdp ggs_user/dreamking123 directory=DATA_PUMP_DIR dumpfile=laozhao_export.dmp schemas=laozhao logfile=laozhao_export.log
    
    
    
    impdp ggs_user/dreamking123 directory=DATA_PUMP_DIR dumpfile=laozhao_export.dmp
    impdp ggs_user/dreamking123 directory=DATA_PUMP_DIR dumpfile=laozhao_export.dmp logfile=laozhao_import.log
    
    impdp ggs_user/dreamking123 directory=DATA_PUMP_DIR dumpfile=laozhao_export.dmp logfile=laozhao_import.log TABLE_EXISTS_ACTION=REPLACE
    
    
    
    
  • sysc scn

    SQL> SELECT current_scn FROM v$database;
    
    CURRENT_SCN
    -----------
        2426704