https://unixoracledba.wordpress.com/2012/06/16/how-to-create-and-relocate-an-11gr2-rac-database-service/
How to see what services you have and where they are running:
[oracle@Rac1 ~]$ srvctl status service -d RAC
Service CONTACT is running on instance(s) RAC1
How to Add Service to your RAC database:
[oracle@Rac1 ~]$ srvctl add service -s NEWSRV -r RAC1 -a RAC2 -d RAC
[oracle@Rac1 ~]$ srvctl add service -s NEWSRV1 -d RAC -r rac1, rac2
How to see more detailed information about your service:
oracle@Rac1 ~]$ srvctl config service -s NEWSRV -d RAC
Service name: NEWSRV
Service is enabled
Server pool: RAC_NEWSRV
Cardinality: 1
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Failover type: NONE
Failover method: NONE
TAF failover retries: 0
TAF failover delay: 0
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: NONE
Preferred instances: RAC1
Available instances: RAC2
[oracle@Rac1 ~]$ srvctl config service -s NEWSRV1 -d RAC
Service name: NEWSRV1
Service is enabled
Server pool: RAC_NEWSRV1
Cardinality: 2
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Failover type: NONE
Failover method: NONE
TAF failover retries: 0
TAF failover delay: 0
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: NONE
Preferred instances: RAC1,RAC2
Available instances:
How to Start your Service after creating it:
[oracle@Rac1 ~]$ srvctl start service -s NEWSRV -d RAC
[oracle@Rac1 ~]$ srvctl start service -s NEWSRV1 -d RAC
How to check if your service is registered:
oracle@Rac1 ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 – Production on 16-JUN-2012 10:03:26
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
————————
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 – Production
Start Date 16-JUN-2012 08:40:17
Uptime 0 days 1 hr. 23 min. 10 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/Rac1/listener/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.103)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.113)(PORT=1521)))
Services Summary…
Service “+ASM” has 1 instance(s).
Instance “+ASM1”, status READY, has 1 handler(s) for this service…
Service “CONTACT.localdomain” has 1 instance(s).
Instance “RAC1”, status READY, has 1 handler(s) for this service…
Service “NEWSRV.localdomain” has 1 instance(s).
Instance “RAC1”, status READY, has 1 handler(s) for this service…
Service “NEWSRV1.localdomain” has 1 instance(s).
Instance “RAC1”, status READY, has 1 handler(s) for this service…
Service “RAC.localdomain” has 1 instance(s).
Instance “RAC1”, status READY, has 1 handler(s) for this service…
Service “RACXDB.localdomain” has 1 instance(s).
Instance “RAC1”, status READY, has 1 handler(s) for this service…
The command completed successfully
How to connect to your Service:
1) Add following tns entry in your tnsnames.ora
NEWSRV =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = scan-ip)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = NEWSRV.localdomain)
)
)
2) connect thru sqlplus
[oracle@Rac1 admin]$ sqlplus system@NEWSRV
SQL*Plus: Release 11.2.0.1.0 Production on Sat Jun 16 10:12:49 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> select host_name from v$instance;
HOST_NAME
—————————————————————-
Rac1.localdomain
Relocating Services:
1) Service will relocate to available instance if preferred instance becomes unavailable:
[oracle@Rac1 admin]$ ps -ef |grep smon
oracle 5346 1 0 08:39 ? 00:00:00 asm_smon_+ASM1
oracle 6245 1 0 08:40 ? 00:00:02 ora_smon_RAC1
oracle 16371 8720 0 10:13 pts/2 00:00:00 grep smon
[oracle@Rac1 admin]$ kill -9 6245
[oracle@Rac1 admin]$ ps -ef |grep smon
oracle 5346 1 0 08:39 ? 00:00:00 asm_smon_+ASM1
oracle 16488 8720 0 10:14 pts/2 00:00:00 grep smon
[oracle@Rac1 admin]$ srvctl status service -s NEWSRV -d RAC
Service NEWSRV is running on instance(s) RAC2
[oracle@Rac1 admin]$ sqlplus system@NEWSRV
SQL*Plus: Release 11.2.0.1.0 Production on Sat Jun 16 10:14:42 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> select host_name from v$instance;
HOST_NAME
—————————————————————-
Rac2.localdomain
2) You can manually relocate service back to original instance once it is back up:
[oracle@Rac1 admin]$ srvctl relocate service -s NEWSRV -d RAC -i RAC2 -t RAC1
[oracle@Rac1 admin]$ srvctl status service -s NEWSRV -d RAC
Service NEWSRV is running on instance(s) RAC1
yntax and Options
Use the srvctl add service command with the following syntax:
srvctl add service -d db_unique_name -s service_name -r preferred_list
[-a available_list] [-P TAF_policy]
Table A-6 srvctl add service Options
Option Description
-d db_unique_name
Unique name for the database.
-s service_name
The service name.
-r preferred_list
The list of preferred instances.
-a available_list
The list of available instances
-P TAF_policy
The TAF policy (NONE, BASIC, or PRECONNECT). If you choose PRECONNECT, it creates a service_Preconn
Wednesday, November 30, 2016
java.lang.ClassNotFoundException: oracle.security.jps.wls.listeners.JpsApplicationLifecycleListener
1286039.1
Click to add to Favorites Managed Server Fails to Restart with ClassNotFoundException After Deploying the Imaging Application IPM 11g (Doc ID 1286039.1) To BottomTo Bottom
In this Document
Symptoms
Changes
Cause
Solution
Applies to:
Oracle Weblogic Server - Version 10.3.3 and later
Information in this document applies to any platform.
***Checked for relevance on 5-Oct-2012***
Symptoms
A managed server fails to start from the console with the following exception, after deploying an imaging application on IPM 11g. The server starts correctly when invoking the default start up scripts. It only fails when started through console using a node manager. The following error message is reported in the log file as the cause for the deployment failure:
Caused By: java.lang.ClassNotFoundException: oracle.security.jps.wls.listeners.JpsApplicationLifecycleListener
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:280)
Changes
An imaging enterprise application (.ear file) was deployed in the IPM 11g environment.
Cause
The issue is caused because the required classes are not loaded in the classpath when starting the servers using the nodemanager; that is, the nodemanager is used when starting managed servers through console. In the nodemanager.properties files the following settings are set to false, and as a result the servers are not using the classes present in the start up script.
StartScriptEnabled=false
When the servers directly usie the startWeblogic.sh or startManagedweblogic.sh scripts, instead of via nodemanager, the servers start up correctly. This is because all the required classes are present in the classpath when using the scripts for starting the server.
Solution
Force the classpath to be set to the desired value when starting the server through the node manager. To achieve this, the most recommended and easy solution is to set the node manager to use startup scripts while starting the managed server. You can execute the following steps to implement the above solution:
Open the nodemanager.properties file
Set the following properties to 'true':
StartScriptEnabled=true
StopScriptEnabled=true
Stop the Admin Server and other servers in the domain that are running.
Restart the nodemanager.
Start the Admin Server
Retest the issue by restarting the managed server through the console.
Migrate the solution as appropriate to other environments.
oam 11g good reference
http://yagneshg.blogspot.qa/2012/02/how-to-configure-oam-11g-server-and.html
https://oraidm.wordpress.com/2014/01/30/install-and-configure-11g-oracle-access-manageroam/
Monday, November 28, 2016
ORACLE : How to DROP a User who is connected – forcefully
https://javaworks.wordpress.com/2009/10/29/oracle-how-to-drop-a-user-who-is-connected-forcefully/
The ideal way for all development shops to work is to have each developer have his own database, but as you all know life is not that easy on us!.
So you want to update the schema, which requires to drop all users and you see that your script is complaining that some of the users (in oracle users are the schemas) are still conneted and cannot be dropped. This would normally mean some one is running an application/service/App server, which is holding some connections to your database.
You have been nice to all, mailed the group, pinged some of your fellow developers, but there is a rogue application holding on to a user/schema. What would you do. wait for ever or take matter into your hands
Here is some Mojo and fire power for you to boot/kill those users force fully ( ofcourse you need to have SysDba access to the database, otherwise you are out of luck )
find the sessions for the users/schema , as a DBA use : select sid,serial# from v$session where username = ''
Then kill them with : alter system kill session ','
A query that produces ready-built kill-statements could be
select 'alter system kill session ''' || sid || ',' || serial# || ''';' from v$session where username = ''
This will return one kill statement per session for that user – something like:
alter system kill session '375,64855';
alter system kill session '346,53146';
Now Drop the user : drop user cascade;
That’s it – The User is vaporized !
Sunday, November 27, 2016
Non-Ignorable Error: ORA-01917: user or role 'ODS' does not exist
2016-11-27 15:56:27.339 INCIDENT_ERROR rcu: oracle.sysman.assistants.rcu.backend.action.ActionThread::run: Failed to execute method: Excepton:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at oracle.sysman.assistants.rcu.backend.action.ActionThread.run(JavaAction.java:510)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.sql.SQLSyntaxErrorException: ORA-01917: user or role 'ODS' does not exist
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:942)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1770)
at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1739)
at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:299)
at oracle.ias.version.SchemaVersion.grantRegistryAccess(SchemaVersion.java:2688)
at oracle.ias.version.SchemaVersion.grantRegistryAccessToComponent(SchemaVersion.java:2632)
at oracle.ias.version.SchemaVersionUtil.utilSetComponentValid(SchemaVersionUtil.java:419)
... 6 more
2016-11-27 15:56:27.341 ERROR rcu: oracle.sysman.assistants.rcu.backend.action.AbstractAction::handleNonIgnorableError: Received Non-Ignorable Error: ORA-01917: user or role 'ODS' does not exist
Solution :
orpidm@pidmdb01:/u01pd/DB/oracle/product/12.1.0/dbhome_1/network/admin$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Sun Nov 27 15:57:09 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
SQL> alter profile default limit PASSWORD_VERIFY_FUNCTION null;
Profile altered.
SQL> commit;
Commit complete.
SQL>
Sunday, November 13, 2016
Oracle JDeveloper and Oracle ADF 12c (12.2.1.1.0): New Features
Oracle JDeveloper and Oracle ADF 12c (12.2.1.1.0): New Features
http://www.oracle.com/technetwork/developer-tools/jdev/documentation/1213nf-2222743.html
https://docs.oracle.com/cd/E13224_01/wlw/docs103/guide/webapplications/workshopJSP/tutorialJSP/TutorialJSPMakeJSP.html
Thursday, November 10, 2016
Post DB Installation Tasks :
Post Installation Tasks :
sqlplus "/as sysdba"
SQL> alter system set session_cached_cursors=100 scope=spfile;
System altered.
SQL> SQL> alter system set processes=500 scope=spfile;
System altered.
SQL> SQL> alter system set aq_tm_processes=1 scope=both;
System altered.
SQL> alter system set db_cache_size=150994944 scope=both
System altered.
SQL> alter system set java_pool_size=125829120 scope=both;
System altered.
SQL> alter system set shared_pool_size=183500800 scope=both;
System altered.
SQL> alter system set open_cursors=800 scope=both;
System altered.
Subscribe to:
Posts (Atom)