ORA-01157: cannot identify/lock data file error in standby database.

Hi,
i have a primary database and standby database (11.2.0.1.0) running in ASM with different diskgroup names. I applied an incremental backup on standby database to resolve archive log gap and generated a controlfile for standby in primary database and restored the controlfile in standby database.But when i started the MRP process its not starting and thows error in alert log ORA-01157: cannot identify/lock data file. When i queried the standby database file it shows the location on primary database datafiles names not the standby database.
PRIMARY DATABASE
SQL> select name from v$datafile;
NAME
+DATA/oradb/datafile/system.256.788911005
+DATA/oradb/datafile/sysaux.257.788911005
+DATA/oradb/datafile/undotbs1.258.788911005
+DATA/oradb/datafile/users.259.788911005
STANDBY DATABASE
SQL> select name from v$datafile;
NAME
+STDBY/oradb/datafile/system.256.788911005
+STDBY/oradb/datafile/sysaux.257.788911005
+STDBY/oradb/datafile/undotbs1.258.788911005
+STDBY/oradb/datafile/users.259.788911005
The Actual physical location of standby database files in ASM in standby server is shown below
ASMCMD> pwd
+STDBY/11gdb/DATAFILE
ASMCMD>
ASMCMD> ls
SYSAUX.259.805921967
SYSTEM.258.805921881
UNDOTBS1.260.805922023
USERS.261.805922029
ASMCMD>
ASMCMD> pwd
+STDBY/11gdb/DATAFILE
i even tried to rename the datafiles in standby database but it throws error
ERROR at line 1:
ORA-01511: error in renaming log/data files
ORA-01275: Operation RENAME is not allowed if standby file management is
automatic.
Regards,
007

Hi saurabh,
I tried to rename the datafiles in standby database after restoring it throws the below error
ERROR at line 1:
ORA-01511: error in renaming log/data files
ORA-01275: Operation RENAME is not allowed if standby file management is
automatic.
Also in my pfile i have mentioned the below parameters
*.db_create_file_dest='+STDBY'
*.db_domain=''
*.db_file_name_convert='+DATA','+STDBY'
*.db_name='ORADB'
*.db_unique_name='11GDB'
Regards,
007

Similar Messages

  • Java.sql.SQLException: ORA-01157: cannot identify/lock data file 7 - see DB

    I am deploying my application components on Oracle RAC database, when i install my app component i will run a script which creates a user and tablespace on bot rac-nodes(node1 and node2)
    as database is clustered, the user are created on 2 nodes and tablespace is stored in a shared location for two rac nodes
    i am able to successfully run my script on rac-node1 and and installed my component and when i started installing the app component on node2 getting error
    java.sql.SQLException: ORA-01157: cannot identify/lock data file 7 - see DBWR trace file
    ORA-01110: data file 7: '/db/db/db/ora10g/10.2.0/admin/dbadmin_01.dbf'
    ORA-06512: at "ADMIN.XL_SP_DBCHECK", line 48
    ORA-06512: at line 1
    "dbadmin_01.dbf is the custom tablespace which created by me"
    i a mgetting error while installing the app component on rac-node2

    You should not create database files outside of the ASM.
    I'm not sure you can move the datafile, I would export the data from the tablespace (if there is data you need there), delete the tablespace and recreate it in the ASM, then import the data back.
    If you want to move the datafile, you can try using RMAN (from node1).
    First connect to the database with sqlplus and execute:
    alter tablespace <tbs_name> offline;Then start RMAN: rman target /
    BACKUP AS COPY DATAFILE '<file>' FORMAT '+<ASM_DG>';Then in sqlplus, execute:
    alter tablespace <tbs_name> online;I'm not sure it will work, and I hope I got the commands right because I can't check it right now.
    Good luck
    Liron Amitzi
    Senior DBA consultant
    [www.dbsnaps.com]
    [www.orbiumsoftware.com]

  • Java.sql.SQLException: ORA-01157: cannot identify/lock data file : PLz Help

    My datafiles are in ASM file system, however the only one file ACIPEN_DATA is the one, which is not in ASM file system, and this the file which is in concern.
    We are getting the following exception in the lxkratgas1.lex1.lexmark.com when connecting to ACIPEN_DATA.
    This exception is coming up sometimes and the sometimes the file is getting processed successfully
    Caused by: java.sql.SQLException: ORA-01157: cannot identify/lock data file 9 - see DBWR trace file
    ORA-01110: data file 9: '/oracle/SE/product/10.2.0/db_1/dbs/ACIPEN_DATA'
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1169)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3368)
    at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:278)
    at atg.adapter.gsa.SQLStatement.executeUpdate(SQLStatement.java:725)
    at atg.adapter.gsa.Table.insert(Table.java:1378)
    at atg.adapter.gsa.GSAItemDescriptor.addItem(GSAItemDescriptor.java:6272)
    ... 61 more
    ====================================================================
    We have checked the datafile, it is absolutely online.
    Can some expert jump in and resolve this issue Please.

    01157, 00000, "cannot identify/lock data file %s - see DBWR trace file"
    // *Cause:  The background process was either unable to find one of the data
    //         files or failed to lock it because the file was already in use.
    //         The database will prohibit access to this file but other files will
    //         be unaffected. However the first instance to open the database will
    //         need to access all online data files. Accompanying error from the
    //         operating system describes why the file could not be identified.
    // *Action: Have operating system make file available to database. Then either
    //         open the database or do ALTER SYSTEM CHECK DATAFILES.is this a RAC database?

  • ORA-01157: cannot identify/lock data file 13 - see DBWR trace file

    Hi all,
    I've a Oracle Database 11g Release 11.1.0.6.0 - 64bit Production With the Real Application Clusters option.
    I'm using ASM.
    Yesterday I added new disks and then I changed the +/etc/udev/rules.d/98-oracle.rules+ file.
    Now it looks like this (the bolded are the new ones):
    # Oracle Configuration Registry
    KERNEL=="emcpowerd1", OWNER="root", GROUP="oinstall", MODE="640", NAME="ocr"
    # Voting Disks
    KERNEL=="emcpowerr1", OWNER="oracle", GROUP="oinstall", MODE="640", NAME="voting"
    # Spfile ASM+
    KERNEL=="emcpowers1", OWNER="oracle", GROUP="dba", MODE="660", NAME="spfileASM"
    # ASM Devices
    KERNEL=="emcpowerj1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm0" #onlineredo asm disk
    KERNEL=="emcpowern1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm1" #data asm disk
    KERNEL=="emcpowerh1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm2" #data asm disk
    KERNEL=="emcpowerq1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm3" #data asm disk
    KERNEL=="emcpowere1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm4" #data asm disk
    KERNEL=="emcpowerg1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm5" #data asm disk
    KERNEL=="emcpowerl1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm6" #data asm disk
    KERNEL=="emcpowero1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm7" #data asm disk
    KERNEL=="emcpowerf1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm8" #data asm disk
    KERNEL=="emcpowerm1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm9" #data asm disk
    KERNEL=="emcpoweri1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm10" #data asm disk
    KERNEL=="emcpowerp1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm11" #data asm disk
    KERNEL=="emcpowerk1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm12" #data asm disk
    KERNEL=="emcpowert", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm210" #data asm disk SATA
    KERNEL=="emcpowerc", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm211" #data asm disk SATA
    KERNEL=="emcpowerb", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm212" #data asm disk SATA
    KERNEL=="emcpowera", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm213" #data asm disk SATA
    It's the same on both RAC nodes.
    The operating system, a RedHat 5.4, see the new devices (both nodes):
    ls -ltr /dev/asm*
    brw-rw---- 1 oracle dba 120, 16 May 18 10:03 /dev/asm212
    brw-rw---- 1 oracle dba 120, 304 May 18 10:03 /dev/asm210
    brw-rw---- 1 oracle dba 120, 32 May 18 10:03 /dev/asm211
    brw-rw---- 1 oracle dba 120, 0 May 18 10:03 /dev/asm213
    brw-rw---- 1 oracle dba 120, 209 May 18 10:05 /dev/asm1
    brw-rw---- 1 oracle dba 120, 81 May 18 13:40 /dev/asm8
    brw-rw---- 1 oracle dba 120, 97 May 18 13:40 /dev/asm5
    brw-rw---- 1 oracle dba 120, 193 May 18 13:40 /dev/asm9
    brw-rw---- 1 oracle dba 120, 161 May 18 13:40 /dev/asm12
    brw-rw---- 1 oracle dba 120, 241 May 18 13:40 /dev/asm11
    brw-rw---- 1 oracle dba 120, 177 May 18 13:40 /dev/asm6
    brw-rw---- 1 oracle dba 120, 225 May 18 13:40 /dev/asm7
    brw-rw---- 1 oracle dba 120, 65 May 18 13:40 /dev/asm4
    brw-rw---- 1 oracle dba 120, 129 May 18 13:40 /dev/asm10
    brw-rw---- 1 oracle dba 120, 257 May 18 13:40 /dev/asm3
    brw-rw---- 1 oracle dba 120, 113 May 18 13:40 /dev/asm2
    brw-rw---- 1 oracle dba 120, 145 May 18 13:40 /dev/asm0
    Both ASM instance see new devices:
    From ASM1
    SQL*Plus: Release 11.1.0.6.0 - Production on Tue May 18 13:43:10 2010
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    Connected to:
    Oracle Database 11g Release 11.1.0.6.0 - 64bit Production
    With the Real Application Clusters option
    SQL> select instance_name from v$instance;
    INSTANCE_NAME
    +ASM1
    SQL> select path from v$asm_disk;
    PATH
    /dev/asm212
    /dev/asm211
    /dev/asm213
    /dev/asm210
    /dev/asm1
    /dev/asm4
    /dev/asm5
    /dev/asm0
    /dev/asm12
    /dev/asm9
    /dev/asm2
    /dev/asm10
    /dev/asm7
    /dev/asm11
    /dev/asm3
    /dev/asm8
    /dev/asm6
    17 rows selected.
    SQL>
    From ASM2
    SQL*Plus: Release 11.1.0.6.0 - Production on Tue May 18 13:42:39 2010
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    Connected to:
    Oracle Database 11g Release 11.1.0.6.0 - 64bit Production
    With the Real Application Clusters option
    SQL> select instance_name from v$instance;
    INSTANCE_NAME
    +ASM2
    SQL> select path from v$asm_disk;
    PATH
    /dev/asm213
    /dev/asm211
    /dev/asm210
    /dev/asm212
    /dev/asm8
    /dev/asm7
    /dev/asm6
    /dev/asm11
    /dev/asm4
    /dev/asm12
    /dev/asm5
    /dev/asm9
    /dev/asm1
    /dev/asm3
    /dev/asm10
    /dev/asm2
    /dev/asm0
    17 rows selected.
    SQL>
    Then I created a disk group:
    CREATE DISKGROUP STORE EXTERNAL REDUNDANCY DISK '/dev/asm210';
    Then I created a new tablespace:
    CREATE TABLESPACE store DATAFILE '+STORE';
    I did all this operations from NODE1.
    What is happening now is that everytime I try to read something from new diskgroup FROM NODE2 I get the ORA-01157:
    ORA-01157: cannot identify/lock data file 13 - see DBWR trace file
    ORA-01110: data file 13: '+STORE/evodb/datafile/store.256.719232707
    No problem to read from NODE1.
    The simple query on dba_data_file work from NODE1 and fails from NODE2 with the ORA-01157.
    I found this on the alert log:
    <msg time='2010-05-18T10:06:41.084+00:00' org_id='oracle' comp_id='rdbms'
    client_id='' type='UNKNOWN' level='16'
    module='' pid='11014'>
    <txt>Errors in file /u01/app/oracle/diag/rdbms/evodb/EVODB2/trace/EVODB2_smon_11014.trc:
    ORA-01157: cannot identify/lock data file 13 - see DBWR trace file
    ORA-01110: data file 13: &apos;+STORE/evodb/datafile/store.256.719232707&apos;
    </txt>
    </msg>
    And this from the trace:
    Trace file /u01/app/oracle/diag/rdbms/evodb/EVODB2/trace/EVODB2_smon_11014.trc
    Oracle Database 11g Release 11.1.0.6.0 - 64bit Production
    With the Real Application Clusters option
    ORACLE_HOME = /u01/app/oracle/product/11.1.0/db1
    System name: Linux
    Node name: node02
    Release: 2.6.18-128.7.1.el5
    Version: #1 SMP Wed Aug 19 04:00:49 EDT 2009
    Machine: x86_64
    Instance name: EVODB2
    Redo thread mounted by this instance: 2
    Oracle process number: 19
    Unix process pid: 11014, image: oracle@node02 (SMON)
    *** 2010-05-18 10:06:41.084
    *** SESSION ID:(151.1) 2010-05-18 10:06:41.084
    *** CLIENT ID:() 2010-05-18 10:06:41.084
    *** SERVICE NAME:(SYS$BACKGROUND) 2010-05-18 10:06:41.084
    *** MODULE NAME:() 2010-05-18 10:06:41.084
    *** ACTION NAME:() 2010-05-18 10:06:41.084
    DDE rules only execution for: ORA 1110
    ----- START Event Driven Actions Dump ----
    ---- END Event Driven Actions Dump ----
    ----- START DDE Actions Dump -----
    ----- DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK' (Async) -----
    Successfully dispatched
    ----- (Action duration in csec: 0) -----
    ----- END DDE Actions Dump -----
    *** 2010-05-18 10:06:41.084
    SMON: following errors trapped and ignored:
    ORA-01157: cannot identify/lock data file 13 - see DBWR trace file
    ORA-01110: data file 13: '+STORE/evodb/datafile/store.256.719232707'
    Any suggestion about how to solve the problem?
    Thanks in advance!
    Samuel

    I didn't understand what do you mean with thread...
    But I think you found the problem
    Initialization files of both ASM instance are: SPFILE='/dev/spfileASM'
    that SPFILE is (common for both):
    +ASM2.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
    +ASM2.asm_diskgroups='ONLINELOG','ARCHIVELOG','DATA'
    +ASM1.asm_diskgroups='ONLINELOG','ARCHIVELOG','DATA','STORE'#Manual Mount
    *.asm_diskstring='/dev/asm*'
    *.cluster_database=true
    *.diagnostic_dest='/u01/app/oracle'
    +ASM1.instance_number=1
    +ASM2.instance_number=2
    *.instance_type='asm'
    *.large_pool_size=12M
    +ASM1.local_listener='LISTENER_ASM'
    +AC
    Then I executed another query:
    From ASM1
    SQL> select instance_name from v$instance;
    INSTANCE_NAME
    +ASM1
    SQL> select name, state from v$asm_diskgroup;
    NAME STATE
    ARCHIVELOG MOUNTED
    DATA MOUNTED
    ONLINELOG MOUNTED
    STORE MOUNTED
    SQL>
    From ASM2
    SQL> select instance_name from v$instance;
    INSTANCE_NAME
    +ASM2
    SQL> select name, state from v$asm_diskgroup;
    NAME STATE
    ARCHIVELOG MOUNTED
    DATA MOUNTED
    ONLINELOG MOUNTED
    STORE DISMOUNTED
    SQL>
    Than the question is:
    how can I mount the disk group STORE also on ASM2?
    I think the problems is into the spfile lines:
    +ASM2.asm_diskgroups='ONLINELOG','ARCHIVELOG','DATA'
    +ASM1.asm_diskgroups='ONLINELOG','ARCHIVELOG','DATA','STORE'
    How can I change the +ASM2.asm_diskgroups value?
    Thanks

  • ASM diskgroups unmounting, getting ORA-01157: cannot identify/lock data fil

    All,
    We've recently purchased a RAMSAN device for better throughput. I created the initial diskgroup with the following syntax:
    CREATE DISKGROUP EMTPRD0X_SSD01 NORMAL REDUNDANCY
    FAILGROUP RS1 DISK '/dev/rdsk_ramsan_primary' NAME ssd_prim
    FAILGROUP RS2 DISK '/dev/rdsk_ramsan_backup' NAME ssd_bkup;
    and then created a temporary tablespace on top of that diskgroup:
    create temporary tablespace temp04 tempfile '+EMTPRD0X_SSD01' size 25g, '+EMTPRD0X_SSD01' size 25g, '+EMTPRD0X_SSD01' size 25g, '+EMTPRD0X_SSD01' size 25g, '+EMTPRD0X_SSD01' size 25g;
    Everything seemed fine at first and then end users started seeing the following errors in the alert log:
    SUCCESS: diskgroup EMTPRD0X_SSD01 was mounted
    SUCCESS: diskgroup EMTPRD0X_SSD01 was dismounted
    SUCCESS: diskgroup EMTPRD0X_SSD01 was mounted
    SUCCESS: diskgroup EMTPRD0X_SSD01 was dismounted
    Tue Oct 12 16:12:51 2010
    Errors in file /opt/oracle/oradump/emtprd02/udump/emtprd02_ora_11578.trc:
    ORA-01157: cannot identify/lock data file 3009 - see DBWR trace file
    ORA-01110: data file 3009: '+EMTPRD0X_SSD01/emtprd0x/tempfile/temp04.256.732210281'
    After talking with Oracle support I was told that the only workaround for diskgroups unmounting themselves is to put a control file/redo log/dummy tablespace inside of that diskgroup and continually write/read from it.
    Does that make sense?
    They pointed me to note 603204.1 - Why FRA Diskgroup Gets Mounted/Dismounted.
    The system is a 3 node Oracle 10.2.0.4 rac running on ASM Solaris x86 64bit.
    Any ideas?
    Thanks,
    Brian

    Post Operating System (OS) name & version for DB server system.
    Post results of
    SELECT * from v$version
    My db is not in archivelog mode poor choice
    and no backup was taken. Worse choise
    Is there any way I can recover this db? Recover as in no data loss?
    Very doubtful.
    Possible to open with data loss.
    01157, 00000, "cannot identify/lock data file %s - see DBWR trace file"
    // *Cause:  The background process was either unable to find one of the data
    //         files or failed to lock it because the file was already in use.
    //         The database will prohibit access to this file but other files will
    //         be unaffected. However the first instance to open the database will
    //         need to access all online data files. Accompanying error from the
    //         operating system describes why the file could not be identified.
    // *Action: Have operating system make file available to database. Then either
    //         open the database or do ALTER SYSTEM CHECK DATAFILES.What exactly cause this mess?
    Edited by: sb92075 on Jan 7, 2010 8:59 PM

  • -01157 cannot identify/lock datafile string - see DBWR trace file

    HI,
    -01157 cannot identify/lock datafile string - see DBWR trace file
    ora -1110 errors are throwing when iam going to startup

    872565 wrote:
    HI,
    -01157 cannot identify/lock datafile string - see DBWR trace file
    ora -1110 errors are throwing when iam going to startupDid you lookup this error on the Internet ??
    What does the alert_log tell you??
    The Google answer on this is:
    ORA-01157:cannot identify/lock data file string - see DBWR trace file
    Cause:     The background process was either unable to find one of the data files or failed to lock it because the file was already in use. The database will prohibit access to this file but other files will be unaffected. However the first instance to open the database will need to access all online data files. Accompanying error from the operating system describes why the file could not be identified.
    Action:     Have operating system make file available to database. Then either open the database or do ALTER SYSTEM CHECK DATAFILES.
    Edit: It is recommended to post database version and OS version also, including more information.
    This post of you looks like:
    Hi
    My Car is not starting. It is smoking from behind and making the weirdest sounds
    Please adviceCheers
    FJFranken
    Edited by: fjfranken on 19-jul-2011 5:33

  • ORA-12705: Cannot access NLS data files or invalid environment specified

    Hi,
    I am using Oracle 10g Express, ojdbc14.jar , apache tomcat 5 server on Linux (Fedora 6).
    In CustDisp.JSP I have following code:
    <%
    try {
    Class.forName ("oracle.jdbc.driver.OracleDriver").newInstance();
    out.println("JDBC driver loaded.<br>");
    catch (ClassNotFoundException e) {
    %>
    error :<br>
    <%=e.toString() %>
    <%
    String sql = "SELECT custid, fname, lname FROM customers";
    try {
    Connection con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","myid", "mypassword");
    out.println("Connection made.<br><br>");
    Statement s = con.createStatement();
    ResultSet rs = s.executeQuery(sql);
    %>
    When Itry to access http://localhost:8080/jsps/CustDisp.jsp,I get following error:
    java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 ORA-12705: Cannot access NLS data files or invalid environment specified.
    When I display enviorenment parameters in this JSP, I get follwing:
    JDBC driver loaded.
    Oracle Home = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server
    Language = en_US.UTF8
    NLS Language = AMERICAN_AMERICA.AL32UTF8
    Path = /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin
    Class Path = /usr/lib/jvm/java/lib/tools.jar:/usr/share/tomcat5/bin/bootstrap.jar:/usr/share/tomcat5/bin/commons-logging-api.jar:/usr/share/java/mx4j/mx4j-impl.jar:/usr/share/java/mx4j/mx4j-jmx.jar
    Charset = null
    Home = /usr/share/tomcat5
    Log Name = tomcat
    LD LIB PATH = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/nls/data/ojdbc14.jar:
    Locale = en_US
    nls data directory : /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/nls/data
    I have checked permissions for nls data folder, they are :
    Owner: Oracle
    Folder Access: Create and delete files
    Group: Dba
    Folder Access: Access files
    Others
    Folder Access: Access files
    Execute: Allow executing file as program.
    I have written a java program and used same drivers,customers table and connection i.e
    Class.forName ("oracle.jdbc.driver.OracleDriver").newInstance();
    String sql = "SELECT custid, fname, lname FROM customers";
    Connection con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","myid", "mypassword");
    it works fine and displays customers.
    Only when I try to access my CustDisp.JSP, I get
    java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 ORA-12705: Cannot access NLS data files or invalid environment specified. Error.
    Can some one please help me sorting out this problem?
    Thanks in advance.
    AQK

    Hi,
    Relevant code for CustDisp.JSP is given below:
    <%@ page session="false" %>
    <%@ page import="java.io.*" %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.sql.*" %>
    <%@ page import="oracle.jdbc.*" %>
    <%
    try {
    Class.forName ("oracle.jdbc.driver.OracleDriver").newInstance();
    out.println("JDBC driver loaded.<br>");
    catch (ClassNotFoundException e) {
    %>
    error :
    <%=e.toString() %>
    <%
    String sql = "SELECT custid, fname, lname FROM customers";
    try {
    Connection con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","myid", "mypassword");
    out.println("Connection made.<br><br>");
    Statement s = con.createStatement();
    ResultSet rs = s.executeQuery(sql);
    %>
    Permissions for nls data folder
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/nls/data/
    are :
    Owner: Oracle
    Folder Access: Create and delete files
    Group: tomcat
    Folder Access: Access files
    Others
    Folder Access: Access files
    Execute: Allow executing file as program.
    In CustDisp.JSP I have following code which accesses ojdbc14.jar
    // Check access to the nls data files.
    cfile = "";
    try{
    File myfile = new File("/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/nls/data/ojdbc14.jar");
    if (myfile.exists() == true){
    cfile="ojdbc14.jar exists in the data directory. Its length is "+ myfile.length()+" It can be read =" myfile.canRead() " , can be written = " + myfile.canWrite();
    }else{
    cfile="ojdbc14.jar does not exist.";
    catch (Exception er){
    %>
    error in reading file:<br>
    <%=er.toString() %>
    <%
    This code gives following output:
    File ojdbc14.jar exists in the data directory. Its length is 1536979 It can be read =true , can be written = false
    Every things seems to be OK but when I try to access http://localhost:8080/jsps/CustDisp.jsp, Iget:
    Sql Error:
    java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 ORA-12705: Cannot access NLS data files or invalid environment specified
    Best regards.
    AQK

  • [exec] ORA-12705: Cannot access NLS data files or invalid environment specified

    Hi all,
    We have an app running ok on WinXP, But if run on Win7 it gets error:
        [exec] Caused by: java.sql.SQLException: ORA-00604: error occurred at recur
    sive SQL level 1
         [exec] ORA-12705: Cannot access NLS data files or invalid environment speci
    fied
    Is this a sqlnet client issue?
    Thanks a lot,
    zxy

    yxes2013 wrote:
    I already google it but I am not confident about my result
    I need validation from genius guys like you
    And as long as you rely on being spoon-fed everything, you will never be confident about your result.
    Try the following:
    >change jre versión (donwload from http:www.sun.com) and declare the new JAVA_HOME variable.
    >try calling this code: Locale.setDefault(Locale.ENGLISH);
        before you open a database connection.
    > The NLS_LANG must be unset in the Windows registry (re-named is best).  Look for the NLS_LANG subkey in the registry at \HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE, and rename it.
    And where did you find that solution?
    Lie On The Internet - YouTube

  • Configuring Apach(ORA-12705: Cannot access NLS data files .. )

    Hello,
    I receive this error while configure an HTTP Server for Oracle XE Database.
    ORA-604 LogOn ORA-00604: error occurred at recursive SQL level 1\nORA-12705: Cannot access NLS data files or invalid environment specified
    The database NLS parameters is
    SQL> select * from nls_database_parameters;
    PARAMETER VALUE
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CHARACTERSET CL8MSWIN1251
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_RDBMS_VERSION 10.2.0.1.0
    DADs configuration:
    <Location /elxe>
    Order deny,allow
    PlsqlDocumentPath docs
    AllowOverride None
    PlsqlMaxRequestsPerSession 10
    PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
    PlsqlDatabaseConnectString elxe:1521:XE ServiceNameFormat
    PlsqlNLSLanguage AMERICAN_AMERICA.CL8MSWIN1251
    PlsqlAuthenticationMode Basic
    SetHandler pls_handler
    PlsqlDocumentTablename wwv_flow_file_objects$
    PlsqlDatabaseUsername APEX_PUBLIC_USER
    PlsqlDefaultPage apex
    PlsqlDatabasePassword xxxx
    Allow from all
    </Location>
    What is wrong?

    It is most likely that the NLS files are missing from the server/pc.
    Also look at the apachectl file.
    Find the following line:
    NLS_LANG=${NLS_LANG=""}; export NLS_LANG
    Modify this line to look like the following:
    NLS_LANG=AMERICAN_AMERICA.CL8MSWIN1251; export NLS_LANG
    Christopher Soza
    Oracle BI DBA
    Orix Consultancy Services Ltd
    b: http://sozaman.blogspot.com

  • ORA-12705: Cannot access NLS data files or invalid enviroment specified

    Hi, I am using Oracle 11g R2 and using the client Navicat.
    I can connect through command promt and SqlPlus absolutely fine but when I try to connect with Navicat, it wont allow me to and gives me the error in the topic. I have changed the NLS_LANG to NLS_LANG1 and double checked the ORACLE_HOME which is fine. Im not sure on how to connect with Navicat so could someone try and assist me on getting this to work?
    Thanks in advance.

    939711 wrote:
    Hi, I am using Oracle 11g R2 and using the client Navicat.
    I can connect through command promt and SqlPlus absolutely fine but when I try to connect with Navicat, it wont allow me to and gives me the error in the topic. I have changed the NLS_LANG to NLS_LANG1 and double checked the ORACLE_HOME which is fine. Im not sure on how to connect with Navicat so could someone try and assist me on getting this to work?
    Thanks in advance.
    PLEASE stop spamming this forum with issues about non-Oracle products!
    Consider to bother the actual support folks from Navicat.
    http://www.navicat.com/en/support/live.html

  • Not able to get data of primary in standby database (configured dataguard)

    Hi all, I configured dataguard in my local system, i ve a few qsns (as i am new, ve patience)
    1) scn differs wrt primary in standby (i checked, 1day difference), how to make scn same?
    2)i created a table in primary, its not refelecting in standby, (below i ve pasted alertlog entries)
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) The system cannot find the file specified.
    Errors in file d:\oracle11g\app\administrator\diag\rdbms\stand\stand\trace\stand_dbw0_6916.trc:
    ORA-01157: cannot identify/lock data file 2 - see DBWR trace file
    ORA-01110: data file 2: 'D:\ORACLE11G\APP\ADMINISTRATOR\ORADATA\STAND\SYSAUX01.DBF'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) The system cannot find the file specified.
    Errors in file d:\oracle11g\app\administrator\diag\rdbms\stand\stand\trace\stand_dbw0_6916.trc:
    ORA-01157: cannot identify/lock data file 3 - see DBWR trace file
    ORA-01110: data file 3: 'D:\ORACLE11G\APP\ADMINISTRATOR\ORADATA\STAND\UNDOTBS01.DBF'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) The system cannot find the file specified.
    Errors in file d:\oracle11g\app\administrator\diag\rdbms\stand\stand\trace\stand_dbw0_6916.trc:
    ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
    ORA-01110: data file 4: 'D:\ORACLE11G\APP\ADMINISTRATOR\ORADATA\STAND\USERS01.DBF'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) The system cannot find the file specified.
    Errors in file d:\oracle11g\app\administrator\diag\rdbms\stand\stand\trace\stand_dbw0_6916.trc:
    ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
    ORA-01110: data file 5: 'D:\ORACLE11G\APP\ADMINISTRATOR\ORADATA\STAND\EXAMPLE01.DBF'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) The system cannot find the file specified.
    Errors in file d:\oracle11g\app\administrator\diag\rdbms\stand\stand\trace\stand_dbw0_6916.trc:
    ORA-01157: cannot identify/lock data file 6 - see DBWR trace file
    ORA-01110: data file 6: 'D:\ORACLE11G\APP\ADMINISTRATOR\ORADATA\STAND\STREAM_TBS.DBF'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) The system cannot find the file specified.
    Errors in file d:\oracle11g\app\administrator\diag\rdbms\stand\stand\trace\stand_dbw0_6916.trc:
    ORA-01157: cannot identify/lock data file 7 - see DBWR trace file
    ORA-01110: data file 7: 'D:\ORACLE11G\APP\ADMINISTRATOR\ORADATA\STAND\DATA01.DBF'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) The system cannot find the file specified.
    ORA-16004 signalled during: alter database open read only...
    3)wen i try to open standby database in read only mode gives below error..how do i solve it?
    ERROR at line 1:
    ORA-16004: backup database requires recovery
    ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
    ORA-01110: data file 1:
    'D:\ORACLE11G\APP\ADMINISTRATOR\ORADATA\STAND\SYSTEM01.DBF'

    971424 wrote:
    Hi all, I configured dataguard in my local system, i ve a few qsns (as i am new, ve patience)
    1) scn differs wrt primary in standby (i checked, 1day difference), how to make scn same?Please do not use IM language here, instead of "qsns" use questions.
    SCN can be differ in standby and it can be behind to primary based on the backup you have restored. Of course by performing recovery you can synchronize standby with primary database. You can use incremental backups for standby using link http://www.oracle-ckpt.com/rman-incremental-backups-to-roll-forward-a-physical-standby-database-2/
    2)i created a table in primary, its not refelecting in standby, (below i ve pasted alertlog entries)
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) The system cannot find the file specified.
    Errors in file d:\oracle11g\app\administrator\diag\rdbms\stand\stand\trace\stand_dbw0_6916.trc:
    ORA-01157: cannot identify/lock data file 2 - see DBWR trace file
    ORA-01110: data file 2: 'D:\ORACLE11G\APP\ADMINISTRATOR\ORADATA\STAND\SYSAUX01.DBF'
    ORA-27041: unable to open fileFirst check whether those files are exist in that location or not and if file names are different other than primary then rename file locations. Also check the permissions on the folder/files.

  • ORA-01242: data file suffered media failure: database in NOARCHIVELOG mode

    Hi All,
    Need help from the gurus.
    Currently we are in state unable to do anything.
    Was using a database and all of a sudden it crashed. Tried to mount the database, open it, it failed. Also tried the recover and alter database open, even that failed. Errors are as follows.
    Errors in file e:\oracle\product\10.2.0 \admin\devrevdb\bdump\devrevdb_p000_2620.trc:
    ORA-00603: ORACLE server session terminated by fatal error
    ORA-01242: data file suffered media failure: database in NOARCHIVELOG mode
    ORA-00449: background process 'DBW0' unexpectedly terminated with error 1242
    ORA-01242: data file suffered media failure: database in NOARCHIVELOG mode
    In my spfile, the administrator has set only two control files and there is no mirroring and hence do not have another control file that will help me boot the db.
    Please let me know how I should go about it. I am only a timebeing person trying to carryout a db activity. Any help would be of great help.

    Hemant,
    thanks for the reply.
    I tried the way you suggested and it threw an error.
    ORA-01145: offline immediate disallowed unless media recovery enabled
    I searched and found that an additional tag of drop needs to be added to the command which you suggested.
    ALTER DATABASE DATAFILE '<filename>' OFFLINE DROP.
    i don't know what will the drop command have an effect ?
    i have copied the data file to another location. Since i don't know much, i just want to be sure of what im doing.
    if the above command is successfull, will it drop the datafile or the tablespace and i can no more use it. How can i use the copied datafile.
    Thanks,
    Sachin
    I

  • Sbdadm create-lu results in sbdadm: data file error

    Hello,
    I am trying to create a new thin-provisioning LUN by issueing the following:
    sbdadm --disk-size 100M /export/data.lun
    This yields this error message: sbdadm: data file error
    I have tried that on two other Solaris Express 11 installations and I seem to cannot get it to work. I have been able to import my previous COMSTAR config and I am able to access my existing iSCSI targets just fine, but I cannot create a new one.
    I actually haven't tried to run sbdadm against a real device or a zvol though.
    Anybody has experienced this?
    Thanks,
    Stephan

    I've never really used the sbdadm command, but your example seems to be missing a command keyword, such as 'create-lu', or similiar.
    sbdadm create-lu --disk-size 100M /export/data.lun
    .. or did you just forgot 'create-lu' in your post?
    .7/M.

  • ORA-00069 cannot acquire lock

    Hi, I am getting the Oracle Database error "ORA-00069 cannot acquire lock -- table locks disabled for string" in a stored proc. According to [some sites|http://oratip.com/] I looked at, it says the Cause is "A command was issued that tried to lock the table indicated in the message. Examples of commands that can lock tables are: LOCK TABLE, ALTER TABLE ... ADD (...), and so on.". And the Action they suggest is "Use the ALTER TABLE ... ENABLE TABLE LOCK command, and retry the command".
    I am not doing either a lock table or alter table command in my procedure, so what else could be causing this?
    Thank you for any help. Sorry if this is an easy one, but I am new to Oracle.
    Edited by: user2033444 on Jul 31, 2010 3:57 PM

    user2033444 wrote:
    Hi, I am getting the Oracle Database error "ORA-00069 cannot acquire lock -- table locks disabled for string" in a stored proc. According to [some sites|http://oratip.com/] I looked at, it says the Cause is "A command was issued that tried to lock the table indicated in the message. Examples of commands that can lock tables are: LOCK TABLE, ALTER TABLE ... ADD (...), and so on.". And the Action they suggest is "Use the ALTER TABLE ... ENABLE TABLE LOCK command, and retry the command".
    I am not doing either a lock table or alter table command in my procedure, so what else could be causing this?
    Thank you for any help. Sorry if this is an easy one, but I am new to Oracle.
    Edited by: user2033444 on Jul 31, 2010 3:57 PMCare to share what the stored procedure that encounters this error looks like?

  • OraRRP Error with "Unable to copy data file;Error code 2, check disk space"

    Hi,
    Some users get this message -"Unable to copy data file;Error code 2, check disk space" when run report with orarrp, but most users do not get it.
    I check free space at both server and client side, they are very sufficient.
    I also checked directory exists for REPORTXX_TMP variable.
    My user call reports via URL (rwservlet) and it occur for all reports.
    How I can solve this problem?
    Thanks in advance.
    Tawatchai R.

    Hi,
    have the same problem now. One user has temporarily problems to download .rrpa files via URL (rwservlet) request. Error code: -"Unable to copy data file;Error code 2, check disk space". Did you get a solution??
    Thanks in advance. Axel

Maybe you are looking for

  • Mavericks crash won't let me access my computer

    I upgraded to Mavericks about a week ago and nothing was wrong with it.  Then today, I go to log back into my Mac Book Pro and am unable to log in because my computer just continues to shut off.  So I booted up in safe mode and am under the Disk Util

  • CD Text on burned cd's using iTunes

    As far as i know there is no way that you can put cd test on a regular audio disk using itunes to burn it. but i was wondering if any knew of a way. I would like to get cd text on my cd's because my cd players has to capability. so if if any one know

  • CC 2014 (18.1.0) | Text Field editing causing crashes (Windows)

    Greetings; I've noticed lately that when saving files from CC 2014 to a CS6 format - and having those files edited on Mac, in either CS6 or CC - when re-opening those files text fields have been causing crashes on the Windows client. When that same f

  • Firefox freezes upon opening, although I have uninstalled the Skype toolbars add-on

    I tried opening it in Safe Mode (with all add-ons disabled) and it ran fine. I enabled the skype add-on and FF died, so my best guess is that the Skype add-on was the problem (I could enable or disable, but not uninstall). I uninstalled the add-on fr

  • Link to Idisk items

    if i add a item on the idisk ... iWeb normally copy it to the domain archive and upload it to ~/web is there a way to avoid this (like on homepage.mac.com) to make simply links to the items on the idisk ? or does soemeone know the path to access dire