Ansible : Invalid/incorrect password: Permission denied, please try again

Trying to work with ansible and got the below error

The inventory having the following line :-

target1 ansible_host=192.168.204.129  ansible_ssh_pass=password

When trying to run a test like the below :-

osama@ansible-controller:~/ansible_test$ ansible target1 -m ping -i /home/osama/ansible_test/inventory.txt

The following error appeared :-

target1 | UNREACHABLE! => {

    "changed": false,

    "msg": "Invalid/incorrect password: Permission denied, please try again.",

    "unreachable": true

}

To solve this error you need to set the right username and password like the following, inside the inventory add the following :-

target1 ansible_host=192.168.204.129  ansible_ssh_user=osboxes aniansible_ssh_pass=password

Run the test again by :-

osama@ansible-controller:~/ansible_test$ ansible target1 -m ping -i /home/osama/ansible_test/inventory.txt  --ask-pass

The output will be

target1 | SUCCESS => {

    "ansible_facts": {

        "discovered_interpreter_python": "/usr/bin/python3"

    },

    "changed": false,

    "ping": "pong"

If you want pre-defined VMware or virtual box you can download from HERE

Enjoy

Osama

SCHEDULER[0x51B5]:DEFAULT_MAINTENANCE_PLAN via scheduler window

Oracle Database Resource Manager (the Resource Manager) : 
enables you to optimize resource allocation among the many concurrent database sessions.

When database resource allocation decisions are left to the operating system, you may encounter the following problems:

  • Excessive overhead.

Excessive overhead results from operating system context switching between Oracle Database server processes when the number of server processes is high.

  • Inefficient scheduling

 The operating system deschedules database servers while they hold latches, which is inefficient.

  • Inappropriate allocation of resources

The operating system distributes resources equally among all active processes and is unable to prioritize one task over another.

  • Inability to manage database-specific resources, such as parallel execution servers and active sessions

Check The Resource Manager On your Database :

SQL> show parameter resource_manager_plan

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
resource_manager_plan                string      SCHEDULER[0x3003]:DEFAULT_MAIN
                                                 TENANCE_PLAN

All this is Introduction about the Error that appear when you upgrade to 11g , you will getting the following messages in the alert.log.

Setting Resource Manager plan SCHEDULER[0x51B5]:DEFAULT_MAINTENANCE_PLAN via scheduler window
Setting Resource Manager plan DEFAULT_MAINTENANCE_PLAN via parameter
Thu Feb 05 22:00:03 2009
Begin automatic SQL Tuning Advisor run for special tuning task "SYS_AUTO_SQL_TUNING_TASK"
Thu Feb 05 22:00:39 2009
End automatic SQL Tuning Advisor run for special tuning task "SYS_AUTO_SQL_TUNING_TASK"

Solution to  Disable the resource manager , Steps to Do this :

1-set the current resource manager plan to null

alter system set resource_manager_plan='' scope=both 

2-change the active windows to use the null resource manager plan 

    execute dbms_scheduler.set_attribute('WEEKNIGHT_WINDOW','RESOURCE_PLAN','');
    execute dbms_scheduler.set_attribute('WEEKEND_WINDOW','RESOURCE_PLAN','');

3-run :

SQL> execute dbms_scheduler.set_attribute('','RESOURCE_PLAN','');

You Can Also Disable SQL tuning By :

BEGIN
DBMS_AUTO_TASK_ADMIN.DISABLE(
client_name => 'sql tuning advisor',
operation => NULL,
window_name => NULL);
END;
/


Thank you
Osama Mustafa

ORA-19566 exceeded limit of %s corrupt blocks for file %s

Cause: The user specified limit of allowable corrupt blocks was exceeded 
while reading the specified datafile for a datafile copy or backup.
Action: None. The copy or backup operation fails. The session trace file
contains detailed information about which blocks were corrupt.
 
 
But The Below is Work around : 
 
  
 1)Run DBVerify utility. Have a look at Verify Physical Data Structure



For example,
 
 
 $ dbv file=/oradata2/data1/dbase1/system01.dbf 
 
 Also run this operation for against the all datafiles you suspect which has corrupt block.



2)While taking backup within RUN block specify SET MAXCORRUPT in order
to say how many corruption it can handle. I ran dbverify utility and I
saw 1 block corrupt each in SYSTEM(1) and SYSAUX(3) datafile.



3)Now backup database with SET MAXCORRUPT option.

 
Syntax : 

 
SET MAXCORRUPT FOR DATAFILE File_id For DatabaseFiles to ;
 


SET MAXCORRUPT FOR DATAFILE to ;


RMAN> RUN{

2> SET MAXCORRUPT FOR DATAFILE 1,3 to 1;

3> BACKUP DATABASE;

4> }




For datafile 1 and 3 maximum 1 block corruption can be tolerated.
 

 
Thank you 
Osama Mustafa 

 

rman-06054 media recovery requesting

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 02/13/2011 14:51:58
RMAN-06054: media recovery requesting unknown log: thread 1 seq 2 lowscn 547146
 
 
This Error Happened Sometimes When you try to restore rman backup from Real Application
Cluster To single Node 
 
Solution  

 RMAN > recover database noredo;
 

Thank you
Osama mustafa
 
 
Hope This is useful . 

500 Internal Server Error / Oracle Application Server

There’s more than One Reason For this i will provide you with two solutions (Meta-link Note):

Solution One : 

1. Backup and edit the forms configuration file (Default= formsweb.cfg)
2. Modify the HTMLdelimiter to have only one character as a value 

HTMLdelimiter=%

3. Save and exit the file.

Solution Two :

Edit oracle_apache.conf and comment out the include related to the forms.conf  as the following :

# Oracle Forms Developer
#include “/oas/product/oas2/forms/server/forms.conf”

Thank You
osama mustafa

IMP-00003 With ORA-03113/ORA-03114

Error

“IMP-00003: ORACLE error 3113 encountered, ORA-03113: end-of-file on communication channel”
 OR
“IMP-00003: ORACLE error 3114 encountered, ORA-03114: not connected to ORACLE”

Cause

 database corruption or deletion of any critical files from the Oracle database which further makes the data stored in the database inaccessible , this error can appear on any platform .

Solution

  • Login as “sys” in SQLPLUS and run the below Sqls.
  • $OH/rdbms/admin/prvtread.plb.
  • $OH/rdbms/admin/dbmsread.sql.

Retry Your Import .

Thank you
Osama Mustafa.

ORA-16018 ORA-16019

Cause : 
These two errors come whenever LOG_ARCHIVE_DEST is set as archival location and you want to set DB_RECOVERY_FILE_DEST

Solution : 

1- You need to see Archive log destination First .

SQL > archive log list ; 

Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 215
Next log sequence to archive 217
Current log sequence 217

2-You Can Check Archive Location  By Check Database Parameter

SQL> show parameter DB_RECOVERY_FILE_DEST

NAME TYPE VALUE
———————————— ———– ——————————
db_recovery_file_dest string /oradata
 db_recovery_file_dest_size big integer 10G

 3-Set New Archive Log Location

SQL> alter system set log_archive_dest=’/u01′;

alter system set log_archive_dest=’/u01′
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-16018: cannot use LOG_ARCHIVE_DEST with LOG_ARCHIVE_DEST_n or
DB_RECOVERY_FILE_DEST

4- If you want to set log_archive_dest first reset DB_RECOVERY_FILE_DEST and then set .

SQL> alter system set DB_RECOVERY_FILE_DEST=”;

System altered.

SQL> alter system set log_archive_dest=’/u01′;

System altered.

 SQL> archive log list

Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01

Oldest online log sequence 215
Next log sequence to archive 217
Current log sequence 217

5-Also if you now want to set DB_RECOVERY_FILE_DEST ORA-16019: will occur.

SQL> alter system set DB_RECOVERY_FILE_DEST=’/u02′;

alter system set DB_RECOVERY_FILE_DEST=’/u02′
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-16019: cannot use db_recovery_file_dest with LOG_ARCHIVE_DEST or
LOG_ARCHIVE_DUPLEX_DEST

 6-To set DB_RECOVERY_FILE_DEST first reset LOG_ARCHIVE_DEST.

SQL> alter system set log_archive_dest=”;

System altered.

SQL> alter system set DB_RECOVERY_FILE_DEST=’/u02′;

System altered.

 SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 215
Next log sequence to archive 217
Current log sequence 217

To set multiple location of archival destination set another log_archive_dest_n parameter like,
SQL> alter system set log_archive_dest_3=’LOCATION=/u02′;
System altered.

Thank you
Osama mustafa
 

ORA-16139: media recovery required

During switch physical standby database to primary database i received following error message on (physical standby database)

ٍٍSQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;

ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY

*ERROR at line 1:ORA-16139: media recovery required

THE SOLUTION :

SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;

SWITCHOVER_STATUS

——————–

SWITCHOVER LATENT

SQL> RECOVER MANAGED STANDBY DATABASE FINISH;

Media recovery complete.

SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;

 Metalink Note:[ID 219554.1]

Thank You
osama

UNKNOWN State Of RAC Resources

Sometimes when you check Oracle Cluster Status Via “crs_stat -t” :

------------------------------------------------------------
ora.orcl.db application ONLINE ONLINE rac1
ora....11.inst application ONLINE ONLINE rac1
ora....SM1.asm application ONLINE ONLINE rac1
ora....DC.lsnr application ONLINE ONLINE rac1
ora....idc.gsd application ONLINE ONLINE rac1
ora....idc.ons application ONLINE ONLINE rac1
ora....idc.vip application ONLINE ONLINE rac1
ora....SM2.asm application ONLINE UNKNOWN rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora....dc2.gsd application ONLINE ONLINE rac2
ora....dc2.ons application ONLINE ONLINE rac2
ora....dc2.vip application ONLINE ONLINE rac2

If You try to restart Oracle Cluster via

./crs_stop -all
./crs_start -all

It will not working so you have to do the following simple steps :

 First :

crs_stop -f Service_name
 
Example :
crs_stop -f ora.rac2.ASM2.asm 

 Second :

crs_start -f services_name

Example :

crs_start -f ora.rac2.ASM2.asm 

Thank you
Osama