HOW TO PERFORM BACKUP AND RESTORE USING EXPDP/IMPDP UTILITY|| ORACLE 12C || DBA FROM INDIA

Поділитися
Вставка
  • Опубліковано 7 вер 2024
  • Hi There
    In this video I have tried to explain about the EXPDP/IMPDP utility of oracle Database with practical. I Am sharing the steps below which I have performed.
    EXPORT/IMPORT (EXPDP/IMPDP):
    ==========================
    1. Create an user
    2. import some data for the schema.
    3. take export backup of the schema.
    4. drop the schema.
    5. import the schema from the export backup.
    steps:
    =====
    1. Create an user
    ==================
    create user TEST_02 identified by "Abc#123";
    grant connect,create session, resource to test_02;
    grant dba to test_02;
    2. import some data for the schema.
    ===================================
    connect TEST_02/Abc#123
    create table test_tbl (
    id number,
    name varchar2(20));
    insert into test_tbl values(1, 'A');
    insert into test_tbl values(2, 'B');
    insert into test_tbl values(3, 'C');
    insert into test_tbl values(4, 'D');
    insert into test_tbl values(5, 'E');
    insert into test_tbl values(6, 'F');
    insert into test_tbl values(7, 'G');
    commit
    select * from test_tbl;
    3. take export backup of the schema.
    ====================================
    create a directory:
    -------------------
    CREATE [OR REPLACE] DIRECTORY directory_name AS 'path_name';
    CREATE OR REPLACE DIRECTORY EXPDP AS '/u02/export_bkp';
    nohup expdp \'/ as sysdba\' directory=EXPDP dumpfile=TEST_02.dmp logfile=test_02_bkp.log schemas=TEST_02 &
    tail -20f test_02_bkp.log
    4. drop the schema
    ===================
    drop user TEST_02 cascade;
    5. import the schema from the export backup.
    ============================================
    nohup impdp \'/ as sysdba\' directory=EXPDP dumpfile=TEST_02.dmp logfile=import_test_02_bkp.log schemas=TEST_02 &
    select count(*) from TEST_02.TEST_TBL;
    COUNT(*)
    ----------
    7
    select username,account_status from dba_users where username like '%TEST_02%';
    select * from TEST_02.TEST_TBL;
    #backup #backupandrestore #oracle #oracledba #expdp
    #impdp #exportimport #12c #dba #oracledatabasetutorial
    #practical

КОМЕНТАРІ • 3