ORA-01820: format code cannot appear in date input format

I don't understand why I am getting the error below. That should be valid, no?
TIA for any insight.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production
SQL>
SQL> select to_date('2004 01 3','yyyy mm w') from dual;
select to_date('2004 01 3','yyyy mm w') from dual
ERROR at line 1:
ORA-01820: format code cannot appear in date input format
SQL>
SQL> select to_char(sysdate,'yyyy mm w') from dual;
TO_CHAR(S
2008 08 1

LC,
ORA-01820:     format code cannot appear in date input format
Cause:     A date specification contained an invalid format code. Only the following may be specified when entering a date: year, month, day, hours, minutes, seconds, Julian day, A.M./P.M. and B.C./A.D.
Action:     Remove the invalid format code from the date specification.
Looking at the cause,you can't use a format code like W in the date format for converting a text to date. To_date doesn't accept it.
Aman....

Similar Messages

  • Format code cannot appear in date input format - IW related

    Hi,
    please explain what I'm doing wrong:
    SQL>  select to_char(sysdate, 'YYYY-IW') from  dual;
    TO_CHAR
    2010-48
    SQL>  select to_date('2010-22', 'YYYY-IW') from  dual;
    select to_date('2010-22', 'YYYY-IW') from  dual
    ERROR at line 1:
    ORA-01820: format code cannot appear in date input formatOracle 9.2 .
    Regards.
    Greg

    FIrst of all you should stay with the date format. Instead of converting it into a string you could TRUNCATE it to the first day of the Iso-Wekk.
    And to enable index usage you just have to put a certain range on your queries.
    example
    select *
    from t
    where col_date  >= trunc(sysdate, 'IW')  ;if col_date can hold values that are greater than syste. Or if you use another date value to compare than sysdate. Then you need to compare with a range. Just like this
    select *
    from t
    where col_date  >= trunc(sysdate, 'IW') 
    and col_date  < trunc(sysdate, 'IW')+7 ;If you want to input a certain WEEK and get all entries from that week you can start with the first day of the iso-Year and add the number of weeks to it.
    example using iso-Week 40
    select *
    from t
    where col_date  >= trunc(sysdate, 'IYYY')  + 7 * 40
    and col_date  < trunc(sysdate, 'IYYY')+7 * (40 +  1);However calendar arithmetic is complex. We have to be careful for special cases. For example the beginning of the ISO-Year 2011 is the 3rd Jan 2011. So if we run this logic on the first or second of January *2011* we would get the calendar week 40 from *2010*. This is probably not what you want.
    To take this into account we must make sure that we are using the proper year. There are several possibilities how to do it. In this case I choose to use the normal TRUNC to get the first day of the normal year (1.1.2011) then add a week and truncate again.
    example
    select *
    from t
    where col_date  >= trunc(trunc(sysdate,'YYYY)+7, 'IYYY')  + 7 * 40
    and col_date  < trunc(trunc(sysdate,'YYYY)+7, 'IYYY')+7 * (40 +  1);Edited by: Sven W. on Dec 3, 2010 8:52 AM

  • GregorianCalendar datetime format convert to  sql server date time format

    please help me
    my GregorianCalendar date time format is like this. *08/01/29 02:25:59* . I try to insert my database(sql server 2000 )
    data type is datetime ,in my database table display like this *2029-08-01 02:25:59.000* .can you help me to insert correct date in my database table like ( . *08/01/29 02:25:59*)

    use [PreparedStatement |http://java.sun.com/javase/6/docs/api/java/sql/PreparedStatement.html] and setTimestamp:
    [http://java.sun.com/docs/books/tutorial/jdbc/basics/prepared.html]

  • How to get date in format(1st jan 2006 ).

    can we get get the date in the 1st jan 2006 format .
    we can get the date in format 1 jan 2006 by using (d MMM yyyy) but i am not able to get st, nd, or rd after the day in(d mmm yyyy)format like 1st 2nd 3rd 4th

    Search and thou shall find. I read a similar thread just yesterday, school task?
    you can say that you have a String postfix, which is set like this:
    String postfix = "";
    switch(dayOfMonth) {
         case 1:case 21:case31: postfix = "st"; break;
         case 2:case 22: postfix = "nd"; break;
         case 3:case 23: postfix = "rd"; break;
         default: postfix = "th";
    }

  • ORA-01810: format code appears twice ORA-02063: preceding line from PULSARL

    Hi ,
    I am running this query
    select distinct to_char(a.USAGEDATE, 'dd/mm/yyyy hh:mm'),round((a.avgifoutoctets * a.numberofrows / (a.avgdeltatime * a.numberofrows) * 8 / 1000 ), 2)as avginoctetrate from vware.vhourlyrtgusageextract a ,vware.rtginterface b where a.id = b.ID and a.id = 125555 and a.USAGEDATE >= TO_CHAR(TO_DATE('2011-05-22 11:40:47', 'yyyy-MM-dd HH:mm:ss')) and a.USAGEDATE < TO_CHAR(TO_DATE('2011-05-29 11:40:47', 'yyyy-MM-dd HH:mm:ss')) and a.IFDESCRIPTION = 'Serial1/0' order by 1
    I am getting this exception
    ORA-01810: format code appears twice ORA-02063: preceding line from PULSARL
    Could anybody please tell me what is the issue ??

    Hi,
    The issue is:
    SQL> select TO_DATE ( '2011-05-29 11:40:47', 'yyyy-MM-dd HH:mm:ss') from dual;
    select TO_DATE ( '2011-05-29 11:40:47', 'yyyy-MM-dd HH:mm:ss') from dual
    ERROR at line 1:
    ORA-01810: format code appears twiceYou are using MM twice. MM means two digit months. You probably mean MI for minutes for the last one:
    SQL> select TO_DATE ( '2011-05-29 11:40:47', 'yyyy-MM-dd HH:mi:ss') from dual;
    TO_DATE(
    11-05-29
    SQL>Note that you have same mistake in your to_char as well, only this does not fail.
    The ORA-02063 just tells you that the error came from a different server, PULSARL, which means you must be selecting across a database link.
    Btw, what does this mean:
             AND a.usagedate >=
                   TO_CHAR (TO_DATE ( '2011-05-22 11:40:47', 'yyyy-MM-dd HH:mm:ss'))Why are you converting a string into DATE and then back into string? - What data type is usagedate?
    Regards
    Peter

  • 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

  • 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]

  • [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

  • Cannot Paste Duration data--format changes upon Paste!

    I'm pasting some tabular data and one column is Duration (Ex: 01:19:00) and when I paste the data in values like 01:19:00 become 1:19 AM.
    I need the actual durations so they can be computed.... how can I get Numbers to stop automatically changing these values???
    Thanks,
    Robert

    For those which don't want to pre-format a table, I wrote this script which protect the durations.
    CAUTION :
    as the developers forgot to include duration in the list of formats settable thru AppleScript, I apply the format text. You will have to change it to duration 0:00:00.
    --[SCRIPT iTunestoNumbers]
    Enregistrer le script en tant que Script : iTunestoNumbers.scpt
    déplacer le fichier ainsi créé dans le dossier
    <VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Numbers:
    Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
    Copier des données dans iTunes. Si elles contiennent des durées,
    aller au menu Scripts , choisir Numbers puis choisir “iTunestoNumbers”
    Le script les colle dans une table d'un nouveau document Numbers
    dont certaines colonnes sont définies au format texte pour préserver les dites durées.
    Il vous faudra retoucher le format en spécifiant durée, 0:00:00 dans l'Inspecteur de cellules.
    Je suis désolé mais les dévelopeurs ont oublié d'inclure durée dans les formats applicables à l’aide d’AppleScript.
    --=====
    L’aide du Finder explique:
    L’Utilitaire AppleScript permet d’activer le Menu des scripts :
    Ouvrez l’Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
    Cochez la case “Afficher le menu des scripts dans la barre de menus”.
    Sous 10.6.x,
    aller dans le panneau “Général” du dialogue Préférences de l’Éditeur Applescript
    puis cocher la case “Afficher le menu des scripts dans la barre des menus”.
    --=====
    Save the script as a Script: iTunestoNumbers.scpt
    Move the newly created file into the folder:
    <startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
    Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
    Copy datas from iTunes. If they contain durations,
    go to the Scripts Menu, choose Numbers, then choose “iTunestoNumbers”
    The script will paste the datas in a Numbers new table
    whose some columns are defined as text to protect the duration entries.
    You will have to adjust the format to duration 0:00:00 thru the Inspector of Cells.
    I apologize but the develpers forgot to include duration in the list of formats settable thru AppleScript.
    --=====
    The Finder’s Help explains:
    To make the Script menu appear:
    Open the AppleScript utility located in Applications/AppleScript.
    Select the “Show Script Menu in menu bar” checkbox.
    Under 10.6.x,
    go to the General panel of AppleScript Editor’s Preferences dialog box
    and check the “Show Script menu in menu bar” option.
    --=====
    Yvan KOENIG (VALLAURIS, France)
    2011/03/24
    --=====
    on run
    run script doyourduty
    --my doyourduty()
    end run
    --=====
    script doyourduty
    -- on doyourduty()
    local le_fichier, en_liste, ligne_10, nb_colonnes, colonnesdedurees, c, item_c
    local format_duree, j, r, une_ligne, en_texte, myNewDoc, n_colonnes, nb_colonnes
    my activateGUIscripting()
    Extract the datas from the clipboard.
    set en_liste to paragraphs of (the clipboard as text)
    Search values containing durations to be able to apply the format duration to their columns.
    set ligne_10 to my decoupe(item 10 of en_liste, tab)
    set nb_colonnes to count of ligne_10
    set colonnesdedurees to {}
    repeat with c from 1 to nb_colonnes
    set item_c to item c of ligne_10
    if item_c contains ":" then
    set format_duree to true
    repeat with j from 1 to count of item_c
    if character j of item_c is not in {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ":"} then
    set format_duree to false
    exit repeat
    end if
    end repeat -- with j
    if format_duree then copy c to end of colonnesdedurees
    end if -- item_c contains…
    end repeat -- with i
    Create a new Numbers document from the Apple's Blank template.
    set myNewDoc to my makeAnIworkDoc("Numbers")
    tell application "Numbers" to tell document myNewDoc to tell sheet 1 to tell table 1
    Remove header row and header column.
    remove row 1
    remove column 1
    Insert the required columns.
    set n_colonnes to count column
    repeat nb_colonnes - n_colonnes times
    add column after last column
    end repeat
    Define the format of columns which must be set to text.
    if colonnesdedurees is not {} then
    repeat with c from 1 to count of colonnesdedurees
    set une_colonne to item c of colonnesdedurees
    set format of range ((name of cell 1 of column une_colonne) & ":" & (name of cell -1 of column une_colonne)) to text
    end repeat
    end if -- colonnesdedurees is not {}…
    Define the first cell to paste in.
    set selection range to range "A1"
    end tell -- Numbers
    Concatenate the rows with carriage return as separators. Pass the result to the clipboard.
    set the clipboard to my recolle(en_liste, return)
    with timeout of (10 * 60) seconds
    my raccourci("Numbers", "v", "cas") (* Paste and Match Style *)
    end timeout
    Select every cells except the column 1.
    tell application "Numbers" to tell document myNewDoc to tell sheet 1 to tell table 1
    set selection range to range ("A1:" & name of last cell)
    end tell -- Numbers
    As there is no shortcut, trigger the menu item itself.
    my select_menu("Numbers", 6, 17) (* Table > Resize Columns to Fit Contents *)
    if colonnesdedurees is not {} then
    set colonnesde_dureestext to my recolle(colonnesdedurees, ", ")
    tell application "Numbers"
    if not my parleAnglais() then
    if (count of colonnesdedurees) = 1 then
    display dialog "Don’t forget to set the format" & return & "of column “" & colonnesdedurees & "” to duration 0:00:00 !"
    else
    display dialog "Don’t forget to set the format" & return & "of columns “" & my recolle(colonnesdedurees, ", ") & "” to duration 0:00:00 !"
    end if -- (count of colonnesdedurees)…
    else
    if (count of colonnesdedurees) = 1 then
    display dialog "N'oubliez pas de fixer le format" & return & "de la colonne « " & colonnesdedurees & " » à durée 0:00:00 !"
    else
    display dialog "N'oubliez pas de fixer le format" & return & "des colonnes « " & my recolle(colonnesdedurees, ", ") & " » à durée 0:00:00 !"
    end if -- (count of colonnesdedurees)…
    end if -- parleAnglais{}
    end tell
    end if -- colonnesdedurees is not {}…
    -- end doyourduty
    end script
    --=====
    on parleAnglais()
    local z
    try
    tell application "Numbers" to set z to localized string "Cancel"
    on error
    set z to "Cancel"
    end try
    return (z is not "Annuler")
    end parleAnglais
    --=====
    on decoupe(t, d)
    local oTIDs, l
    set oTIDs to AppleScript's text item delimiters
    set AppleScript's text item delimiters to d
    set l to text items of t
    set AppleScript's text item delimiters to oTIDs
    return l
    end decoupe
    --=====
    on recolle(l, d)
    local oTIDs, t
    set oTIDs to AppleScript's text item delimiters
    set AppleScript's text item delimiters to d
    set t to l as text
    set AppleScript's text item delimiters to oTIDs
    return t
    end recolle
    --=====
    removes every occurences of d in text t
    on supprime(t, d)
    local oTIDs, l
    set oTIDs to AppleScript's text item delimiters
    set AppleScript's text item delimiters to d
    set l to text items of t
    set AppleScript's text item delimiters to ""
    set t to l as text
    set AppleScript's text item delimiters to oTIDs
    return t
    end supprime
    --=====
    Creates a new iWork document from the Blank template and returns its name.
    example:
    set myNewDoc to my makeAnIworkDoc(theApp)
    on makeAnIworkDoc(the_app)
    local maybe, pathto_theApp, nb_doc, doc_name
    if the_app is "Pages" then
    tell application "Pages"
    set nb_doc to count of documents
    make new document with properties {template name:item 1 of templates}
    end tell
    else if the_app is "Numbers" then
    tell application "System Events" to set maybe to the_app is in title of every application process
    if not maybe then tell application the_app to activate
    tell application "System Events"
    set pathto_theApp to get application file of application process the_app
    end tell
    tell application "Numbers"
    set nb_doc to count of documents
    open ((pathto_theApp as text) & "Contents:Resources:Templates:Blank.nmbtemplate:")
    end tell
    else
    if my parleAnglais(the_app) then
    error "The application “" & the_app & "“ is not accepted !"
    else
    error "l’application « " & the_app & " » n’est pas gérée !"
    end if
    end if
    tell application the_app
    repeat until (count of documents) > nb_doc
    delay 0.1
    end repeat
    set doc_name to name of document 1
    end tell -- the_App
    return doc_name
    end makeAnIworkDoc
    --=====
    on activateGUIscripting()
    (* to be sure than GUI scripting will be active *)
    tell application "System Events"
    if not (UI elements enabled) then set (UI elements enabled) to true
    end tell
    end activateGUIscripting
    --=====
    ==== Uses GUIscripting ====
    This handler may be used to 'type' text, invisible characters if the third parameter is an empty string.
    It may be used to 'type' keyboard raccourcis if the third parameter describe the required modifier keys.
    I changed its name « shortcut » to « raccourci » to get rid of a name conflict in Smile.
    on raccourci(a, t, d)
    local k
    tell application a to activate
    tell application "System Events" to tell application process a
    set frontmost to true
    try
    t * 1
    if d is "" then
    key code t
    else if d is "c" then
    key code t using {command down}
    else if d is "a" then
    key code t using {option down}
    else if d is "k" then
    key code t using {control down}
    else if d is "s" then
    key code t using {shift down}
    else if d is in {"ac", "ca"} then
    key code t using {command down, option down}
    else if d is in {"as", "sa"} then
    key code t using {shift down, option down}
    else if d is in {"sc", "cs"} then
    key code t using {command down, shift down}
    else if d is in {"kc", "ck"} then
    key code t using {command down, control down}
    else if d is in {"ks", "sk"} then
    key code t using {shift down, control down}
    else if (d contains "c") and (d contains "s") and d contains "k" then
    key code t using {command down, shift down, control down}
    else if (d contains "c") and (d contains "s") and d contains "a" then
    key code t using {command down, shift down, option down}
    end if
    on error
    repeat with k in t
    if d is "" then
    keystroke (k as text)
    else if d is "c" then
    keystroke (k as text) using {command down}
    else if d is "a" then
    keystroke k using {option down}
    else if d is "k" then
    keystroke (k as text) using {control down}
    else if d is "s" then
    keystroke k using {shift down}
    else if d is in {"ac", "ca"} then
    keystroke (k as text) using {command down, option down}
    else if d is in {"as", "sa"} then
    keystroke (k as text) using {shift down, option down}
    else if d is in {"sc", "cs"} then
    keystroke (k as text) using {command down, shift down}
    else if d is in {"kc", "ck"} then
    keystroke (k as text) using {command down, control down}
    else if d is in {"ks", "sk"} then
    keystroke (k as text) using {shift down, control down}
    else if (d contains "c") and (d contains "s") and d contains "k" then
    keystroke (k as text) using {command down, shift down, control down}
    else if (d contains "c") and (d contains "s") and d contains "a" then
    keystroke (k as text) using {command down, shift down, option down}
    end if
    end repeat
    end try
    end tell
    end raccourci
    --=====
    my selectMenu("Numbers",6, 17) (* Table > Resize Columns to Fit Contents *)
    ==== Uses GUIscripting ====
    on selectMenu(theApp, mt, mi)
    tell application theApp
    activate
    tell application "System Events" to tell process theApp to tell menu bar 1 to ¬
    tell menu bar item mt to tell menu 1 to click menu item mi
    end tell -- application theApp
    end selectMenu
    --=====
    useful to get the indexs of the triggered item
    my select_Menu("Numbers",6, 17) (* Table > Resize Columns to Fit Contents *)
    on select_menu(theApp, mt, mi)
    tell application theApp
    activate
    tell application "System Events" to tell (first process whose title is theApp) to tell menu bar 1
    get name of menu bar items
    01 - "Apple",
    02 - "Numbers",
    03 - "File",
    04 - "Edit",
    05 - "Insert",
    06 - "Table",
    07 - "Format",
    08 - "Arrange",
    09 - "View",
    10 - "Window",
    11 - "Share",
    12 - "Help"}
    get name of menu bar item mt
    -- {"Table"}
    tell menu bar item mt to tell menu 1
    get name of menu items
    01 - "Add Row Above",
    02 - "Add Row Below",
    03 - missing value
    04 - "Add Column Before",
    05 - "Add Column After",
    06 - missing value,
    07 - "Delete Row",
    08 - "Delete Column",
    09 - missing value,
    10 - "Header Rows",
    11 - "Header Columns",
    12 - "Freeze Header Rows",
    13 - "Freeze Header Columns",
    14 - "Footer Rows",
    15 - missing value,
    16 - "Resize Rows to Fit Content",
    17 - "Resize Columns to Fit Content",
    18 - missing value,
    19 - "Unhide All Rows",
    20 - "Unhide All Columns",
    21 - "Enable All Categories",
    22 - missing value,
    23 - "Merge Cells",
    24 - "Split into Rows"
    25 - "Split into Columns"
    26 - missing value
    27 - "Distribute Rows Evenly"
    28 - "Distribute Columns Evenly"
    29 - missing value
    30 - "Allow Border Selection"
    31 - missing value
    32 - "Show Reorganize Panel"}
    get name of menu item mi
    --{"Resize Columns to Fit Content"}
    click menu item mi
    end tell -- menu bar item…
    end tell -- System Events…
    end tell -- application theApp
    end select_menu
    --=====
    --[/SCRIPT]
    Yvan KOENIG (VALLAURIS, France) jeudi 24 mars 2011 17:08:42

  • 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-01830: date format picture ends before converting entire input string at OCI call OCIStmtFetch

    Hi all,
    We are trying to create a BIP Data Model based on an Answer, but after selecting report, it hangs when I try to Apply to create a query based on Oracle BI. When I try to open the query in aswers, going to results tab I'm getting this error (OBIEE 11.1.1.6.2):
    ORA-01830: date format picture ends before converting entire input string at OCI call OCIStmtFetch
    I suppose that BIP data model is not able to create it because of this error. But this answer is working fine inside dashboards, etc. It only does not work when editing it. Query is doing something like this: "USING "- Collection Attributes"."Due Date" >= TIMESTAMPADD(SQL_TSI_DAY, -30, CAST ('01/04/2009' AS DATE))"
    Any ideas?

    Solved watching date format in generated SQL and changing default date format in presentation variables default values inside criteria according to SQL format.

  • 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

  • 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

  • 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

  • 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

Maybe you are looking for