Oracle DBA

How to move Oracle control files to different directory

No GoodNeed ImprovementOKGoodExcellent (No Ratings Yet)
Loading ... Loading ...

1, shutdown database.

shutdown immediate;

2, edit Oracle init.ora file, e.g., C:\Oracle\admin\Unanet\pfile, find the line with control file location, change the location from old directory to new directory, e.g.:

OLD:

control_files=("H:\Oradata\Unanet\Unanet\control01.ctl", "H:\Oradata\Unanet\Unanet\control02.ctl", "H:\Oradata\Unanet\Unanet\control03.ctl")

NEW:

control_files=("J:\Oradata\Unanet\control01.ctl", "J:\Oradata\Unanet\control02.ctl", "J:\Oradata\Unanet\control03.ctl")

save init.ora file.

3, create spfile from pfile:

create spfile from file='C:\Oracle\admin\Unanet\pfile\init.ora';

4, Copy control files from old directory to new directory

copy H:\Oradata\Unanet\Unanet\*.ctl J:\Oradata\Unanet

5, startup database.

SQL> startup
ORACLE instance started.

Total System Global Area 1426063360 bytes
Fixed Size 2004264 bytes
Variable Size 352324312 bytes
Database Buffers 1056964608 bytes
Redo Buffers 14770176 bytes
Database mounted.
Database opened.
SQL>

Popularity: 2%

Comments

How to use more than 4 GB of RAM for Oracle database on 32 bit Windows using AWE

No GoodNeed ImprovementOKGoodExcellent (No Ratings Yet)
Loading ... Loading ...

How to use more than 4 GB of RAM for Oracle database on 32 bit Windows using AWE(Advanced Windowing Extentions, or another term: Physical Address Extensions, PAE)

Configure Windows and Oracle using the following steps.

1, Make sure you have installed one of the following OS software:

* Windows 2000 Datacenter Server
* Windows 2000 Advanced Server
* Windows 2003 Data Center Edition (32-Bit)
* Windows 2003 Enterprise Edition (32-Bit)

Other OS version won’t work. For example, if you have installed Windows 2003 Standard Edition, sorry, you are out of luck.

If you have installed 64-Bit Windows operating systems, there is no need for AWE. You can use up to 8 terabytes of memory for a single processor on 64-Bit Windows.

2, The following Oracle versions will support AWE:

* Oracle 8.1.6.x
* Oracle 8.1.7.x
* Oracle 9.2.x
* Oracle 10g.

3, Enabling support at the OS level. AWE can be enabled at the OS by adding the /PAE switch to the boot.ini:

multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Advanced Server" /PAE

another example is to use this:

multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Advanced Server" /3GB /PAE

These configurations will allow Oracle to use up to 16 Gbytes of RAM.

4, Grant ‘Lock Pages in Memory’ Operating System Privileges to OS Oracle user account.

Go to Start -> Programs -> Administrative Tools -> Local Security Policy (on a Domain Controller, click on ‘Domain Security Policy’ instead of ‘Local Security Policy’), Double-click on the ‘Lock Pages in memory’ policy, Add the appropriate user and click ‘Ok’.

5, Set AWE_WINDOW_MEMORY to desired value. The size of AWE_WINDOW_MEMORY is defined by a registry setting in the HOME key for Oracle (HKLM\Software\Oracle\Homex) called AWE_WINDOW_MEMORY. If this value is not set in the registry, the size of AWE_WINDOW_MEMORY is 1GB by default.

6, Enabling AWE Support at the Database/Instance Level:

To enable the AWE implementation on Oracle, you must set the following parameter in the init file (or spfile) used to start the instance:

USE_INDIRECT_DATA_BUFFERS=TRUE

The total size of the buffer cache can then be set to the amount of physical memory remaining above the 4GB barrier, plus AWE_WINDOW_MEMORY. For example, on a server machine with 12GB of RAM, your total buffer cache could be set as high as 9GB if default value of 1GB is used for AWE_WINDOW_MEMORY:

(Total RAM - 4GB + AWE_WINDOW_MEMORY) = 12GB - 4GB + 1GB = 9GB

So with 8K block size (8192), you can set 9 Gbyte for DB_BLOCK_BUFFERS. You sould comment out dynamic parameter DB_CACHE_SIZE=xxxxx because DB_CACHE_SIZE and DB_BLOCK_BUFFERS are mutual exclusive.

DB_BLOCK_SIZE = 8192
DB_BLOCK_BUFFERS= 1179648

SGA_TARGET=0

But you should set DB_BLOCK_BUFFERS to smaller value to allow additional processes running on the system to use the memory.

7, Restart database.

Popularity: 3%

Comments

RMAN backup failed after issuing “alter database open resetlogs” command

No GoodNeed ImprovementOKGoodExcellent (No Ratings Yet)
Loading ... Loading ...

You did a restore and recovey, and then open database using this command:

Alter database open resetlogs;

Now you want to do a full backup but failed with the following error message:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS
RMAN-00571: ===============================================
RMAN-03002: failure of crosscheck command at 04/15/2007 10:59:36
RMAN-12010: automatic channel allocation initialization failed
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20003: target database incarnation not found in recovery catalog

What you should do is to recreate RMAN catalog schema and catalog.

1, create RMAN catalog schema.

sqlplus /nolog
connect sys/xxx@rman as sysdba

create tablespace rmancatalog datafile 'C:\Oracle\oradata\Rman\rmancatalog.dbf' size 50m;

create user rmanager identified by xxx
temporary tablespace temp
default tablespace rmancatalog
quota unlimited on rmancatalog;

grant recovery_catalog_owner, connect, resource to rmanager;

exit;

2, Recreate catalog

dos>rman catalog rmansiit/xxx@rman target sys/xxx@crm

RMAN> create catalog tablespace rmancatalog;

recovery catalog created

RMAN> register database;

database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

#run once
RUN {
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
configure channel device type disk format = “L:\Rman_backup\%d_%u_%s_%p” MAXPIECESIZE 15000m;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘L:\Rman_backup\%d_%F.ctl’;
configure maxsetsize to 15000m;
}

Popularity: 3%

Comments

« Previous Next »