Sunday, May 24, 2020

To change the db into archivelog mode

First check if the DB is runing on pfile or spfile

Below is the steps if DB is in spfile.


SQL> archive log list;
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     10
Current log sequence           12

----- first check in the pfile we do not have any entires of archive dest -- for the first time

SQL>alter system set log_archive_dest_1='LOCATION=C:\oracle\dbi\product\11.2.0\dbhome\database\archive' scope=spfile;

SQL> shutdown  immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup mount;
ORACLE instance started.

Total System Global Area  744910848 bytes
Fixed Size                  1374696 bytes
Variable Size             276825624 bytes
Database Buffers          461373440 bytes
Redo Buffers                5337088 bytes
Database mounted.

SQL> alter database archivelog;

Database altered.

SQL> alter database open;

Database altered.

SQL> select name,log_mode from v$database;

NAME      LOG_MODE
--------- ------------
SIT01     ARCHIVELOG

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            C:\oracle\dbi\product\11.2.0\dbhome\database\archive
Oldest online log sequence     10
Next log sequence to archive   12
Current log sequence           12

create the new pfile and we can see entires of archive path.




user level export and import

expdp parfile=PLCT170.par oracle@uslp123sd7dfcvxsza > more PLCT050.par userid= "/ as sysdba" dumpfile=T050.dmp logfile=expdpT0...