ORA-01994: GRANT failed: password file missing or disabled

Quick tip:

[oracle@server ~]$ orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=$password entries=$num_users force=y


KB: http://docs.oracle.com/cd/B28359_01/server.111/b28310/dba007.htm#ADMIN12478

# OBS 1
“If you are running multiple instances of Oracle Database using Oracle Real Application Clusters, the environment variable for each instance should point to the same password file.”

# OBS 2
REMOTE_LOGIN_PASSWORDFILE need to be in EXCLUSIVE to alter user with sysdba.

# OBS 3
Users can be chacked on V$PWFILE_USERS.

# OBS 4
Entries represent the quantity of users on orapwd/with sysdba.


MySQL: Difference Between current_date(), sysdate() and now()

Do you know the difference?

current_date(): Only give you the date.
now(): Datetime when the statement,procedure etc… started.
sysdate(): Current datetime.

Take a look between the functions now() and sysdate() after executing sleep of 5 seconds…:

SQL> select current_date(),now(),sysdate(),SLEEP(5),now(),sysdate();
"2016-03-24";"2016-03-24 16:00:43";"2016-03-24 16:00:43";"2016-03-24 16:00:43";"2016-03-24 16:00:48"


Is My Linux Server Physical or Virtual?

Supposing you are in a server shell and don’t know if you machine is virtualized (a VM)?
One way to check that (supposing VMWare as hypervisioning solution) is:

[root@mydbsrvr ~]# dmidecode | grep -i vmware
Manufacturer: VMware, Inc.
Product Name: VMware Virtual Platform
Serial Number: VMware-xx xx xx xx xx xx xx xx-xx xx xx xx xx xx xx xx
Description: VMware SVGA II

If you had an answer like this, yes, it’s a VM. 🙂

Matheus. ORA-00600: internal error code, arguments: [7005], [0], [], [], [], [], [], [], [], [], [], []

# Error

Errors in file /oracle/diag/rdbms/mydb/mydb_1/trace/mydb_1_ora_972.trc (incident=195818):
ORA-00600: internal error code, arguments: [7005], [0], [], [], [], [], [], [], [], [], [], []
Incident details in: /oracle/diag/rdbms/mydb/mydb_1/incident/incdir_195818/mydb_1_ora_972_i195818.trc

The query causing this error uses a CONTAINS clause on alphanumerical column using bind variables. This is a perfect match with note ORA-0600 [7005] on a Select Query Using Contains Clause (Doc ID 1176276.1), referencing the unpublished Bug 8770557 ORA-600 [7005] While Running Text Queries.
The symptoms includes this two key factors:
– presence of CONTAINS clause
– use of bind variables

# Solution
Apply patchset or higher, where this issue is fixed or Apply one off Patch 8770557 if available for your version / platform.

See ya!

Error BAD_CERTIFICATE in Node Manager


Mar 8, 2016 2:41:16 PM weblogic.nodemanager.server.Handler run
WARNING: Uncaught exception in server handlerjavax.net.ssl.SSLKeyException: [Security:090482]BAD_CERTIFICATE alert was received from app1osbxpto1.localhost.net - Check the peer to determine why it rejected the certificate chain (trusted CA configuration, hostname verification). SSL debug tracing may be required to determine the exact reason the certificate was rejected.
javax.net.ssl.SSLKeyException: [Security:090482]BAD_CERTIFICATE alert was received from app1osbxpto1.localhost.net - Check the peer to determine why it rejected the certificate chain (trusted CA configuration, hostname verification). SSL debug tracing may be required to determine the exact reason the certificate was rejected.
at com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireException(Unknown Source)
at com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireAlertReceived(Unknown Source)
at com.certicom.tls.record.alert.AlertHandler.handle(Unknown Source)
at com.certicom.tls.record.alert.AlertHandler.handleAlertMessages(Unknown Source)
at com.certicom.tls.record.MessageInterpreter.interpretContent(Unknown Source)
at com.certicom.tls.record.MessageInterpreter.decryptMessage(Unknown Source)
at com.certicom.tls.record.ReadHandler.processRecord(Unknown Source)
at com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)
at com.certicom.tls.record.ReadHandler.readUntilHandshakeComplete(Unknown Source)
at com.certicom.tls.interfaceimpl.TLSConnectionImpl.completeHandshake(Unknown Source)
at com.certicom.tls.record.ReadHandler.read(Unknown Source)
at com.certicom.io.InputSSLIOStreamWrapper.read(Unknown Source)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at weblogic.nodemanager.server.Handler.run(Handler.java:71)
at java.lang.Thread.run(Thread.java:662)


source $DOMAIN_HOME/bin/setDomainEnv.sh
. $WL_HOME/server/bin/setWLSEnv.sh
java utils.CertGen -cn `hostname` -keyfilepass DemoIdentityPassPhrase -certfile mycert -keyfile mykey
java utils.ImportPrivateKey -keystore DemoIdentity.jks -storepass DemoIdentityKeyStorePassPhrase -keyfile mykey.pem -keyfilepass DemoIdentityPassPhrase -certfile mycert.pem -alias demoidentity
cp DemoIdentity.jks $WL_HOME/server/lib


Restart node manager.



The most simple way to ask for your user attention, is to popup a javascript browser question. Something like “Do you really wanna proceed?”

In the APEX world, just remember You do not need to reinvent the wheel!
Let’s use the native apex javascript Api, that comes with the function named Confirm, which ask user for a confirmation, before to submit page or before run some process.

Easy Example

First, select the button you want this behavior, then set the property Target to URL.
Second, set the target url to below javascript code, and don’t forget to adapt the message for your need’s.

   javascript:apex.confirm('Delete the user &APP_USER. Really?', 'DELETE');

The second parameter can be used to set the value of REQUEST, when the page is submitted. You can use this value selectively run some Process point,  setting the property Condition to “when request = value”.

Complex Example

For more complex needs, you can set Apex Items values, before to proceed with page submit. In this case, the second parameter should be an Object, with all items and values necessary for your page flow and correct process.

   javascript:apex.confirm("Save Department?", {
       set:{ "P1_DEPTNO":10, "P1_EMPNO":5433 } } );




Recursive string change

You want recursive change one string to another, it’s simple, you need a list with full file name path called ‘output_list’, and run command bellow:

cat output_list|while read line;
cp -p $line $line.bkp;
cat $line |sed ‘s/SOURCE_STRING/TARGET_STRING/g’ > $line.bkp && mv $line.bkp $line;

Keep in mind it’s a DANGEROUS command, double check your file list, and if necessary,  make a full backup from you system.

It will run on UNIX(ES) and Linux.