Oracle® Application Server Administrator's Guide
10g Release 2 (10.1.2) Part No. B13995-01 |
|
![]() Previous |
![]() Next |
This chapter provides information on managing OracleAS Metadata Repository.
It contains the following topics:
Frequently Asked Questions About OracleAS Metadata Repository
Renaming and Relocating Oracle Metadata Repository Datafiles
OracleAS Metadata Repository is an Oracle Database 10g database and can be managed using standard database procedures and tools. However, there are some considerations for managing OracleAS Metadata Repository within the Oracle Application Server environment. This section answers frequently asked questions about managing the Metadata Repository.
What is a Metadata Repository?
A Metadata Repository is a database. It is pre-seeded with schemas to support Oracle Application Server components and services.
See Also: Appendix E, "Metadata Repository Schemas" for information on the schemas that are pre-seeded in the Metadata Repository |
When is a Metadata Repository required?
A Metadata Repository is required by the following installations:
An Identity Management installation requires a Metadata Repository for Identity Management schemas.
A J2EE and Web Cache installation that is part of an OracleAS Cluster Managed using a Database Repository requires a Metadata Repository for the Management (DCM) schema.
A Portal and Wireless installation requires a Metadata Repository for Product Metadata schemas.
A Business Intelligence installation requires a Metadata Repository for Product Metadata schemas.
How can I obtain a Metadata Repository?
You can obtain a Metadata Repository in either of the following ways:
You can install a Metadata Repository as part of an Infrastructure installation with Oracle Universal Installer. This installs the Metadata Repository from scratch.
See Also: Oracle Application Server Installation Guide |
You can install a Metadata Repository into an existing database using the Oracle Application Server Metadata Repository Creation Assistant.
See Also: Oracle Application Server Metadata Repository Creation Assistant User's Guide |
Are there any tools for managing the Metadata Repository?
You can use Oracle Enterprise Manager, refer to Section 2.5, "Managing the OracleAS Metadata Repository Database with Database Control".
Can I use the Metadata Repository to deploy applications?
No. The Metadata Repository is not supported for deploying applications.
Are there any database features that are not supported by the Metadata Repository?
The following tablespace management features are not supported:
Using ALTER TABLESPACE
to assign a different default tablespace to a user
Using ALTER TABLESPACE
to reduce the number of tablespaces that were created when you initially created the Metadata Repository
Renaming a tablespace
It is, however, possible to use ALTER TABLESPACE
to do segment management using autoextend or any other feature.
Can a Metadata Repository coexist on a host with other databases?
Yes. As long as each database has a unique SID and global database identifier. The databases may be able to share a Net listener as follows:
Multiple Oracle9i and Oracle 10g databases can share the same Net listener port. If the other databases on your host are Oracle9i or Oracle 10g databases, the Metadata Repository can use the same Net listener port (for example, 1521) as the other databases.
If the other databases on your system are Oracle8i databases running Oracle Net8 listener, then the Metadata Repository must use a different port for its Net listener.
Can I change the Metadata Repository Net listener port after installation?
Yes. Refer to Section 4.4.1, "Changing theOracleAS Metadata Repository Net Listener Port".
Can I change the Metadata Repository SID and global database name after installation?
No. This is not supported.
Can I change the character set of the Metadata Repository?
Yes. Follow the instructions for changing the character set in the database documentation, then refer to Section 6.5, "Changing the Character Set of Oracle Metadata Repository" for updates you need to make to Oracle Application Server.
Can I tune the Metadata Repository?
Yes, you can apply database tuning strategies to the Metadata Repository.
One important point to be aware of is that the processes and sessions parameters in the Oracle init$SID.ora
configuration file should be tuned to allow the Metadata Repository to handle the maximum number of database sessions used by Oracle Application Server middle-tier installations, or other middle-tier installations accessing the Metadata Repository.
The primary consumers of database sessions are OracleAS Portal and OracleAS Wireless. An init$SID.ora
setting of processes=150 should support four middle-tier installations that include these components. Note that an OracleAS Portal best practice recommendation is to relocate the Portal instance out of the Infrastructure, which would reduce the database connections requirement.
See Also: Oracle Application Server Performance Guide for a detailed description of the database connection usage ofmod_plsql in an OracleAS Portal installation
|
Can I change Metadata Repository schema passwords?
Yes. However, you must make sure to use the correct procedure. Some schemas store their passwords in Oracle Internet Directory and you must change their passwords using the Application Server Control Console so the password is updated in Oracle Internet Directory and the database.
Can I delete schemas from the Metadata Repository that I am not using?
No. You should never delete any of the schemas that come with the Metadata Repository.
Can I rename or relocate Metadata Repository datafiles after installation?
Yes.
Can I configure my Metadata Repository for high availability?
Yes. Oracle Application Server offers high availability options for the Metadata Repository, including:
Oracle Application Server Cold Failover Cluster
Oracle Application Server Disaster Recovery
Can I enable archive logging on the Metadata Repository?
Yes. This is part of the Oracle-recommended backup and recovery strategy.
How can I backup and recover the Metadata Repository?
Oracle provides a backup and recovery strategy for your entire Oracle Application Server environment, including the Metadata Repository.
Table 6-1 shows the status of Metadata Repository schemas immediately after installation. The table contains the account status and initial password for each schema, depending on whether the Metadata Repository is registered with Oracle Internet Directory.
To unlock an account using SQL*Plus (be sure to set your ORACLE_HOME
and ORACLE_SID
environment variables before you run these commands):
ORACLE_HOME/bin/sqlplus "SYS/password_for_sys AS SYSDBA" SQL> ALTER USER schema ACCOUNT UNLOCK;
ORACLE_HOME/bin/sqlplus "SYS/password_for_sys AS SYSDBA" SQL> ALTER USER schema ACCOUNT LOCK;
The method for changing passwords varies by schema. Refer to Section 6.4, "Changing Oracle Metadata Repository Schema Passwords" to determine the proper way to change a password.
Table 6-1 Postinstallation Status of Schemas in a Metadata Repository
Schema | Account Status (Registered with Oracle Internet Directory) | Password (Registered with Oracle Internet Directory) | Account Status (Not registered with Oracle Internet Directory) | Password (Not registered with Oracle Internet Directory) |
---|---|---|---|---|
ANONYMOUS
|
OPEN | RANDOM | OPEN | RANDOM |
B2B
|
OPEN | RANDOM - Stored in Oracle Internet Directory | LOCKED | EXPIRED |
CTXSYS
|
LOCKED | RANDOM | LOCKED | RANDOM |
DBSNMP
|
OPEN | Set by user during installation | OPEN | Set by user during installation |
DCM
|
OPEN | RANDOM - Stored in Oracle Internet Directory
|
LOCKED | EXPIRED |
DIP
|
LOCKED | EXPIRED | LOCKED | EXPIRED |
DISCOVERER5
|
OPEN | RANDOM - Stored in Oracle Internet Directory | LOCKED | EXPIRED |
DMSYS
|
LOCKED | EXPIRED | LOCKED | EXPIRED |
DSGATEWAY Foot 1
|
OPEN | RANDOM - Stored in Oracle Internet Directory | LOCKED | EXPIRED |
EXFSYS
|
LOCKED | EXPIRED | LOCKED | EXPIRED |
INTERNET_APPSERVER_REGISTRY
|
LOCKED, NO CREATE SESSION | EXPIRED | LOCKED, NO CREATE SESSION | EXPIRED |
IP Foot 2
|
LOCKED | EXPIRED | LOCKED | EXPIRED |
MDDATA
|
LOCKED | EXPIRED | LOCKED | EXPIRED |
MDSYS
|
LOCKED | EXPIRED | LOCKED
|
EXPIRED |
MGMT_VIEW
|
OPEN | RANDOM | OPEN | RANDOM |
OCA
|
OPEN | RANDOM - Stored in Oracle Internet Directory | LOCKED | EXPIRED |
ODS
|
OPEN | Same as the ias_admin password supplied during installation
|
LOCKED | EXPIRED |
OEM_REPOSITORY
|
OPEN | RANDOM - Stored in Oracle Internet Directory | OPEN | RANDOM |
OLAPSYS
|
LOCKED | RANDOM | LOCKED | RANDOM |
ORAOCA_PUBLIC
|
OPEN | RANDOM - Stored in Oracle Internet Directory | LOCKED | EXPIRED |
ORASSO
|
OPEN | RANDOM - Stored in Oracle Internet Directory | LOCKED | EXPIRED |
ORASSO_DS
|
OPEN | RANDOM - Stored in Oracle Internet Directory | LOCKED | EXPIRED |
ORASSO_PA
|
OPEN | RANDOM - Stored in Oracle Internet Directory | LOCKED | EXPIRED |
ORASSO_PS
|
OPEN | RANDOM - Stored in Oracle Internet Directory | LOCKED | EXPIRED |
ORASSO_PUBLIC
|
OPEN | RANDOM - Stored in Oracle Internet Directory | LOCKED | EXPIRED |
ORDPLUGINS
|
LOCKED | EXPIRED | LOCKED | EXPIRED |
ORDSYS
|
LOCKED | EXPIRED | LOCKED | EXPIRED |
OUTLN
|
LOCKED | EXPIRED | LOCKED | EXPIRED |
OWF_MGR
|
OPEN | RANDOM - Stored in Oracle Internet Directory | LOCKED | EXPIRED |
PORTAL
|
OPEN | RANDOM - Stored in Oracle Internet Directory | LOCKED | EXPIRED |
PORTAL_APP
|
OPEN | RANDOM - Stored in Oracle Internet Directory | LOCKED | EXPIRED |
PORTAL_DEMO
|
OPEN | RANDOM - Stored in Oracle Internet Directory | LOCKED | EXPIRED |
PORTAL_PUBLIC
|
OPEN | RANDOM - Stored in Oracle Internet Directory | LOCKED | EXPIRED |
SCOTT
|
LOCKED | EXPIRED | LOCKED | EXPIRED |
SI_INFORMTN_SCHEMA
|
LOCKED | EXPIRED | LOCKED | EXPIRED |
SYS
|
OPEN | Set by user during installation | OPEN | Set by user during installation |
SYSMAN
|
OPEN | Set by user during installation | OPEN | Set by user during installation |
SYSTEM
|
OPEN | Set by user during installation | OPEN | Set by user during installation |
UDDISYS
|
OPEN | RANDOM - Stored in Oracle Internet Directory | LOCKED | EXPIRED |
WCRSYS
|
OPEN | RANDOM - Stored in Oracle Internet Directory | LOCKED | EXPIRED |
WIRELESS
|
OPEN | RANDOM - Stored in Oracle Internet Directory | LOCKED | EXPIRED |
WK_TEST
|
LOCKED | EXPIRED | LOCKED | EXPIRED |
WKPROXY
|
OPEN | RANDOM - Stored in Oracle Internet Directory | LOCKED | EXPIRED |
WKSYS
|
OPEN | RANDOM - Stored in Oracle Internet Directory | LOCKED | EXPIRED |
WMSYS
|
LOCKED | EXPIRED | LOCKED | EXPIRED |
XDB
|
LOCKED | RANDOM | LOCKED | RANDOM |
If a Metadata Repository is registered with Oracle Internet Directory, then some schema passwords are stored in the directory and you can view them using Oracle Internet Directory tools.
The following table lists the schemas whose passwords you can view in Oracle Internet Directory.
B2B | DCM | DISCOVERER5 | DSGATEWAY |
OCA | ODS | OEM_REPOSITORY | ORAOCA_PUBLIC |
ORASSO | ORASSO_DS | ORASSO_PA | ORASSO_PS |
ORASSO_PUBLIC | OWF_MGR | PORTAL | PORTAL_APP |
PORTAL_DEMO | PORTAL_PUBLIC | UDDISYS | WCRSYS |
WIRELESS | WKPROXY | WKSYS |
|
You can view the passwords using the following procedures:
Viewing OracleAS Metadata Repository Schema Passwords using Oracle Directory Manager
Viewing OracleAS Metadata Repository Schema Passwords using ldapsearch
You can view Metadata Repository schema passwords using Oracle Directory Manager as follows:
Start Oracle Directory Manager with the following command:
(UNIX) ORACLE_HOME/bin/oidadmin
(Windows) Start > Programs >
Oracle Application Server - OracleHome > Integrated Management Tools > Oracle Directory Manager
Log in to Oracle Directory Manager as the orcladmin
user.
In the System Objects frame, expand Entry Management, expand cn=OracleContext, expand cn=Products, expand cn=IAS, expand cn=IAS Infrastructure Databases, and expand the orclReferenceName
for the Metadata Repository.
Select the OrclResourceName
entry for the schema whose password you want to view.
In the Properties tab, you can view the password in the orclpasswordattribute
field.
You can view Metadata Repository schema passwords using ldapsearch
, a command-line tool, as follows:
ORACLE_HOME/bin/ldapsearch -p oid_port -h oid_hostname -D "cn=orcladmin" -w orcladmin_password -b "orclresourcename=schema_name, orclreferencename=metadata_rep_global_db_name, cn=ias infrastructure databases, cn=ias, cn=products, cn=oraclecontext" -s base "objectclass=*" orclpasswordattribute
The command returns several lines of output. The password is listed in the following line:
orclpasswordattribute=password
The following is an example for viewing the ORASSO
schema password. In this example, the ORASSO
schema password is Og23NI78
.
ORACLE_HOME/bin/ldapsearch -p 3060 -h myhost -D "cn=orcladmin"
-w mypassword -b "orclresourcename=ORASSO,
orclreferencename=orcl.mycompany.com,
cn=ias infrastructure databases, cn=ias, cn=products,
cn=oraclecontext" -s base "objectclass=*" orclpasswordattribute
OrclResourceName=ORASSO,orclReferenceName=orcl.mycompany.com
cn=IAS Infrastructure Databases,cn=IAS,cn=Products,cn=OracleContext
orclpasswordattribute=Og23NI78
The method for changing schemas passwords in the Metadata Repository varies by schema. Some schemas store their passwords in Oracle Internet Directory; you must change their passwords using the Application Server Control Console so that both Oracle Internet Directory and the database are updated. Other schemas do not store their passwords in Oracle Internet Directory; you can change their passwords in the database using SQL*Plus. A few schemas require special steps for changing their passwords.
Table 6-2 lists the appropriate method for change each Metadata Repository schema.
Table 6-2 Methods for Changing Oracle Metadata Repository Schema Passwords
Schema | Method for Changing Password |
---|---|
B2B
|
You must change the password in two places:
|
DCM
|
If the Metadata Repository is registered with Oracle Internet Directory, you must change the password in two places:
If the Metadata Repository is not registered with Oracle Internet Directory, you only need to change the password directly in the database using SQL*Plus. |
DISCOVERER5
|
Use the Application Server Control Console. Navigate to the Application Server Home Page for the middle-tier instance that uses this schema and follow the instructions in Section 6.4.1, "Changing Schema Passwords Using the Application Server Control Console". |
DSGATEWAY Foot 1
|
Use the Application Server Control Console. Navigate to the Application Server Home Page for the middle-tier instance that uses this schema and follow the instructions in Section 6.4.1, "Changing Schema Passwords Using the Application Server Control Console". |
IP Foot 2
|
You must change the password in two places:
|
OCA
|
This schema requires special steps. Refer to Oracle Application Server Certificate Authority Administrator's Guide for advanced topics in administration. |
ODS
|
This schema requires special steps. Refer to Oracle Internet Directory Administrator's Guide for information on resetting the default password for the database. |
ORAOCA_PUBLIC
|
This schema requires special steps. Refer to Oracle Application Server Certificate Authority Administrator's Guide for advanced topics in administration. |
ORASSO
|
Use the Application Server Control Console. Navigate to the Application Server Home Page for the Infrastructure (Identity Management) installation and follow the instructions in Section 6.4.1, "Changing Schema Passwords Using the Application Server Control Console".
After you change the password, restart Oracle HTTP Server: opmnctl stopproc ias-component=HTTP_Server opmnctl startproc ias-component=HTTP_Server |
ORASSO_DS
|
Use the Application Server Control Console. Navigate to the Application Server Home Page for the Infrastructure (Identity Management) installation and follow the instructions in Section 6.4.1, "Changing Schema Passwords Using the Application Server Control Console". |
ORASSO_PA
|
Use the Application Server Control Console. Navigate to the Application Server Home Page for the Infrastructure (Identity Management) installation and follow the instructions in Section 6.4.1, "Changing Schema Passwords Using the Application Server Control Console". |
ORASSO_PS
|
Use the Application Server Control Console. Navigate to the Application Server Home Page for the Infrastructure (Identity Management) installation and follow the instructions in Section 6.4.1, "Changing Schema Passwords Using the Application Server Control Console".
Changing the ORACLE_HOME/portal/conf/ptlconfig -dad dad_name -site [-pw PORTAL_schema_password] Refer to Oracle Application Server Portal Configuration Guide. |
ORASSO_PUBLIC
|
Use the Application Server Control Console. Navigate to the Application Server Home Page for the Infrastructure (Identity Management) installation and follow the instructions in Section 6.4.1, "Changing Schema Passwords Using the Application Server Control Console". |
OWF_MGR
|
You must change the password in two places:
|
PORTAL
|
Use the Application Server Control Console. Navigate to the Application Server Home Page for the middle-tier instance that uses this schema and follow the instructions in Section 6.4.1, "Changing Schema Passwords Using the Application Server Control Console".
After you change the password, restart Oracle HTTP Server: opmnctl stopproc ias-component=HTTP_Server opmnctl startproc ias-component=HTTP_Server |
PORTAL_APP
|
Use the Application Server Control Console. Navigate to the Application Server Home Page for the middle-tier instance that uses this schema and follow the instructions in Section 6.4.1, "Changing Schema Passwords Using the Application Server Control Console". |
PORTAL_DEMO
|
Use the Application Server Control Console. Navigate to the Application Server Home Page for the middle-tier instance that uses this schema and follow the instructions in Section 6.4.1, "Changing Schema Passwords Using the Application Server Control Console". |
PORTAL_PUBLIC
|
Use the Application Server Control Console. Navigate to the Application Server Home Page for the middle-tier instance that uses this schema and follow the instructions in Section 6.4.1, "Changing Schema Passwords Using the Application Server Control Console". |
SCOTT
|
Use SQL*Plus to change the password directly in the database. Refer to Section 6.4.2, "Changing Schema Passwords Using SQL*Plus". |
SYS
|
Use SQL*Plus to change the password directly in the database. Refer to Section 6.4.2, "Changing Schema Passwords Using SQL*Plus". |
SYSTEM
|
Use SQL*Plus to change the password directly in the database. Refer to Section 6.4.2, "Changing Schema Passwords Using SQL*Plus". |
UDDISYS
|
Use the Application Server Control Console. Navigate to the Application Server Home Page for the middle-tier instance that uses this schema and follow the instructions in Section 6.4.1, "Changing Schema Passwords Using the Application Server Control Console". |
WCRSYS
|
Use the Application Server Control Console. Navigate to the Application Server Home Page for the middle-tier instance that uses this schema and follow the instructions in Section 6.4.1, "Changing Schema Passwords Using the Application Server Control Console". |
WIRELESS
|
Use the Application Server Control Console. Navigate to the Application Server Home Page for the middle-tier instance that uses this schema and follow the instructions in Section 6.4.1, "Changing Schema Passwords Using the Application Server Control Console". |
WK_TEST
|
Use SQL*Plus to change the password directly in the database. Refer to Section 6.4.2, "Changing Schema Passwords Using SQL*Plus". |
WKPROXY
|
Use the Application Server Control Console. Navigate to the Application Server Home Page for the middle-tier instance that uses this schema and follow the instructions in Section 6.4.1, "Changing Schema Passwords Using the Application Server Control Console". |
WKSYS
|
Use the Application Server Control Console. Navigate to the Application Server Home Page for the middle-tier instance that uses this schema and follow the instructions in Section 6.4.1, "Changing Schema Passwords Using the Application Server Control Console". |
Some schemas store their passwords in Oracle Internet Directory. You must change their passwords using the Application Server Control Console so the password is updated in both the database and Oracle Internet Directory.
To change a schema password using the Application Server Control Console:
Depending on the schema, navigate to the home page for the middle-tier instance or the Infrastructure. Refer to Table 6-2 to determine which home page to use.
On the home page, click Infrastructure.
On the Infrastructure page, click Change Schema Password.
On the Change Schema Password page, select the schema. Enter the new password in the Password and Confirm Password fields. Click OK.
You can change some schema passwords directly in the database using SQL*Plus. To do so, connect to the database as a user with SYSDBA privileges and issue the following command:
SQL> ALTER USER schema identified by new_password;
For example, to change the SCOTT
schema password to "abc123":
SQL> ALTER USER SCOTT IDENTIFIED BY abc123;
A few schemas (DCM
, B2B
, OWF_MGR
) require you to manually update the password in the Metadata Repository and in Oracle Internet Directory. You can use this procedure to change these passwords.
Start Oracle Directory Manager with the following command:
(UNIX) ORACLE_HOME/bin/oidadmin
(Windows) Start > Programs > Oracle Application Server - OracleHome >
Integrated Management Tools > Oracle Directory Manager
Log in to Oracle Directory Manager as the orcladmin
user.
In the System Objects frame, expand Entry Management, expand cn=OracleContext, expand cn=Products, expand cn=IAS, expand cn=IAS Infrastructure Databases, and expand the orclReferenceName
for the Metadata Repository.
Select the OrclResourceName
entry for the schema whose password you want to change.
In the Properties tab, update the password in the orclpasswordattribute
field.
Click Apply.
To configure the middle-tier and infrastructure to work with OracleAS Metadata Repository after its character set has been changed:
Modify the character set of all Database Access Descriptors (DADs) accessing the metadata repository to the new database character set.
Using the Application Server Control Console, navigate to the middle-tier instance home page.
In the System Components section, click HTTP_Server.
On the HTTP_Server home page, click Administration.
On the HTTP_Server Administration page, select PL/SQL Properties. This opens the mod_plsql
Services page.
Scroll to the DADs section and click the name of the DAD that you want to configure. This opens the Edit DAD page.
In the NLS Language field, type in a NLS_LANG value whose character set is the same as the new character set for OracleAS Metadata Repository.
Click OK.
Repeat steps e to g for all DADs accessing OracleAS Metadata Repository.
Reconfigure the Oracle Ultra Search index as follows:
Connect to OracleAS Metadata Repository as WKSYS
and invoke the following SQL script to reconfigure the default cache character set and index preference:
ORACLE_HOME/ultrasearch/admin/wk0prefcheck.sql
Connect to OracleAS Metadata Repository as the default user (WKTEST
) and invoke the following SQL script:
ORACLE_HOME/ultrasearch/admin/wk0idxcheck.sql
The script requests you to enter the instance name (WK_INST
). Enter "y" when prompted to go ahead with the change.
This script reconfigures the instance (in this case, the default instance). It also truncates the Oracle Text index used by Oracle Ultra Search and you must force a recrawl to rebuild the index.
Repeat step b for all Oracle Ultra Search instances that were created before you changed the database character set. Invoke the script as the instance owner, and then force a recrawl of all data sources, if necessary.
When you install OracleAS Metadata Repository, you can choose the location for its datafiles. The default location is ORACLE_HOME
/oradata/
SID
. After installation, you may want to relocate datafiles to a different directory. For example, you may want to move them to a directory on a file system with more space. Or, you may want to move them to a directory on a different disk for performance reasons. Another thing you may want to do is keep the datafiles in the same directory, but rename them.
This section provides a procedure for renaming or relocating datafiles. You can use this procedure on one or more datafiles, and the datafiles may be in multiple tablespaces.
This procedure applies to:
The datafiles associated with Oracle Application Server schemas and tablespaces.
The following standard Oracle database datafiles:
drsys01.dbf
system01.dbf
temp01.dbf
users01.dbf
The following example shows how to relocate two datafiles in two different tablespaces, as follows:
Relocate the oca.dbf
datafile in the OCATS
tablespace from /infra_home/oradata/orcl/oca.dbf
to /new_directory/oca.dbf
Relocate the dcm.dbf
datafile in the DCM
schema from /infra_home/oradata/orcl/dcm.dbf
to /new_directory/dcm.dbf
Before you start the procedure:
Make sure you have a complete cold backup of OracleAS Metadata Repository.
Connect to OracleAS Metadata Repository as a user with administrator privileges. You must have the ALTER DATABASE
system privilege to relocate datafiles.
Read through the entire procedure before you start.
The procedure is as follows:
Verify the location of your datafiles.
You can verify the location of datafiles in a particular tablespace by querying the data dictionary view DBA_DATA_FILES
.
For example, to query the location of datafiles in the OCATS
and DCM
tablespaces:
SQL> SELECT FILE_NAME, BYTES FROM DBA_DATA_FILES WHERE TABLESPACE_NAME = 'OCATS' OR TABLESPACE_NAME = 'DCM'; FILE_NAME BYTES --------------------------------------------- ------------ /infra_home/oradata/orcl/oca.dbf 78643200 /infra_home/oradata/orcl/dcm.dbf 96993280
Shut down all middle-tier instances that use OracleAS Metadata Repository.
Stop the Infrastructure that contains OracleAS Metadata Repository, then start an OracleAS Metadata Repository instance and mount the database without opening it, as follows:
Stop the Application Server Control Console and OPMN-managed processes:
emctl stop iasconsole opmnctl stopall
Leave the Metadata Repository listener running.
Stop the OracleAS Metadata Repository instance (make sure the ORACLE_HOME
environment variable is set):
sqlplus /nolog SQL> connect SYS as SYSDBA SQL> SHUTDOWN
Start an OracleAS Metadata Repository instance and mount the database without opening it:
SQL> STARTUP MOUNT
Move the datafiles to their new location using the operating system. For example:
(UNIX) mv /infra_home/oradata/orcl/oca.dbf /new_directory/oca.dbf mv /infra_home/oradata/orcl/dcm.dbf /new_directory/dcm.dbf (Windows) rename C:\infra_home\oradata\orcl\oca.dbf D:\new_directory\oca.dbf rename C:\infra_home\oradata\orcl\dcm.dbf D:\new_directory\dcm.dbf
Note: You can execute an operating system command to copy a file by using the SQL*PlusHOST command.
|
Use ALTER DATABASE to rename the file pointers in the database's control file:
SQL> ALTER DATABASE RENAME FILE '/infra_home/oradata/orcl/oca.dbf', '/infra_home/oradata/orcl/dcm.dbf' TO '/new_directory/oca.dbf', '/new_directory/dcm.dbf';
The new files must already exist; this statement does not create the files. Also, always provide complete filenames (including their full paths) to properly identify the old and new datafiles. In particular, specify the old datafile name exactly as it appears in the DBA_DATA_FILES
view of the data dictionary.
Shut down OracleAS Metadata Repository, then perform a normal startup of the Infrastructure:
Leave the OracleAS Metadata Repository listener running.
Shut down OracleAS Metadata Repository:
SQL> SHUTDOWN
Start OracleAS Metadata Repository:
SQL> STARTUP
Start OPMN-managed processes and the Application Server Control Console:
opmnctl startall emctl start iasconsole
Start the middle-tier instances that use the Infrastructure.
Verify the new location of your datafiles.
SQL> SELECT FILE_NAME, BYTES FROM DBA_DATA_FILES WHERE TABLESPACE_NAME = 'OCATS' OR TABLESPACE_NAME = 'DCM'; FILE_NAME BYTES --------------------------------------------- --------------- /new_directory/oca.dbf 78643200 /new_directory/dcm.dbf 96993280
Perform a complete cold backup of OracleAS Metadata Repository. After making any structural changes to a database, always perform an immediate and complete backup.