Showing posts with label Errors and resolutions. Show all posts
Showing posts with label Errors and resolutions. Show all posts

Missing datafile while clone

*** This is unsupported scenraio**********Please use it at your own risk****May work only if INDEX datafile is missing while clone.

If you clone from a hot/cold backup and by mistake you miss a datafile and you have already done 'alter database open resetlogs' , Then in order to bring the missing datafile you need to copy all data files again.

What you can do it you can list the objects in the datafile and then recreate the objects.

** This is UNsupported scneraion*** but a possible scenario****

Suppose datafile is missing from WIPX tablespace.
check for the missing datafile.

SQL> select file_name from dba_data_files where tablespace_name='WIPX';

FILE_NAME
--------------------------------------------------------------------------------
/dbdata/data2/wipx05.dbf
/dbdata/data2/wipx03.dbf
/dbdata/data2/wipx01.dbf
/dbdata/data2/wipx04.dbf
/dbdata/data1/wipx07.dbf
/dbdata/data1/wipx02.dbf
/oracle/10.2.0/dbs/MISSING00894

7 rows selected.

**Find out list of objects in the datafile. I was lucky and had only one INDEX in the datafile.

SQL> select o.name from obj$ o, ind$ i, x$kccfn x
where o.obj# = i.obj#
and i.file# = x.fnfno
and x.fnnam = '/oracle/10.2.0/dbs/MISSING00894'
and o.type# = 1
order by o.name ;
2 3 4 5 6
NAME
------------------------------
WIP_DISCRETE_JOBS_N10

SQL>
SQL> select owner from dba_objects where object_name='WIP_DISCRETE_JOBS_N10';

OWNER
------------------------------
WIP

SQL> conn wip/wip
Connected.
SQL> drop index WIP_DISCRETE_JOBS_N10;

Index dropped.

Take index definition from any other instance and recreate it.

SQL> CREATE INDEX WIP.WIP_DISCRETE_JOBS_N10 ON WIP.WIP_DISCRETE_JOBS
2 (PARENT_WIP_ENTITY_ID, MANUAL_REBUILD_FLAG)
LOGGING
3 4 TABLESPACE WIPX
5 PCTFREE 10
6 INITRANS 11
7 MAXTRANS 255
8 STORAGE (
9 INITIAL 16K
10 NEXT 4M
11 MINEXTENTS 1
12 MAXEXTENTS 2147483645
13 PCTINCREASE 0
14 FREELISTS 4
15 FREELIST GROUPS 4
16 BUFFER_POOL DEFAULT
)
17 18 NOPARALLEL;

Index created.

mkstore : ORA-01017: invalid username/password; logon denied : I am entering correct password.

A strange problem:

Oracle_home: 10.2.0.1
Oracle wallet connection is setup properly.

sqlplus username/password@connectstring works fine.

When we try to connect through wallet, Then it gives invalid username/password error.

sqlplus /@connectstring gives error :

ORA-01017: invalid username/password; logon denied

Password entered was correct.

as a workaround, use a tns connect string that is not 4, 8 or 12 bytes in length.
Its unpublished bug in oracle. (4395883)
Bugs fixed in the 10.2.0.2 Patch Set

ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

Apr 3, 2010 12:30:03 AM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
CONFIG: SQLEngine created successfully and connected
Apr 3, 2010 12:30:04 AM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControl
CONFIG: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeImpl(SQLEngine.java:1650)
at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeSql(SQLEngine.java:1898)
at oracle.sysman.emcp.ParamsManager.checkListenerStatusForDBControl(ParamsManager.java:3230)
at oracle.sysman.emcp.EMReposConfig.unlockMGMTAccount(EMReposConfig.java:1000)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:345)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:157)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:253)
at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:589)
at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1448)
at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:573)
at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:521)
Apr 3, 2010 12:30:04 AM oracle.sysman.emcp.EMConfig perform
SEVERE: Listener is not up or database service is not registered with it. Start the Listener and register database service and run EM Configuration Assistant again .
Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/rac1db/emca_2010_04_03_00_28_39.log for more details.
Apr 3, 2010 12:30:04 AM oracle.sysman.emcp.EMConfig perform
CONFIG: Stack Trace:
oracle.sysman.emcp.exception.EMConfigException: Listener is not up or database service is not registered with it. Start the Listener and register database service and run EM Configuration Assistant again .
at oracle.sysman.emcp.ParamsManager.checkListenerStatusForDBControl(ParamsManager.java:3245)
at oracle.sysman.emcp.EMReposConfig.unlockMGMTAccount(EMReposConfig.java:1000)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:345)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:157)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:253)
at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:589)
at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1448)
at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:573)
at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:521)
Apr 3, 2010 12:30:04 AM oracle.sysman.emcp.EMConfig restoreOuiLoc
CONFIG: Restoring oracle.installer.oui_loc to /u01/app/oracle/product/11.2.0/db_1/oui


FIX:

make sure you have hostname and IP in /etc/hostname even if you are on local host.
and
emca -config dbcontrol db -SID rac1db -ORACLE_HOSTNAME rac1.oracle.com -PORT 1521

11gr2 on RHEL 5 missing rpms

While install 11gr2 on RHEL 5 Warning for missing packages.

gcc-4.1.2
elfutils-libelf-devel-0.125
glibc-devel-2.5
glibc-headers-2.5
gcc-c++-4.1.2

You will go in a loop if you keep finding this.
[root@rac1 Server]# rpm -Uvh glibc-2.* gcc-4*
warning: glibc-2.5-42.i686.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
error: Failed dependencies:
glibc-devel >= 2.2.90-12 is needed by gcc-4.1.2-46.el5.x86_64
[root@rac1 Server]# rpm -Uvh glibc-devel-2.5*
warning: glibc-devel-2.5-42.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
error: Failed dependencies:
glibc-headers is needed by glibc-devel-2.5-42.i386
glibc-headers = 2.5-42 is needed by glibc-devel-2.5-42.i386
glibc-headers is needed by glibc-devel-2.5-42.x86_64
glibc-headers = 2.5-42 is needed by glibc-devel-2.5-42.x86_64
[root@rac1 Server]# rpm -Uvh glibc-headers*
warning: glibc-headers-2.5-42.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
error: Failed dependencies:
kernel-headers is needed by glibc-headers-2.5-42.x86_64
kernel-headers >= 2.2.1 is needed by glibc-headers-2.5-42.x86_64
[root@rac1 Server]# rpm -Uvh kernel-headers*
warning: kernel-headers-2.6.18-164.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:kernel-headers ########################################### [100%]
[root@rac1 Server]#





Fix is :
Apply in this order.
[root@rac1 Server]# pwd
/media/Enterprise Linux dvd 20090908/Server
[root@rac1 Server]#
[root@rac1 Server]# rpm -Uvh kernel-headers*
warning: kernel-headers-2.6.18-164.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:kernel-headers ########################################### [100%]
[root@rac1 Server]# rpm -Uvh glibc-headers*
warning: glibc-headers-2.5-42.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:glibc-headers ########################################### [100%]
[root@rac1 Server]# rpm -Uvh glibc-devel-2.5*
warning: glibc-devel-2.5-42.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:glibc-devel ########################################### [ 50%]
2:glibc-devel ########################################### [100%]
[root@rac1 Server]# rpm -Uvh gcc-4*
warning: gcc-4.1.2-46.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:gcc ########################################### [100%]
[root@rac1 Server]#
[root@rac1 Server]# rpm -Uvh gcc-c*
warning: gcc-c++-4.1.2-46.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:gcc-c++ ########################################### [100%]
[root@rac1 Server]# rpm -Uvh

11g install : -bash: ulimit: pipe size: cannot modify limit: Invalid argument

[oracle@rac1 ~]$ ulimit -p 16384


-bash: ulimit: pipe size: cannot modify limit: Invalid argument

[oracle@rac1 ~]$ ulimit -p 16384

-bash: ulimit: pipe size: cannot modify limit: Invalid argument

[oracle@rac1 ~]$ ulimit -n 65536

-bash: ulimit: open files: cannot modify limit: Operation not permitted

[oracle@rac1 ~]$ ulimit -u 16384 -n 65536

-bash: ulimit: max user processes: cannot modify limit: Operation not permitted

[oracle@rac1 ~]$ exit

 
 
Fix:
 
Add the following lines to the /etc/security/limits.conf file:




oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

SP2-0642: SQL*Plus internal error state 2131, context 0:0:0. Unsafe to proceed

There was an issue today, A DBA from our team has installed four databases in same oracle home.
For one of the Database, everything was working normal.
For rest 3 DBA was getting this error while running any sql command..

SP2-0642: SQL*Plus internal error state 2131, context 0:0:0. Unsafe to proceed

Oracle suggested to relink the Oracle executables and We checked the sudo bit on oracle executable also.

Then,

I compared the spfile for all four instances and found.

The working Database had NLS_DATE_FORMAT =
And Non working Databases were having NLS_DATE_FORMAT='DD-MM-YYYY'

As the date format was different and after unsetting DD-MM-YYYY , all Databases worked fine.


Now , I have a question , That all DB under one oracle home must have the same NLS_DATE_FORMAT  ? OR same NLS_Parameters.

I will try to find more on this.

make -f ins_forms60w.mk install fails

I am trying to apply the developer patch 6194129
As a post patch step, I am trying to relink the forms executables using make

make -f ins_forms60w.mk install : trying to fix this.......


ld: 0711-773 WARNING: Object /u01/app/oradba01/product/dba01db/8.0.6/lib//libuimotif60.a[uirf.o], imported symbol xmTextFieldWidgetClass
Symbol was expected to be local. Extra instructions
are being generated to reference the symbol.
make: 1254-053 Command "$(GENERICMSG)" expands to empty string.

ld -brtl -o f60cgi -L/u01/app/oradba01/product/dba01db/8.0.6/lib/ -L/u01/app/oradba01/product/dba01db/8.0.6/forms60/lib/ /u01/app/oradba01/product/dba01db/8.0.6/forms60/lib/izcgi.o /u01/app/oradba01/product/dba01db/8.0.6/forms60/lib/izc.o /u01/app/oradba01/product/dba01db/8.0.6/forms60/lib/izs0main.o -ld2la60 -lcore4 -lld -lm `cat /u01/app/oradba01/product/dba01db/8.0.6/lib/sysliblist` -lm ;
mv f60srvm /u01/app/oradba01/product/dba01db/8.0.6/bin/
mv f60webm /u01/app/oradba01/product/dba01db/8.0.6/bin/
mv f60cgi /u01/app/oradba01/product/dba01db/8.0.6/bin/
chmod 755 /u01/app/oradba01/product/dba01db/8.0.6/bin/f60srvm
chmod 755 /u01/app/oradba01/product/dba01db/8.0.6/bin/f60webm
chmod 755 /u01/app/oradba01/product/dba01db/8.0.6/bin/f60cgi
chmod 755 /u01/app/oradba01/product/dba01db/8.0.6/tools/web60/cgi/f60cgi
mkdir -p /u01/app/oradba01/product/dba01db/8.0.6/tools/web60/cgi
cp -p /u01/app/oradba01/product/dba01db/8.0.6/bin//f60cgi /u01/app/oradba01/product/dba01db/8.0.6/tools/web60/cgi
rm -f /u01/app/oradba01/product/dba01db/8.0.6/lib/libifjapi60.so
ar x /u01/app/oradba01/product/dba01db/8.0.6/lib/libifjapi60.a context.o create.o destroy.o formsapi.o iauasst.o iauexcep.o ifjapi.o objlib.o persistc.o
/bin/sh: not found

make: 1254-004 The error code from the last command is 1.



Fix:

Issue is fixed by this:

ncargs is set to a very low value at OS. It should be around 128. ncargs system attribute must be set to a high value. The ncargs attribute controls the maximum command line length, including environment variables, on AIX nodes.

$ lsattr -EH -l sys0 |grep ncargs

ncargs 6 ARG/ENV list size in 4K byte blocks True


Run the following command to increase ncargs system attribute
e.g
/usr/sbin/chdev -l sys0 -a ncargs=128
You should get something like this:
ncargs 128 ARG/ENV list size in 4K byte blocks True