Error during open standby database in read only mode

hi,
alter database open read only;
alter database open read only
ERROR at line 1:
ORA-10458: standby database requires recovery
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/u02/app/oracle/oradata/standby/system01.dbf'
Detailed OCI error val is 12154 and errmsg is 'ORA-12154: TNS:could not resolve the connect identifier specified
what is the reason of this.
Thanks in advance.

thanks for your reply.
[oracle@standby admin]$ cat listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.105.1.124)(PORT = 1521))
LISTENER_STANDBY =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.105.1.124)(PORT = 1521))
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME =/opt/app/oracle/product/11.2.0/db_1)
(PROGRAM = extproc)
tnsfile
[oracle@standby admin]$ cat tnsnames.ora
standby =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =10.105.1.124)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = standby)
ora11g =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =10.105.1.120)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ora11g)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.105.1.120)(PORT = 1521))
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
pfile
[oracle@standby standby]$ cat initstandby.ora
ora11g.__db_cache_size=130023424
ora11g.__java_pool_size=4194304
ora11g.__large_pool_size=4194304
ora11g.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
ora11g.__pga_aggregate_target=146800640
ora11g.__sga_target=276824064
ora11g.__shared_io_pool_size=0
ora11g.__shared_pool_size=121634816
ora11g.__streams_pool_size=8388608
*.audit_file_dest='/u01/app/oracle/admin/ora11g/adump'
*.audit_trail='db'
*.compatible='11.2.0.1.0'
#*.control_files='/u02/app/ora11g/oradata/ora11g/control01.ctl','/u01/app/oracle/flash_recovery_area/ora11g/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='ora11g'
*.db_recovery_file_dest='/opt/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=4039114752
*.diagnostic_dest='/opt/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=ora11g)'
*.memory_target=2016M
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
*.audit_file_dest='/opt/app/oracle/admin/standby/adump'
*.audit_trail=none
#*.background_dump_dest='/opt/app/oracle/admin/standby/bdump'
#*.compatible='10.2.0.2.0'
#*.control_files='/opt/app/oracle/oradata/standby/control01.ctl'
#,'/opt/app/oracle/oradata/standby/control02.ctl','/opt/app/oracle/or
*.control_files='/u02/app/oracle/oradata/standby/control_sb01.ctl'
#,'/u02/app/oracle/oradata/standby/control_02.ctl','/u02/app/oracle/oradata/standby/control_03.ctl'
*.core_dump_dest='/u01/app/oracle/diag/rdbms/standby/standby/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
#*.db_name='standby'
#*.dispatchers='(PROTOCOL=TCP) (SERVICE=standby)'
*.job_queue_processes=10
*.log_archive_dest_1='location=/opt/app/oracle/arch'
*.log_archive_config='dg_config=(standby,ora11g)'
*.log_archive_dest_1='LOCATION=/opt/app/oracle/oradata/standby/archivelog'
*.log_archive_dest_2='service=orcl valid_for=(online_logfiles,primary_role) db_unique_name=ora11g'
*.log_archive_format='%t_%s_%r.dbf'
*.standby_file_management=auto
*.db_unique_name =standby
*.fal_server='ora11g'
*.fal_client='standby'
*.service_names='standby'
*.open_cursors=300
*.pga_aggregate_target=525336576
*.processes=1500
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=1576009728
*.undo_management='AUTO'
*.undo_tablespace='undotbs02'
#*.user_dump_dest='/opt/app/oracle/diag/rdbms/standby/standby/trace'
*.standby_file_management ='manual'
*.instance_name =standby
#*.standby_archive_dest=/opt/app/oracle/oradata/standby/archivelog
*.db_file_name_convert=(/u02/app/ora11g/oradata/ora11g,/u02/app/oracle/oradata/standby)
*.log_file_name_convert='/u02/app/ora11g/oradata/ora11g','/u02/app/oracle/oradata/standby'
#*.remote_listener=LISTENER_ora11g

Similar Messages

  • ORA-01578 about standby database in read only mode

    Hi,
    I have an ORA-05178 (data block corrupted) about a standby database which in read-only mode. About production database, there is no problem.
    After analyze, this is an index segment :
    SELECT segment_name , segment_type , owner , tablespace_name
    FROM sys.dba_extents
    WHERE file_id = 58
    AND 218173 BETWEEN block_id and block_id + blocks -1
    SEGMENT_NAME SEGMENT_TYPE OWNER TABLESPACE_NAME
    SICINHIS01 INDEX MOWIN IDX_DATA01
    There is no constraint.
    How can I repair this problem ?
    Nicolas

    Hi,
    I have an ORA-05178 (data block corrupted) about a standby database which in read-only mode. About production database, there is no problem.
    After analyze, this is an index segment :
    SELECT segment_name , segment_type , owner , tablespace_name
    FROM sys.dba_extents
    WHERE file_id = 58
    AND 218173 BETWEEN block_id and block_id + blocks -1
    SEGMENT_NAME SEGMENT_TYPE OWNER TABLESPACE_NAME
    SICINHIS01 INDEX MOWIN IDX_DATA01
    There is no constraint.
    How can I repair this problem ?
    Nicolas

  • Cannot open standby database in read only....

    i do the following procedure on my standby database
    ORACLE 9.2.0.7
    SQL> startup nomount
    ORACLE instance started.
    Total System Global Area 538412112 bytes
    Fixed Size 742480 bytes
    Variable Size 402653184 bytes
    Database Buffers 134217728 bytes
    Redo Buffers 798720 bytes
    SQL> lter database mount standby database;
    SP2-0734: unknown command beginning "lter datab..." - rest of line ignored.
    SQL> alter database mount standby database;
    Database altered.
    SQL> SQL> recover standby database until cancel;
    ORA-00279: change 4274363673 generated at 09/18/2006 11:25:08 needed for thread
    1
    ORA-00289: suggestion : /u12/oradata/dbadmon/arch/dbadmon9135.arc
    ORA-00280: change 4274363673 for thread 1 is in sequence #9135
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    auto
    ORA-00279: change 4275275613 generated at 09/18/2006 14:03:09 needed for thread
    1
    ORA-00289: suggestion : /u12/oradata/dbadmon/arch/dbadmon9136.arc
    ORA-00280: change 4275275613 for thread 1 is in sequence #9136
    ORA-00278: log file '/u12/oradata/dbadmon/arch/dbadmon9135.arc' no longer
    needed for this recovery
    ORA-00308: cannot open archived log '/u12/oradata/dbadmon/arch/dbadmon9136.arc'
    ORA-27037: unable to obtain file status
    IBM AIX RISC System/6000 Error: 2: No such file or directory
    Additional information: 3
    SQL> alter database open read only;
    alter database open read only
    ERROR at line 1:
    ORA-01092: ORACLE instance terminated. Disconnection forced
    THEN i check in the alert...
    Errors in file /u00/oracle/admin/dbadmon/udump/dbadmon_ora_24028.trc:
    ORA-00704: bootstrap process failure
    ORA-00600: internal error code, arguments: [2652], [76], [76], [0], [0], [787456], [], []
    Mon Sep 18 13:59:16 2006
    Error 704 happened during db open, shutting down database
    USER: terminating instance due to error 704
    Instance terminated by USER, pid = 24028
    ORA-1092 signalled during: alter database open read only...
    followed by the trace file...
    /u00/oracle/admin/dbadmon/udump/dbadmon_ora_24028.trc
    Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.7.0 - Production
    ORACLE_HOME = /u00/oracle/product/9.2.0.1
    System name: AIX
    Node name: eserver1
    Release: 1
    Version: 5
    Machine: 000651FA4C00
    Instance name: dbadmon
    Redo thread mounted by this instance: 1
    Oracle process number: 14
    Unix process pid: 24028, image: oracle@eserver1 (TNS V1-V3)
    *** SESSION ID:(11.1) 2006-09-18 13:58:57.859
    Start recovery at thread 1 ckpt scn 4274363673 logseq 9135 block 2
    *** 2006-09-18 13:59:00.215
    Media Recovery Log /u12/oradata/dbadmon/arch/dbadmon9135.arc
    *** 2006-09-18 13:59:11.868
    Media Recovery Log /u12/oradata/dbadmon/arch/dbadmon9136.arc
    ----- Redo read statistics for thread 1 -----
    Read rate (ASYNC): 27062Kb in 13.99s => 1.86 Mb/sec
    Longest record: 8Kb, moves: 22/97639 (0%)
    Change moves: 43706/193539 (22%), moved: 4Mb
    *** 2006-09-18 13:59:14.688
    ksedmp: internal or fatal error
    ORA-00600: internal error code, arguments: [2652], [76], [76], [0], [0], [787456], [], []
    Current SQL statement for this session:
    select /*+ rule */ name,file#,block#,status$,user#,undosqn,xactsqn,scnbas,scnwrp,DECODE(inst#,0,NULL,inst#),ts#,spare1 from undo$
    where us#=:1
    ----- Call Stack Trace -----
    calling call entry argument values in hex
    location type point (? means dubious value)
    ksedmp+0148 bl ksedst 1029170CC ?
    ksfdmp+0018 bl 01FD771C
    kgeriv+0118 bl _ptrgl
    kgesiv+0080 bl kgeriv FFFFFFFFFFEBEF0 ? 080000000 ?
    101A6C640 ? 000000000 ?
    FFFFFFFFFFEBE70 ?
    ksesic5+005c bl kgesiv 70000000E517A78 ?
    70000000E517748 ?
    Can anyone gie me a hand please???
    Thanks in advance.

    Doc ID: Note:1038418.6
    Please check permissions on dump desitnation directory.
    Also check if dual table is present.

  • Opening a Standby Database in Read-Only mode

    Is there anyway to open a Standby database up to date as of a certain time? I'm currently using the 2 commands to get close to the time required.
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
    Such as, similar to this? RECOVER DATABASE UNTIL TIME '2012-01-25:15:00:00';
    We're on 11.1.0.7, which I'm currently very unhappy with.
    Thanks for any help, as my google-fu hasn't worked today.
    James

    Maybe
    I did a quick test :
    8:42 open the databases and start recovery
    8:43 check status from primary
    Shows sequence 75
    and "TO STANDBY" for switchover status
    Did log switches at 8:44, 8:45, and 8:46
    8:50
    SQL> alter database recover managed standby database cancel;
    SQL> RECOVER STANDBY DATABASE UNTIL TIME ' 2012-01-25:20:43:00';
    Media recovery complete.
    SQL>
    8:52
    SQL> alter database recover managed standby database disconnect from session;
    Database altered.
    Check status
    TO STANDBY and sequence 78Still need to check alert logs and do another log switch. It checks out so the quick test works.
    However the quick test is incomplete since there was no before and after data in the test and the time period was very short.
    Andy may be right, but I would test, test test. ( if you do please let us know the results )
    Thanks Andy!
    Best Regards
    mseberg
    Later
    After sleeping on this I decided my first thought is probably correct. You cannot go back in time and still be in sync. While the test statement did not error or produce any alert log entries, it probably did nothing. Oracle is smart enough to know you cannot have your Cake and eat it too.

  • How to open a "manual" Physical standby database in read/write mode

    Hi,
    I am running Oracle Database 10g Release 10.2.0.3.0 - 64bit Production Standard Edition on Linux version 2.6.9-42.0.8.ELsmp ([email protected]) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-3))
    I've created a physical standby database, but since I am running Standard Edition, I am not using the DataGuard features. I use the rsync utility to copy over the archivelogs to the standby database, and I apply them periodically to the standby database.
    The standby database is started this way :
    startup nomount pfile='/u01/oradata/orcl/initorcl.stdby';
    alter database mount standby database;
    Everything runs perfectly fine, I can do "alter database open read only" and then I can do selects into tables to confirm that everything is up to date.
    The thing is, if I shutdown immediate the database, then do just startup :
    shutdown immediate;
    startup;
    The database opens with no error messages, but is still in read-only mode...
    I read that the default behavior for a standby database is to open read-only, like I am experiencing, but I would like to know what is the right way to open it correctly in read-write mode (I understand that after that, my standby will not be standby anymore and that I will have to recreate my standby database).
    Thanks,
    Mat

    Hello,
    There're features which allows you to open a Standby database in Read/Write mode but for all I know
    it needs Entreprise Edition.
    In Enterprise Edition you can use Logical Standby database. More over, for Physical standby there's
    a way by using flashback database so as to rolling backward the database and avoiding to recreate
    the Standby.
    In Standard Edition I'm afraid that you'll have to recreate your Standby database.
    Best regards,
    Jean-Valentin

  • Unable to open database in READ ONLY mode

    When trying to open database in READ ONLY MODE it says needs recovery. How ever database opens succesfully in READ WRITE MODE.
    1) Startup mount
    2) SQL> ALTER DATABASE OPEN READ ONLY;
    ALTER DATABASE OPEN READ ONLY
    ERROR at line 1:
    ORA-16005: database requires recovery
    But database opens succesfully when opened in READ WRITE mode.

    user12038051 wrote:
    When trying to open database in READ ONLY MODE it says needs recovery. How ever database opens succesfully in READ WRITE MODE.
    1) Startup mount
    2) SQL> ALTER DATABASE OPEN READ ONLY;
    ALTER DATABASE OPEN READ ONLY
    ERROR at line 1:
    ORA-16005: database requires recovery
    But database opens succesfully when opened in READ WRITE mode.
    sqlplus '/as sysdba'
    shutdown imediate;
    startup;
    shutdown imediate;
    startup mount;
    recover database;
    alter database open read only;

  • Issue regarding open word file and read only mode using c# & MS-word interop

    i am programmatically open a word file for search and highlight keyword. my routine is working fine. the problem is when i am opening the file programmatically then a dialog come and ask me to open file in read only mode. the dialog look like below one
    actually i do not want to open the file in read only mode because people can open and like to change and save. so guide me what i can do to not to open the file in read only mode.
    here is my full code. just have a look and tell me what is wrong in my code or tell me any trick as a result i can open the file not in read only mode. here is my code.
    private void button1_Click(object sender, EventArgs e)
                object fileName = "";
                string filePath = "";
                string strSaveasPath = "";
                DialogResult result = openFileDialog1.ShowDialog();
                if (result == DialogResult.OK)
                    fileName = openFileDialog1.FileName;
                    //strSaveasPath = Path.GetDirectoryName(path.ToString());
                //fileName = "Z:\\C0000000003.doc";
                List<string> _list = new List<string>();
                _list.Add("tridip");
                _list.Add("arijit");
                //object fileName = "D:\\CVArchievePath\\C0000000001.doc";
                object textToFind = "test";
                object readOnly = false;
                Word.Application word = new Word.Application();
                Word.Document doc = new Word.Document();
                object missing = Type.Missing;
                try
                    doc = word.Documents.Open(ref fileName, ref missing, ref readOnly,
                                              ref missing,
    ref missing, ref missing,
                                              ref missing,
    ref missing, ref missing,
                                              ref missing,
    ref missing, ref missing,
                                              ref missing,
    ref missing, ref missing,
                                              ref missing);
                    doc.Activate();
                    object matchPhrase = false;
                    object matchCase = false;
                    object matchPrefix = false;
                    object matchSuffix = false;
                    object matchWholeWord = false;
                    object matchWildcards = false;
                    object matchSoundsLike = false;
                    object matchAllWordForms = false;
                    object matchByte = false;
                    object ignoreSpace = false;
                    object ignorePunct = false;
                    object highlightedColor = Word.WdColor.wdColorGreen;
                    object textColor = Word.WdColor.wdColorLightOrange;
                    object missingp = false;
                    Word.Range range = doc.Range();
                    foreach (string line in _list)
                        textToFind = line;
                        bool highlighted = range.Find.HitHighlight(ref textToFind,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing);
                    System.Diagnostics.Process.Start(fileName.ToString());
                catch (Exception ex)
                    Console.WriteLine("Error : " + ex.Message);
                    //Console.ReadKey(true);
                finally
                    //doc.Close(missing, missing, missing);
                    if(doc!=null)
                        System.Runtime.InteropServices.Marshal.ReleaseComObject(doc);
                    if (word != null)
                        System.Runtime.InteropServices.Marshal.ReleaseComObject(word);
                    word = null;
                    doc = null;
                    GC.Collect();
                    GC.WaitForPendingFinalizers();

    I know it's a very old issue and I reached to this page looking for a solution. Finally, I have found a fix to this problem.
    The problem is that we create an instance of Word and do not close it correctly. This makes program believe that the file is already open and hence you're getting the respective message of file being locked by you.
    Set the visibility of your application to true and then when you close it both file and instance should close and you will not get the problem again.

  • Open EBS 115102 in read only mode

    Hi,
    I have upgraded our EBS 11510 to 1213 , on oracle 11202 DB.
    I have cloned a copy of the database and app. before the upgrade.
    I would like to give the end users an ability to open the old application and the db in read only mode.
    It is possible the open the application in read only mode ?
    If nnot what is my option the give an old-enchanged application to the end users , so they can compare diffs between old and new app ?
    Thanks
    Yoav

    Yoav wrote:
    Hi,
    I have upgraded our EBS 11510 to 1213 , on oracle 11202 DB.
    I have cloned a copy of the database and app. before the upgrade.
    I would like to give the end users an ability to open the old application and the db in read only mode.
    It is possible the open the application in read only mode ?
    If nnot what is my option the give an old-enchanged application to the end users , so they can compare diffs between old and new app ?
    Thanks
    YoavPlease see (Using Active Data Guard Reporting with Oracle E-Business Suite Release 12.1 and Oracle Database 11g [ID 1070491.1]).
    Thanks,
    Hussein

  • I am not able to use Firefox with Sharepoint - I can only open a file in read-only mode and cannot checkout the document and edit.

    I would like to use Firefox with Sharepoint.
    However, I am only able to open a file in "read only" mode whch means I cannot edit the document and save it. I am also not able to "check-out" a document in Sharepoint and edit it at the same time.

    This may not work for everyone, but I solved this problem by clicking on the file name in sharepoint, not the document icon to the left of the name. This then brought up the various options, including checking out, editing, version history etc. It seems obvious but I have only just realised this!

  • Putting apps database in Read-Only mode

    Hi,
    I want to put the apps database in read-only mode to that user will be able to login into the applications and see data but will not be able to update it.
    What is the best way to do this?
    Thanks

    I am still looking at how to do this because if users
    update the UAT/test database, when the prod upgrade
    is completed, they will think that their updates will
    be available and this will cause some issues.This is a training/expectation-setting issue, not a technical one. You need to make sure that your users understand the difference between a test system and production, and that changes made in testing will not be present in production. They also need to understand that this situation is actually to their benefit: it enables them to really work with the test system to uncover potential problems and learn new features, without fear of making changes that could negatively impact their day-to-day work in production.
    Please note that I'm not trying to be a jerk here. I very respectfully submit that attempting to make an instance read-only for training purposes, even if possible, will involve a great deal of technical work for very little (and perhaps even negative) overall benefit to the users.
    Regards,
    John P.

  • Open a document in read only mode

    HI All,
    I created a panel in which we have
    edit box which shows the document path
    Browse button to allow a user to select an indesign document
    "Open read only" button.
    My requirement is that after selecting an Indesign document if user click to "OPen read only" button then it will opened selected document in read only mode.
    I will be highly thankfull to all community memeber if anyone can give me some hint to achieve this.
    Regards,
    Alam

    Alam,
    If you change the attributes of the file before opening it to read only the file will be opened as read only by Indesign. And then you could place a responder that could clear this read only flag when the file is being closed so that the permissions are restored to the original state.
    Manan Joshi
      - Efficient InDesign Solutions -
    MetaDesign Solutions
    http://metadesignsolutions.com/services/indesign-development.php

  • Standby Database - from READ-ONLY to Managed Recovery

    We have a standby database set up for our production environment.
    We are able to switch logfile on production and perform the managed recovery and then switch over to READ-ONLY mode. However, when the database is in READ-ONLY mode...I cannot close it if there are active connections.
    There are 2 ways I can attempt to close the database...either by "shutdown immediate" or by issuing an "alter system kill session (##,##);"
    If I issue the "shutdown immediate", then the RFS process does not transmit any more files...saying the connection to host is not there. Therefore this is not a valid solution.
    I can use an alter system kill...to kill all active connections...but it would require to know what other connections are there.
    Does anybody know how to best do this...to close the database by forcing all connections to end (except your current one) so you can "alter database close" and switch over to managed recovery?
    Please HELP!
    Thanks.
    -Nicolas

    u just shutdown the server and restart in standby mode. it will apply all pending archive autometically.

  • Starting database in Read only mode

    hi,
    i am using oracle 8i, we want to copy the Production database to other machine, but on starting that m/c database should be opened in read only mode without DBA interaction what to do for that. pl tell
    thanx in advance

    SQL> STARTUP MOUNT
    ORACLE instance started.
    Total System Global Area 177281688 bytes
    Fixed Size 453272 bytes
    Variable Size 150994944 bytes
    Database Buffers 25165824 bytes
    Redo Buffers 667648 bytes
    Database mounted.
    SQL> ALTER DATABASE OPEN READ ONLY;
    Database altered.
    SQL> DELETE FROM SCOTT.EMP;
    DELETE FROM SCOTT.EMP
    ERROR at line 1:
    ORA-16000: database open for read-only access
    kuljeet pal singh

  • Is it possible to have a 10g (R1) LOGICAL standby db in read-ONLY mode?

    From what I've gathered reading the 10g (R 1) docs, the logical standby turns read-only when applying sql, and then in read-write mode otherwise. I have to meet a requirement that the remote database be strictly in read-only mode the entire time (so as to not risk writing to it), as well as being as up-to-date as possible off the primary. (Hence I decided on the logical vs. the physical) Does anyone pls. know if I can keep the logical read-only all the time?
    Much appreciated,
    Sophie

    Oh, Ok. I guess i interpreted it differently. The direct quote from the docs: "Although the logical standby database is opened in read/write mode, its target tables for the regenerated SQL are available only for read-only operations." So I guess what it means, as you suggest, is the entire set of tables from the primary, and not just those few that happened to be updated at that particular time frame, are kept in read-only the entire time...

  • Opening the file in read only mode

    hi all,
    i am using
    i want to open any type of files in read only mode using host command.so first i am setting the attribute to read only and then opening the file. But still the opened file is editable. i have written like below
    Host( 'cmd /c  attrib +r "\test_folder\testing\PURCHASE_ORDER\'||:PO_FILE_NAME||'"',NO_SCREEN);
    Host( 'cmd /c "\test_folder\testing\PURCHASE_ORDER\'||:PO_FILE_NAME||'"',NO_SCREEN);is this is the way to open the file in readonly mode?
    Along with the above the files which i opened with the help of above said code those files i am not able to delete also.(i have to delete the selected file)
    i thing when i am setting the attribute something is going for a mess!
    Please help.
    Thanks..
    Edited by: GD on Jun 23, 2011 2:25 AM

    hi,
    Read only means you cannot mofiy the file. This also includes that you cannot delete a readonly-file yes,
    what i am doing is i have three button in my layout 'save','view' and 'delete'.
    1.so when user press 'save' button after selecting the file then the file gets saved into the specified.
    2. when user press 'view' button the file has to open in read only mode.
    for this i have written above mentioned code(but still i am able to edit the file)
    3.when user press 'delete' button the file has to be deleted from the specified location.
    so my problem is after setting file to read only mode, i am able to edit but i am not able to delete it.
    What i am using to set the file to read only mode is right?
    Please help.
    Thanks..

Maybe you are looking for