Sie sind auf Seite 1von 3

ORACLE DBA……………………………………………………

BASIC :

STEP 1 root@dba19 ~]# su – oracle


STEP 2 [oracle@dba19 /]$ cd $ORACLE_HOME
STEP 3 [oracle@dba19 db_2]$ ls
STEP 4 oracle@dba19 ~]$ sqlplus
Enter user-name: / as sysdba
SQL> startup

………………………………………………………………………
MULTIPLEXING CONTROL_FILES USING SPFILE.
STEP1:
STARTUP DATABASE SQL> startup

1.show parameter spfile;


2. show parameter control_files;

3. alter system set control_files='


/dbfiles/oracle/oracle/product/10.2.0/db_2/oradata/db1/control01.ct
l’
‘/dbfiles/oracle/oracle/product/10.2.0/db_2/oradata/db1/control02.c
tl’,’/dbfiles/oracle/oracle/product
/10.2.0/db_2/oradata/db1/control03.ctl' scope=spfile;
SHUT IMMEDIATE SQL> shut immediate
STEP2:
Making a duplicate copies of control_files in different memory
locations.

ba19 ~]$ cd $ORACLE_HOME/oradata

[oracle@dba19 oradata]$ ls

db1

[oracle@dba19 oradata]$ cd db1/


[oracle@dba19 db1]$ cp control01.ctl control03.ctl

Enable/Disable Archive Log Mode 10g/11g

Note: It is recommended to perform a backup of the database (after a shutdown normal or immediate) prior to
changing thearchive status of a database.

Enable Archive Log Mode
The following are the steps required to enable archive log mode on an Oracle 10g or 11g database.

Verify the database log mode.


$ sqlplus / as sysdba
Startup
The log mode is No Archive Mode. Note that Archive destination is USE_DB_RECOVERY_FILE_DEST. You
can determine the path by looking at the parameter RECOVERY_FILE_DEST.
SQL> show parameter recovery_file_dest
By default, archive logs will be written to the flash recovery area. If you do not want to write archive logs to
the flash recovery area you can set the parameter LOG_ARCHIVE_DEST_n to the location in which you
wish to write archive logs.
alter system set
log_archive_dest_1='LOCATION=/u02/app/oracle/oradata/orcl/arch' scope = both;
 
System altered.
archive log list;
Now we shutdown the database and bring it backup in mount mode.
SQL> shutdown immediate

Lastly all that is needed it set archive log mode and open the database

SQL> alter database archivelog;


 
Database altered.
Disable Archive Log Mode
Note: It is recommended to perform a backup of the database (after a shutdown normal or immediate) prior to
changing thearchive status of a database.
The following are the steps required to disable archive log mode on an Oracle 10g or 11g database.
Verify the database log mode.
[oracle@ora1 ~]$ sqlplus / as sysdba
The Database log mode is Archive mode. Next we shut down the database and bring up back up in
mount mode.
SQL> shutdown immediate
All that is left is to disable archive log mode and open the database.
alter database noarchivelog;
SQL> alter database open
Manageing tablespaces and datafiles
desc dba_tablespaces;
desc dba_data_files;
desc dba_extents;

select a.file_id,b.file_name,b.autoextensible,b.bytes/1024/1024,sum(a.bytes)/1024/1024
from dba_extents a , dba_data_files b
where a.file_id=b.file_id
group by a.file_id,b.file_name,b.autoextensible,b.bytes/1024/1024

create table space.


create tablespace test datafile
'/dbfiles/oracle/oracle/product/10.2.0/db_2/oradata/db1/test01.dbf' size 10m autoextend
on next 5m maxsize 200m
SQL> /

Tablespace created.
Locally managed tablespaces
Create table space local datafile
'/dbfiles/oracle/oracle/product/10.2.0/db_2/oradata/db1/local01.dbf' size 50m extent
management local uniform size 256k
SQL> /

Tablespace created.

Das könnte Ihnen auch gefallen