Posted by John Paul van Helvoort on May 20, 2009
Using an export OS script with a command similar to this:
exp “‘/ AS SYSDBA’” full=y file=export_SID.dmp log=export_SID.log statistics=none
This error suddenly came around.
EXP-00056: ORACLE error 1031 encountered
ORA-01031: insufficient privileges
After researching this error, i found that when the TWO_TASK parameter is set, Oracle tries to connect via Oracle Net.
This then will return an error while connecting using $OPS login of “/” , which is done in my case.
after unset this variable the problem was solved !
unset TWO_TASK
Posted in Database, Linux, Scripting | Leave a Comment »
Posted by John Paul van Helvoort on May 19, 2009
After succesfully creating a standby database using RMAN duplicate on a primairy site 11.1.0.6 .
The logfle shipping works ok, but the dg_broker seems to have a problem which i couldn’t pin down.
The Dataguard broker was configured using Enterprise Grid Control using the add standby database option “Manage
existing standby database”. The configuration steps were preformed successfully, however this error is shown for the standby database.
The Data Guard status of stby is Error ORA-16664: unable to receive the result from a database.
Searching this error reveals that there might be a network error.
ORA-16664: unable to receive the result from a database
Cause: During execution of a command, a database in the Data Guard broker configuration failed to return a result.
Action: Check Data Guard broker logs for the details of the failure. Fix any possible network problems and try the command again.
As the RMAN duplicatie is done over TNS using the following command
“rman target sys/xxx@prod AUXILIARY sys/xxx@stby” . I would say that the network setting for TNS are
correct, so what does this error actually mean ?
In the background i could find serveral Dataguard logfiles showing me mixed errors on the subject.
Primary site DG log shows :
….
DG 2009-05-19-08:48:27 1012000 4 686031872 DMON: CTL_GET_STATUS operation completed
DG 2009-05-19-08:48:45 0 2 0 NSV1: Received error ORA-16664 from target remote site stby.
DG 2009-05-19-08:48:45 0 2 686031873 DMON: Database stby returned ORA-16664
…
Standby site DG log shows :
…
DG 2009-05-19-08:51:00 0 2 686031879 Operation CTL_GET_STATUS continuing with warning, status = ORA-16809
DG 2009-05-19-08:51:00 0 2 0 NSV0: Failed to connect to remote database prod. Error is ORA-00604
DG 2009-05-19-08:51:00 0 2 0 NSV0: Failed to send message to site prod.
Error code is ORA-00604.
DG 2009-05-19-08:51:00 0 2 0 DMON: Database prod returned ORA-00604
…
The Data Guard Command-Line Interface ( DGMGRL ) showed the following error.
DGMGRL> show configuration
Configuration
Name: prod
Enabled: YES
Protection Mode: MaxPerformance
Databases:
prod – Primary database
stby – Physical standby database
Fast-Start Failover: DISABLED
Current status for “prod”:
Warning: ORA-16607: one or more databases have failed
All these errors seem very surfear but at the end it all came down to a faulty “logon trigger” which was implemented by another Database Administrator.
As normal connections worked this was not the first thing you would come to , but at the end by dropping this faulty trigger the problem was solved !
Posted in Database, Grid Control | Leave a Comment »
Posted by John Paul van Helvoort on May 18, 2009
When switching to a Grid monitoring environment, standalone dbconsole need to be shutdown and cleared out. Jobs scheduled using the dbconsole on a 11g instance cannot be retreived threw Oracle Enterprise Grid Console.
When your dbconsole is broke and you don’t want to have any jobs running which where submitted through the gui. Here is a way to delete them from you repository manually.
select JOB_OWNER, JOB_NAME from SYSMAN.MGMT_JOB;
SYSMAN ALLOWED FAILED LOGIN ATTEMPTS (CLUSTER DATABASE)
SYSMAN ALLOWED FAILED LOGIN ATTEMPTS (DATABASE INSTANCE)
SYSMAN FIX INVENTORY
BCK XXX_BACKUP_FULL
BCK XXX_BACKUP_INCR
BCK XXX_EXPORT_FULL
SYSMAN PROVISIONING DAEMON
SYSMAN REFRESH_FROM_METALINK_JOB
For each job that you want to remove , run the following statement.
begin
sysman.mgmt_jobs.stop_all_executions('XXX_BACKUP_FULL','BCK');
sysman.mgmt_jobs.delete_job('XXX_BACKUP_FULL','BCK');
end;
/
commit;
Posted in Database, Grid Control | Leave a Comment »
Posted by John Paul van Helvoort on May 15, 2009
After some searching it was clear that you need to create an Access Control List to provide access from within the database to allow connects to be made.
Despite of some information i found on this topic , the only thing i needed to provide this access to the MAILUSER was to execute these command as the sys user.
EXECUTE DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('acl_for_mail.xml', 'ACL for Mail Job','MAILUSER', TRUE, 'connect');
EXECUTE DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('acl_for_mail.xml','localhost', 25);
COMMIT;
You might want to grant this UTL_SMTP to the MAILUSER ,
grant execute on UTL_SMTP to MAILUSER;
Grant succeeded.
To add another user to the same ACL xml made earlier, you can use :
EXECUTE DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE('acl_for_mail.xml','MAILUSER2', TRUE, 'connect');
COMMIT;
If you are interesseted in seeing what network access is granted on acl_for_mail.xml, you can query this by executing this
SELECT host, lower_port, upper_port, acl
FROM dba_network_acls
Posted in Database | Leave a Comment »
Posted by John Paul van Helvoort on May 5, 2009
These easy steps should do the trick for you :
Logon the monitoring server and change ownership and rights under the root user
$ORACLE_HOME_OMS/Apache/Apache/bin
chown root .apachetcl
chmod 6750 .apachectl
result :
-rwsr-s— 1 root oinstall 1716966 2008-03-05 11:04 .apachectl
Log in under the oracle user and adjust the httpd.conf file located under $ORACLE_HOME_OMS/Apache/Apache/conf
Search for “Listen” or “Port”
# This port is used when starting without SSL
Port 7777
Listen 7778
to
# This port is used when starting without SSL
Port 80
Listen 7778
Listen 80
After this a restart of the HTTP_Server process is enough for changes to take effect :
oracle@xxx: oms10g/opmn/bin> ./opmnctl restartproc process-type=HTTP_Server
opmnctl: restarting opmn managed processes…
oracle@xxx: oms10g/opmn/bin>
You are all set !
Posted in Grid Control | Leave a Comment »
Posted by John Paul van Helvoort on May 2, 2009
When running you runInstaller under another user then the current user logged into the X server screen, you might hit this error.
I ran into this error while being logged on to a vnc session running under the root user. While perfoming tasks under root , switched user to oracle and set the display back to the current screen
su – oracle
export DISPLAY=xxx:1
The installer starts but exits with the following error;
Starting Oracle Universal Installer…
….
Exception in thread “main” java.lang.InternalError: Can’t connect to X11 window
server using ‘xxx:1′ as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(Unknown Source)
at java.awt.Window.init(Unknown Source)
at java.awt.Window.(Unknown Source)
at java.awt.Frame.(Unknown Source)
at java.awt.Frame.(Unknown Source)
at oracle.ewt.popup.PopupFrame.(Unknown Source)
at oracle.ewt.lwAWT.BufferedFrame.(Unknown Source)
at oracle.sysman.emgc.oneclick.OneClickWizard.getGuiDefaults(OneClickWizard.java:239)
at oracle.sysman.emgc.oneclick.OneClickWizard.(OneClickWizard.java:205)
at oracle.sysman.emgc.oneclick.OneClick.(OneClick.java:236)
at oracle.sysman.emgc.oneclick.OneClickInstaller.(OneClickInstaller.java:116)
at oracle.sysman.emgc.oneclick.OneClickInstaller.process(OneClickInstaller.java:268)
at oracle.sysman.emgc.oneclick.OneStartup.startup(OneStartup.java:383)
at oracle.sysman.emgc.oneclick.OneArgs.main(OneArgs.java:700)
at oracle.sysman.emgc.oneclick.OneStartup.main(OneStartup.java:391)
oracle@xxx:/u00/agent/linux/agent> ./runInstaller
A solution could be to disable access control under the user from which VNC is running , in my case under root.
xxx:/ # xhost +
access control disabled, clients can connect from any host
xxx:/ #
Now the runInstaller will start fine in this setup !
Posted in Application Server, Database, Grid Control, Linux | Leave a Comment »
Posted by John Paul van Helvoort on May 1, 2009
After a fresh upgrade of the Oracle Enterprise Manager Grid Control 10.2.0.1 to 10.2.0.5 , the error log filled up with “ORA-14400: Inserted partition key does not map to any partition” lines.
( http://host:port/em/console/health/healthSystemError )
The emos.trc file on the host reports :
2009-04-29 18:23:42,180 [XMLLoader0 20000000014.xml] ERROR eml.XMLLoader markFileAsError.909 – Failed to load 20000000014.xml even after 2 attempts; moving to errors directory. Error:
java.sql.SQLException: ORA-14400: inserted partition key does not map to any partition
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:137)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:315)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:281)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:638)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:184)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:632)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1160)
at oracle.jdbc.driver.OraclePreparedStatement.sendBatch(OraclePreparedStatement.java:3276)
at oracle.sysman.jdbc.wrapper.OraclePreparedStatementWrapper.sendBatch(OraclePreparedStatementWrapper.java:35)
at oracle.sysman.emdrep.dbjava.loader.XMLLoaderContext.flushAllStatements(XMLLoaderContext.java:1389)
at oracle.sysman.emdrep.dbjava.loader.XMLDocumentSplitter.endElement(XMLDocumentSplitter.java:977)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1257)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:314)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:281)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:195)
at oracle.sysman.emdrep.dbjava.loader.XMLDocumentSplitter.split(XMLDocumentSplitter.java:477)
at oracle.sysman.emdrep.dbjava.loader.XMLLoaderContext.loadFromStream(XMLLoaderContext.java:1897)
at oracle.sysman.emdrep.dbjava.loader.XMLLoader.LoadFile(XMLLoader.java:607)
at oracle.sysman.emdrep.dbjava.loader.XMLLoader.LoadFiles(XMLLoader.java:740)
at oracle.sysman.emdrep.dbjava.loader.XMLLoader.run(XMLLoader.java:1396)
at java.lang.Thread.run(Thread.java:534)
After some reached it seemed that some objects under the sysman schema where not valid and therefor cause the problem.
To solve this i executed the following command which fixed the problems .
oracle@xxx:/u00/oracle/product/10.2.0/oms10g/sysman/recv/errors> sqlplus “/as sysdba”
SQL*Plus: Release 10.1.0.4.0 – Production on Wed Apr 29 18:25:57 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 – Production
With the Partitioning, OLAP and Data Mining options
SQL> conn sysman
Enter password:
Connected.
SQL> exec emd_maintenance.analyze_emd_schema(‘SYSMAN’);
PL/SQL procedure successfully completed.
SQL> exit
This process took atleast 1 hour here , so be patient !
Posted in Grid Control | 1 Comment »