Amazon books

Thursday, March 4, 2010

Golgen Gate error when runing ggsci libclntsh.so.10.1: cannot restore segment prot after reloc: Permission denied

If you face this error below:

./ggsci: error while loading shared libraries: /ora01/F2C/F2CDEV1/db/tech_st/10.2.0/lib/libclntsh.so.10.1: cannot restore segment prot after reloc: Permission denied


Execute the following steps as root user:
getenforce
setenforce 0
getenforce

And try again.

You will need to change it permanently in your GRUB boot adding this
kernel /vmlinuz-2.6.18-8.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet enforcing=0

Wednesday, March 3, 2010

Some GoldenGate Tips

Here is a review of some commands used to install and administer Oracle Golden Gate on Unix.

##############################################################
--GG Installations

--GG Command line
./ggsci

--Create directories
CREATE SUBDIRS

--Add Manager default port
EDIT PARAMS MGR
--insert port value 7809 and save

--Change recyclebin initialization parameters to off
alter system set recyclebin=off scope=spfile;
shutdown immediate
startup

--Login / as sysdba and run the following script
SQL>@marker_setup.sql
SQL>@ddl_setup.sql (Specify schema, INITIALSETUP (for first installation),YES to purge recyclebin)
SQL>@role_setup.sql

--Grant the GG role to Extract users
SQL>GRANT GGS_GGSUSER_ROLE TO GG;

--Enable triggers
SQL>@ddl_enable.sql

--Enable Supplemental Data on Database
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;

--Create GG Server user
SQL> create user GGSERVER identified by ggserver123;

SQL> grant dba to GGSERVER;




--Start Manager
GGSCI (dbms.f2c.com.br) 2> START MANAGER


--Stop Manager
GGSCI (dbms.f2c.com.br) 2> STOP MANAGER [!]

--Start all extract groups
START EXTRACT *X*

--Show history of last commands
HISTORY

--Execute a command sequence
OBEY file_name_commands
--Example
ADD EXTRACT myext, TRANLOG, BEGIN now
START EXTRACT myext
ADD REPLICAT myrep, EXTTRAIL /ggs/dirdat/aa
START REPLICAT myrep
INFO EXTRACT myext, DETAIL
INFO REPLICAT myrep, DETAIL

--Create GLOBALS file
EDIT PARAMS ./GLOBALS
--Insert the line below to set GG schema user
GGSCHEMA gg

--Login on Database
DBLOGIN USERID gg, PASSWORD gg
##############################################################

I will post more ASAP!

Best Regards,
Paulo Portugal

Tuesday, February 9, 2010

yum Erros Cannot find a valid baseurl for repo: update

Hi,

I was creating an Amazon AMI and got the following error when runing yum utility:

Cannot find a valid baseurl for repo: update
Error: Cannot find a valid baseurl for repo: update


If you find this error just rename all files founded in/etc/yum.repos.d/ and execute the yum command again.

I hope that it works for you!

Best Regards,
Paulo Portugal

Friday, January 29, 2010

Errors RMAN-03009 ORA-19809 ORA-19804 When doing a backup

If you are trying to do a backup of your database and are receiving these errors below:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 01/11/2010 11:27:28
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 52428800 bytes disk space from 5218762752 limit

Check if you are using the db_recovery_dest as the backup destination and if yes, increase the value of db_recovery_file_dest_size initialization parameter to a value that could behave your database size.

Example:
alter system set db_recovery_file_dest_size=15G scope=both;


Best Regards,
Paulo Portugal

Friday, January 22, 2010

How to solve "Concurrent Request error Ora-20100 FND_FILE failed to create .tmp file"

If you are experiencing Ora-20100 when running a concurrent on your Oracle E-Business Suite environment, soexecute these steps below to solve this problem:

1-First, check if the .tmp file exists in the temp directory defined by $APPLPTMP variable. Example:

$echo $APPLPTMP
/usr/tmp

If is there any file with the same name but with a different owner, (this could happens if ou have a lot of EBS envronments at the same server what is not a good idead), remove this temp file and try running the concurrent again.

2- Otherwise, login through a sqlplus session using the apps user and execute command below to test generation of a temp file;
SQL> exec FND_FILE.PUT_LINE(FND_FILE.LOG, 'TEST FND_FILE Utility');

If this command shows errors like ORA-20100 and ORA-0652, then, you need to stop the concurrent manager using adcmctl script, kill all FNDLIB that are still runing and start the concurrent manager agai. Steps below:

--Login as apps application owner under OS
cd $INST_TOP (for R12)
cd admin/scripts
adcmctl stop apps/passwod

--Kill FNDLIB
ps -ef | grep FNDLIB

--Login as apps user on database and run the cmclean.sl script
SQL>show user
USER is "apps"
SQL>@cmclean.sql
SQL>commit;

--Start Concurrent manager again
adcmctl start apps/pssword

--Run the concurrent and see if the problem was solved



Best Regards,
Paulo Portugal

Saturday, November 14, 2009

Creating XA Oracle Services

--Create the service with this command
srvctl add service -d -s -r -a

--Start the service
srvctl start service -d -s

--Configure the service to use DTP that will guarantee that all global transaction will stay on the same instance
begin
DBMS_SERVICE.MODIFY_SERVICE(
service_name=>'',
dtp => TRUE
);
end;
/


--Service_name to insert into your tnsnames.ora client file
SERV_XA =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = IP_MACHINE_DB_SERVER)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = )
)
)


--If you reach ORA-12520 error and are using RAC Database then execute the following commands on one instance connected as SYSDBA

1-
sqlplus / as sysdba
SQL> alter system set local_listener='LISTENER_MIDDLE_BWMDPR1' scope=both sid='BWMDPR1'; --Use the same value that is already in use

System altered.

SQL> alter system set local_listener='LISTENER_MIDDLE_BWMDPR2' scope=both sid='BWMDPR2'; --Use the same value that is already in use

System altered.

SQL>alter system register;

System altered.

2-Stop and Start listener (reload didn't help for me!)

Wednesday, November 11, 2009

To move datafile from one disk group to another you need to follow these steps

To move datafile from one disk group to another you need to follow these steps:

1-Identify datafiles that will be moved:
SQL>select
file_name
from
dba_data_files;

2-Identify the disk group destination
--Connect to ASM instance
SQL> select
name
from
v$asm_diskgroup;

3-Take the datafile OFFLINE
SQL>alter database datafile 'file_name' offline;

4-Copy the file using either dbms_file_transfer or RMAN:
--DBMS_FILE_TRANSFER
begin
dbms_file_transfer.copy_file(
source_directory_object => 'DIR_ORIG', --This is an object directory created pointing to original datafile location
source_file_name => 'Data_File_Name.dbf',
destination_directory_object => 'DIR_DEST', --This is an object directory pointing to destination of datafile
destination_file_name => 'Data_File_Name_New.dbf');
end;

--RMAN
RMAN>copy datafile '+DG_ORIG/dbname/datafiles/Data_File_Name.dbf' TO '+DB_DEST';

5-Rename the datafile
SQL alter database rename file '+DG_ORIG/dbname/datafiles/Data_File_Name.dbf' to '+DG_DEST/db_name/datafiles/Data_File_Name_New.dbf'

6-Recover the datafile
SQL>recover datafile '+DG_DEST/db_name/datafiles/Data_File_Name_New.dbf';

7-Put the datafile ONLINE
SQL>alter database datafile '+DG_DEST/db_name/datafiles/Data_File_Name_New.dbf' online;

8-Delete the old datafile using ASMCMD
ASMCMD> cd +DG_ORIG/dbname/datafiles/
ASMCMD> rm -rf Data_File_Name.dbf

9-Backup your tablespace or your database


Best Regards,
Paulo Portugal