顯示具有 dba 標籤的文章。 顯示所有文章
顯示具有 dba 標籤的文章。 顯示所有文章

2013年2月7日 星期四

如何修改 mgmt_view 密碼

修改mgmt_view password 導致grid control report 不能使用。 username/password 錯誤。這個用戶是專門為report 用戶使用,用戶可以不用知道密碼,也可以是使用加密後的密碼登陸。如果直接使用alter user mgmt_view identified by xxx , 那麼report 就不能登陸了。所以修改mgmt_view 的順序:1. alter user mgmt_view identified by xxx2.cd $OMS_HOME/bin
 
emctl config oms -change_view_user_pwd [-sysman_pwd ] [-user_pwd ] [-auto_generate]3. emctl stop oms4. emctl start omsML:Grid Control Repository: How to Change the Password of the MGMT_VIEW User? [ID 374382.1]

 reference
http://space.itpub.net/471666/viewspace-682871
 

2012年6月11日 星期一

mod_oc4j: request to OC4J 21500 failed: Connect failed


The problem is solved by removing the primary & secondary DNS in network configuration.Now it working with good speed while internet is “OFF”.

reference:  https://forums.oracle.com/forums/thread.jspa?threadID=2200136

2012年3月18日 星期日

Installation of EMGrid Control in same location

when getting the error message about that the



ORACLE_MIDDLEWARE_HOME_LOCATION : "/export/home/oracle/Oracle/Middleware/oms11g" subdirectory already exists in oracle inventory: specify another home location.

try this:


/etc/oratab

and also you have to remove following four entries from each of directories that stores inventory information:

Locate your central inventory directory from /etc/oraInst.loc
inventory_loc=/u00/app/oraInventory

ls -l
backup
ContentsXML

cd ContentsXML
vi inventory.xml

delete all the entries for

#
#
#
#

Also note that under directory Backups, there are further directories and you need to remove these entries from each and every inventory.xml.

cd backup

grep -i inventory */*/in*

once you remove all the entries.

Go to your location where you have installed Middleware.

in my case
cd /u00/app/oracle/product/11.2.0/Middleware.

rm -rf oms11g agent11g oracle_common Oracle_WT.


==============================================================================
EMD upload error: uploadXMLFiles skipped - Error communicating with the agent
Problem description:


emctl upload agent


EMD upload error: uploadXMLFiles skipped :: OMS version not checked yet. If this issue persists check trace files for ping to OMS related errors.
Resync Agent is failed with the following message:
Error communicating with the agent. Exception message - oracle.sysman.emSDK.emd.comm.CommException: java.io.IOException: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated




Solution:


emctl stop agent
cd $AGENT_HOME
rm sysman/emd/agntstmp.txt
rm sysman/emd/blackouts.xml
rm -r sysman/emd/state/*
rm -r sysman/emd/collection/*
rm -r sysman/emd/upload/*
rm sysman/emd/lastupld.xml
rm sysman/emd/protocol.ini


Go to the repository Grid Control Database


SQL> select target_name from mgmt_targets where target_type='oracle_emd';


TARGET_NAME
--------------------------------------------------------------------------------


si01.an.com:3872


SQL> exec mgmt_admin.cleanup_agent(' si01.an.com:3872);


PL/SQL procedure successfully completed.


emctl clearstate agent


emctl secure agent


emctl start agent


emctl upload agent

$AGENT_HOME/root.sh

reference:
http://bduan2.blog.163.com/blog/static/181238102201132192352424/
http://www.oracleangels.com/2011/07/emd-upload-error-uploadxmlfiles-skipped.html

2012年2月28日 星期二

INS-30060: Check for group existence failed.

Install Oracle 11gR2 on RHEL5 issue

solution

./runInstaller -ignoreSysPrereqs –ignoreInternalDriverError

Reference:
Cause: Unexpected error occurred while trying to check for group existence.
Action: Refer to the logs or contact Oracle Support Services. Note for advanced users: Launch the installer by passing the following flag ‘-ignoreInternalDriverError’.

EM Configuration issue. $ORACLE_HOME/odprimary_PRIDB not found

oracle control 12c agent issue
root cause
A common cause for this error is changing the hostname of the server in either /etc/hosts or DNS. In this case the there were no changes to the hostname as we were able to connect to the hostname listed in the last known state on the database home page.

Resolution
changing /etc/hosts to the following:
127.0.0.1 localhost.localdomain localhost
172.17.100.250 cloudcc12c cloudcc12c.com

reference:


2011年7月7日 星期四

Oracle DDL,DML,DCL,TCL 基礎概念

DDL

Data Definition Language (DDL) statements are used to define the database structure or schema. Some examples:
  • CREATE - to create objects in the database
  • ALTER - alters the structure of the database
  • DROP - delete objects from the database
  • TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed
  • COMMENT - add comments to the data dictionary
  • RENAME - rename an object

DML

Data Manipulation Language (DML) statements are used for managing data within schema objects. Some examples:
  • SELECT - retrieve data from the a database
  • INSERT - insert data into a table
  • UPDATE - updates existing data within a table
  • DELETE - deletes all records from a table, the space for the records remain
  • MERGE - UPSERT operation (insert or update)
  • CALL - call a PL/SQL or Java subprogram
  • EXPLAIN PLAN - explain access path to data
  • LOCK TABLE - control concurrency

DCL

Data Control Language (DCL) statements. Some examples:
  • GRANT - gives user's access privileges to database
  • REVOKE - withdraw access privileges given with the GRANT command

TCL

Transaction Control (TCL) statements are used to manage the changes made by DML statements. It allows statements to be grouped together into logical transactions.
  • COMMIT - save work done
  • SAVEPOINT - identify a point in a transaction to which you can later roll back
  • ROLLBACK - restore database to original since the last COMMIT
  • SET TRANSACTION - Change transaction options like isolation level and what rollback segment to use


轉至:
http://www.cnblogs.com/gnielee/archive/2009/07/31/1535621.html

2011年6月20日 星期一

Oracle disable the maintenance mode


Warning

The system has not been taken off maintenance mode completely. Please contact your System Administrator.

This problem usually arises when you start the application tier services before bringing the system out of the "Maintenance Mode".

Please follow these steps:

1) Shutdown all the application tier services and ensure that the Concurrent Manager (FNDLIBR) and JAVA processes are stopped completely.
The java processes may still be running kill the parent process using
kill -9 PID command.

2) Through adadmin "DISABLE" maintenance mode.

3) Run autoconfig once

4) Start the application tier services

root#su - ap user
ap user$adadmin

[appltest@au10dmzh49 scripts]$ adadmin

Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA

Oracle Applications AD Administration

Version 12.0.0

NOTE: You may not use this utility for custom development
unless you have written permission from Oracle Corporation.

Your default directory is '/d01/oracle/PROD/apps/apps_st/appl'.
Is this the correct APPL_TOP [Yes] ?

AD Administration records your AD Administration session in a text file
you specify. Enter your AD Administration log file name or press [Return]
to accept the default file name shown in brackets.

Filename [adadmin.log] :

************* Start of AD Administration session *************
AD Administration version: 12.0.0
AD Administration started at: Tue Jun 21 2011 14:54:06

APPL_TOP is set to /d01/oracle/PROD/apps/apps_st/appl

You can be notified by email if a failure occurs.
Do you wish to activate this feature [No] ?

Please enter the batchsize [1000] :


Please enter the name of the Oracle Applications System that this
APPL_TOP belongs to.

The Applications System name must be unique across all Oracle
Applications Systems at your site, must be from 1 to 30 characters
long, may only contain alphanumeric and underscore characters,
and must start with a letter.

Sample Applications System names are: "prod", "test", "demo" and
"Development_2".

Applications System Name [PROD] : PROD *


NOTE: If you do not currently have certain types of files installed
in this APPL_TOP, you may not be able to perform certain tasks.

Example 1: If you don't have files used for installing or upgrading
the database installed in this area, you cannot install or upgrade
the database from this APPL_TOP.

Example 2: If you don't have forms files installed in this area, you cannot
generate them or run them from this APPL_TOP.

Example 3: If you don't have concurrent program files installed in this area,
you cannot relink concurrent programs or generate reports from this APPL_TOP.


Do you currently have files used for installing or upgrading the database
installed in this APPL_TOP [YES] ? YES *


Do you currently have Java and HTML files for HTML-based functionality
installed in this APPL_TOP [YES] ? YES *


Do you currently have Oracle Applications forms files installed
in this APPL_TOP [YES] ? YES *


Do you currently have concurrent program files installed
in this APPL_TOP [YES] ? YES *


Please enter the name Oracle Applications will use to identify this APPL_TOP.

The APPL_TOP name you select must be unique within an Oracle Applications
System, must be from 1 to 30 characters long, may only contain
alphanumeric and underscore characters, and must start with a letter.

Sample APPL_TOP Names are: "prod_all", "demo3_forms2", and "forms1".

APPL_TOP Name [au10dmzh49] : au10dmzh49 *



You are about to use or modify Oracle Applications product tables
in your ORACLE database 'PROD'
using ORACLE executables in '/d01/oracle/PROD/apps/tech_st/10.1.2'.

Is this the correct database [Yes] ?

AD Administration needs the password for your 'SYSTEM' ORACLE schema
in order to determine your installation configuration.

Enter the password for your 'SYSTEM' ORACLE schema:manager


The ORACLE username specified below for Application Object Library
uniquely identifies your existing product group: APPLSYS

Enter the ORACLE password of Application Object Library [APPS] :apps

AD Administration is verifying your username/password.
The status of various features in this run of AD Administration is:

<-Feature version in->
Feature Active? APPLTOP Data model Flags
------------------------------ ------- -------- ----------- -----------
CHECKFILE Yes 1 1 Y N N Y N Y
PREREQ Yes 6 6 Y N N Y N Y
CONCURRENT_SESSIONS No 2 2 Y Y N Y Y N
PATCH_TIMING Yes 2 2 Y N N Y N Y
PATCH_HIST_IN_DB Yes 6 6 Y N N Y N Y
SCHEMA_SWAP Yes 1 1 Y N N Y Y Y
JAVA_WORKER Yes 1 1 Y N N Y N Y
CODELEVEL Yes 1 1 Y N N Y N Y



Identifier for the current session is 16760

Reading product information from file...

Reading language and territory information from file...

Reading language information from applUS.txt ...

AD Administration warning:
Product Data File
/d01/oracle/PROD/apps/apps_st/appl/admin/zfaprod.txt
does not exist for product "zfa".
This product is registered in the database but the
above file does not exist in APPL_TOP. The product
will be ignored without error.


AD Administration warning:
Product Data File
/d01/oracle/PROD/apps/apps_st/appl/admin/zsaprod.txt
does not exist for product "zsa".
This product is registered in the database but the
above file does not exist in APPL_TOP. The product
will be ignored without error.


AD Administration warning:
Product Data File
/d01/oracle/PROD/apps/apps_st/appl/admin/jtsprod.txt
does not exist for product "jts".
This product is registered in the database but the
above file does not exist in APPL_TOP. The product
will be ignored without error.


Reading database to see what industry is currently installed.

Reading FND_LANGUAGES to see what is currently installed.
Currently, the following language is installed:

Code Language Status
---- --------------------------------------- ---------
US American English Base

Your base language will be AMERICAN.

Setting up module information.
Reading database for information about the modules.
Saving module information.
Reading database for information about the products.
Reading database for information about how products depend on each other.
Reading topfile.txt ...

Saving product information.

AD code level : [B.1]

AD Administration Main Menu
--------------------------------------------------

1. Generate Applications Files menu

2. Maintain Applications Files menu

3. Compile/Reload Applications Database Entities menu

4. Maintain Applications Database Entities menu

5. Change Maintenance Mode

6. Exit AD Administration

select 5

2011年5月24日 星期二

ORA-19566: exceeded limit of 0 corrupt blocks for file


RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================

RMAN-03009: failure of backup command on d1 channel at 05/24/2011 15:39:27
ORA-19566: exceeded limit of 0 corrupt blocks for file /d01/oracle/PROD/db/apps_st/data/system09.dbf

執行動作如下..

1. SQL>alter database datafile '/d01/oracle/PRODBTPL/db/apps_st/data/system09.dbf' resize 1000M;

2. 進行check oracle@hostname$ dbv file=/d01/oracle/PRODBTPL/db/apps_st/data/system09.dbf BLOCKSIZE=8192

Automatic archival disabled
















#Create spfile from pfile;

#mkdir /home/oracle/archivelog

First lets check the current log mode:
SQL*Plus: Release 11.1.0.6.0 - Production on Fri Mar 20 14:33:05 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options

SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 165
Current log sequence 167

SQL> select name, log_mode from v$database;

NAME LOG_MODE
--------- ------------
TEST NOARCHIVELOG

SQL> show parameter spfile

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string /home/oracle/product/11g/db/db
s/spfiletest.ora
Now lets try to set the archive log destination:

SQL> alter system set log_archive_dest_1='/home/oracle/archivelog' scope=spfile;
alter system set log_archive_dest_1='/home/oracle/archivelog' scope=spfile
*
ERROR at line 1:
ORA-32017: failure in updating SPFILE
ORA-16179: incremental changes to "log_archive_dest_1" not allowed with SPFILE

I faced the above error, thought need to enable archiving first:

SQL> alter system set log_archive_start=TRUE
2 scope=spfile;

System altered.

But I received the error again.

SQL> alter system set log_archive_dest_1='/home/oracle/archivelog' scope=spfile;
alter system set log_archive_dest_1='/home/oracle/archivelog' scope=spfile
*
ERROR at line 1:
ORA-32017: failure in updating SPFILE
ORA-16179: incremental changes to "log_archive_dest_1" not allowed with SPFILE

Checked the error description:
SQL> !oerr ora 16179
16179, 00000, "incremental changes to \"%s\" not allowed with SPFILE"
// *Cause: Incremental changes to a log_archive_dest_n parameter cannot
// be made when using an SPFILE.
// *Action: Specify either LOCATION or SERVICE plus all other attributes
// to be set in one ALTER SYSTEM/SESSION SET command.

So I did some research and found that when using spfile and trying to set a parameter like log_archive_dest_1, we need to give
complete format of the parameter like:

SQL> alter system set log_archive_dest_1='location=/home/oracle/archivelog' scope=spfile;

System altered.
(Optionally we can also give other parameters in this statement like optional, reopen etc.)

Now let shutdown the database and do a startup mount:

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

SQL> startup mount;
ORACLE instance started.

Total System Global Area 422670336 bytes
Fixed Size 1300352 bytes
Variable Size 310380672 bytes
Database Buffers 104857600 bytes
Redo Buffers 6131712 bytes
Database mounted.

Enabling archivelog mode

SQL> alter database archivelog;

Database altered.

Open the database:

SQL> alter database open;

Database altered.

Test if archivelog is set properly:

SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /home/oracle/archivelog
Oldest online log sequence 165
Next log sequence to archive 167
Current log sequence 167
SQL> select name, log_mode from v$database;

NAME LOG_MODE
--------- ------------
TEST ARCHIVELOG

SQL> alter system switch logfile;

System altered.

SQL> /

System altered.

SQL> !ls -lrt /home/oracle/archivelog
total 44496
-rw-r----- 1 oracle oracle 45509632 2009-03-20 14:43 1_167_677948664.dbf
-rw-r----- 1 oracle oracle 1024 2009-03-20 14:43 1_168_677948664.dbf

So now we have enabled archivelog mode and have some archivelog file also!!!