Oracle User Locked(Timed)

Why Oracle user get locked(timed) ? I had change profile : PASSWORD_LIFE_TIME, PASSWORD_LOCK_TIME, PASSWORD_GRACE_TIME to UNLIMITED, but it doesn’t work.

Then I run audit trail :

  1. alter system set audit_trail=db scope=spfile; (then restart db)
  2. audit connect whenever not successful;
  3. monitoring via this query : 

    SELECT *
    FROM dba_audit_session
    WHERE action_name = ‘LOGON’ AND returncode > 0
    ORDER BY timestamp DESC;

  4. then login fail and then locked because the user password case-sensitive, so I run : alter system set sec_case_sensitive_logon=false;
  5. done ^_^

 

Reset Admin Password in Prestashop

I’ve lost the password for my localhost install, and I didn’t have a SMTP server available. So, I can’t recover my lost password.
After some googling, I found a solution that I post in here,

  1. Open the setting.inc.php (located in config folder)
  2. Copy the _COOKIE_KEY_ value
  3. Use SQL tool (PHPMyAdmin or Toad for MySQL)
  4. In SQL editor, paste this code

    UPDATE ps_employee SET passwd=md5(“newpassword”) WHERE email=”your email login”

    example:
    my _COOKIE_KEY_ = “mzRSjVM75MDsBRd6ALu5UoovCoADGX3WZITgiudEAGAEC1FG0EdDGLjc
    my new password = pshop
    then the SQL :

    UPDATE ps_employee
    SET passwd = md5(“
    mzRSjVM75MDsBRd6ALu5UoovCoADGX3WZITgiudEAGAEC1FG0EdDGLjc
    pshop“)
    WHERE email = “thepandazen@gmail.com”;

  5. Replace with the string you copy (step 2)
  6. Execute the SQL
  7. Login back to your Prestashop admin

Hope it helps someone saving some time

Tranparent Pentaho Dialog in Pentaho Administration Console

I am glad to know that the latest edition Pentaho BI Server – Community Edition today, 3.9.0, have a new visual interface (check and download the latest Pentaho BI server from sourceforge.net).

Here the screenshot on Pentaho User Console (PUC), pandazen.wordpress.com pentaho bi server 3.9

But Pentaho Administration Console (PAC) not updated, even now pentaho dialog box display transparently when I adding new database connection, pandazen-pentaho pac

I try to do some experiments (ie. check the html code in the PAC) to outsmart the above problem,

  1. add 1 line css style

    .pentaho-dialog { background-color: #00ccff;}

    to PentahoAdminConsole.html

    the result,

  2. use Onyx style,
    1. copy folder “onyx” from “pentaho-solutions\system\common-ui\resources\themes\onyx” to “administration-console\www\org.pentaho.pac.PentahoAdminConsole”
    2. <link rel=”stylesheet” href=”onyx/globalOnyx.css” type=”text/css”>

the result,

Oracle RMAN Backup Script In Oracle Linux

This is rman.sh

ORACLE_SID=ITCAPPS; export ORACLE_SID
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
rman target / log=/home/oracle/rman.log &lt;&lt; EOF
crosscheck backup;
crosscheck archivelog all;
delete noprompt expired backup;
delete noprompt expired archivelog all;
sql 'alter system switch logfile';
backup database format '/disk1/backup/full_%U.bkp';
delete noprompt obsolete;
EOF

And this is RMAN configuration,

RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name ITCAPPS are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/disk1/backup/controlfile_autobackup_%F.bkp';
CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_ITCAPPS.f'; # default

Oracle Database in Oracle Linux Cannot Start / Open

Today I mess around with the Oracle database that can not start and open. I get some error messages from various places such as alert.log, sqlplus, rman.

These errors are,

ORA-03110: end-of-file on communication channel
ORA-03135: connection lost contact
ORA-00845: MEMORY_TARGET not supported on this system
ORA-16038: log 3 sequence# 400 cannot be archived
ORA-19502: write error on file "", block number  (block size=)
ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/ITCAPPS/redo03.log'
ORA-19816: WARNING: Files may exist in db_recovery_file_dest that are not known to database.
ORA-00257: archiver error. Connect internal only, until freed.

I have do this step :
1. replace the  current spfile with the old one
2. startup with pfile
3. restore and recover database using rman

But that no help at all.

And the real solution is to enlarge the capacity of the folder where the archivelog is

Oracle Parameter optimizer_index_cost_adj Performance

From Oracle Documentation,

Default value 100
Modifiable ALTER SESSION, ALTER SYSTEM
Range of values 1 to 10000

OPTIMIZER_INDEX_COST_ADJ lets you tune optimizer behavior for access path selection to be more or less index friendly—that is, to make the optimizer more or less prone to selecting an index access path over a full table scan.

The default for this parameter is 100 percent, at which the optimizer evaluates index access paths at the regular cost. Any other value makes the optimizer evaluate the access path at that percentage of the regular cost. For example, a setting of 50 makes the index access path look half as expensive as normal.

The default value 100 and 0 for OPTIMIZER_INDEX_COST_ADJ and OPTIMIZER_INDEX_CACHING respectively are set for Data Warehouse System.

For OLTP system, setting 10 to OPTIMIZER_INDEX_COST_ADJ and 90 to OPTIMIZER_INDEX_CACHING will perform good result.

Oracle Parameter db_block_checksum Performance

From Oracle Documentation,

Default value TYPICAL
Modifiable ALTER SYSTEM
Range of values OFF | TYPICAL | FULL

DB_BLOCK_CHECKSUM determines whether DBWn and the direct loader will calculate a checksum (a number calculated from all the bytes stored in the block) and store it in the cache header of every data block when writing it to disk. Checksums are verified when a block is read – only if this parameter is TYPICAL or FULL and the last write of the block stored a checksum. In FULL mode, Oracle also verifies the checksum before a change application from update/delete statements and recomputes it after the change is applied. In addition, Oracle gives every log block a checksum before writing it to the current log.

If this parameter is set to OFF, DBWn calculates checksums only for the SYSTEM tablespace, but not for user tablespaces.

Checksums allow Oracle to detect corruption caused by underlying disks, storage systems, or I/O systems. If set to FULL, DB_BLOCK_CHECKSUM also catches in-memory corruptions and stops them from making it to the disk. Turning on this feature in TYPICAL mode causes only an additional 1% to 2% overhead. In the FULL mode it causes 4% to 5% overhead. Oracle recommends that you set DB_BLOCK_CHECKSUM to TYPICAL. For backward compatibility we preserve use of TRUE (implying TYPICAL) and FALSE (implying OFF) values.

Note: If your application is I/O intensive and you are short on CPU capacity, then you might want to disable it.

Follow

Get every new post delivered to your Inbox.

Join 38 other followers