How to view init.orafile content through sql command prompt

Hi all,
please tell me the solution for this. i want to see all the init.ora parameters in command prompt is there is any special command to view all parameters of init.ora in sql prompt.
and server utilization from sql prompt.
Thank you,

Hi
SQL prompt base:
1. show parameter xxx << Mention by Nicolas
2. use v$parameter << mention by sybrand_b
3. use also:
◦V$PARAMETER2 view - display the currently in effect parameter values, but "List Values" are shown in multiple rows
◦V$SPPARAMETER view - display the current contents of the server parameter file.
Source:
http://www.orafaq.com/node/5 <<Viewing Parameters Settings:
OS level
3. Os level cat initxx << mention by me smile
Regard
Helios

Similar Messages

  • How do i get a output in CSV of a SQL query executed via SQL Command prompt

    Hi All,
    I have a question with reference to SQL command prompt. I have a sql query which runs properly and gives proper execution in SQL Management console in GUI.
    This report is used to pull the free disk space report of our servers
    As i want to schedule it as a report so i want to script it to run via SQL command prompt. I made the script and it works fine if i enter it in SQL command prompt. When i try to extract the output to a CSV File it fails. Below is the details of the command
    i am using to query to pull the data. Can anyone help me in getting the output of this query in SQL command prompt.
    sqlcmd -W -s , -S Servers FQDN
    use operationsmanager
    Go
    Query:"select Path, InstanceName, SampleValue 
    from PerformanceDataAllView pdv with (NOLOCK)
    inner join PerformanceCounterView pcv on pdv.performancesourceinternalid = pcv.performancesourceinternalid
    inner join BaseManagedEntity bme on pcv.ManagedEntityId = bme.BaseManagedEntityId
    where SampleValue < '20' and CounterName='% Free Space' and TimeSampled > '2014-08-06 11:00:00.00'
    order by countername, timesampled" -s "," -o "C:\DataSqlCmd.csv"
    Go
    When i enter the command without the quotes when the query is starting and ending and also without the output command (-s "," -o "C:\DataSqlCmd.csv") it is working and shows the output in the command prompt. Below is the screen shot for
    your reference.
    Due to security reasons i have to erase the server names:
    But when i add the line to extract the output ( -s "," -o "C:\DataSqlCmd.csv") It gives me this error:
    The exact command would be:
    sqlcmd -W -s , -S CINMLVSCOM01.e2klab.ge.com
    use operationsmanager
    Go
    "select Path, InstanceName, SampleValue 
    from PerformanceDataAllView pdv with (NOLOCK)
    inner join PerformanceCounterView pcv on pdv.performancesourceinternalid = pcv.performancesourceinternalid
    inner join BaseManagedEntity bme on pcv.ManagedEntityId = bme.BaseManagedEntityId
    where SampleValue < '20' and CounterName='% Free Space' and TimeSampled > '2014-08-06 11:00:00.00'
    order by countername, timesampled" -s "," -o "C:\DataSqlCmd.csv" -h-1
    Go
    saying the syntax is not correct or some thing as per the below screenshot.
    Can any one please help. Below is just the query whi i use to get the output in SQL management studio.
    Can any one make a command for the below quer so i can directly execute and test for getting the output.
    select Path, InstanceName, SampleValue 
    from PerformanceDataAllView pdv with (NOLOCK)
    inner join PerformanceCounterView pcv on pdv.performancesourceinternalid = pcv.performancesourceinternalid
    inner join BaseManagedEntity bme on pcv.ManagedEntityId = bme.BaseManagedEntityId
    where SampleValue < '20' and CounterName='% Free Space' and TimeSampled > '2014-08-06 11:00:00.00'
    order by countername, timesampled
    Gautam.75801

    Can you try the below query?
    select Path, InstanceName, SampleValue
    from PerformanceDataAllView pdv with (NOLOCK)
    inner join PerformanceCounterView pcv on pdv.performancesourceinternalid = pcv.performancesourceinternalid
    inner join BaseManagedEntity bme on pcv.ManagedEntityId = bme.BaseManagedEntityId
    where SampleValue < 20 and CounterName like '% Free Space' and TimeSampled > '2014-08-06 11:00:00.00'
    order by countername, timesampled
    -- replace the below query part in the below SQLCMD C:\>SQLCMD -S SERVERNAME -E -d operationsmanager -Q "select * from sys.databases ds with (nolock) where name='master'" -s "," -o "F:\PowerSQL\MyData.csv" -h -1
    SQLCMD -S SERVERNAME -E -d OperationsManager -Q "select Path, InstanceName, SampleValue
    from PerformanceDataAllView pdv with (NOLOCK)
    inner join PerformanceCounterView pcv on pdv.performancesourceinternalid = pcv.performancesourceinternalid
    inner join BaseManagedEntity bme on pcv.ManagedEntityId = bme.BaseManagedEntityId
    where SampleValue < '20' and CounterName='% Free Space' and TimeSampled > '2014-08-06 11:00:00.00'
    order by countername, timesampled" -s "," -o "c:\MyData.csv" -h -1
    Refer for the other ways 
    http://dba.stackexchange.com/questions/23566/writing-select-result-to-a-csv-file
    --Prashanth

  • Do we have a command to clear sql command prompt

    do we have a command to clear sql command prompt ??

    I faced one issue, that would like to share with you guys.
    Oracle: 10gR2
    OS: Win XP / 2003 / 2000
    C:\Documents and Settings\mamohiuddin.MYPC>sqlplus "/as sysdba"
    SQL*Plus: Release 10.2.0.1.0 - Production on Thu Mar 22 13:18:37 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to an idle instance.
    SQL> cl scr;
    C:\Documents and Settings\mamohiuddin.MYPC>
    Now a pop dialog box came and informed the following..
    Oracle SQL*PLUS has encountered a problem and needs to close. We are Sorry for the incovenience.
    Did you also face this issue ? If fixed how ? Is it Oracle problem or Windows Problem ?

  • Query running on sql commands prompt not running on report region

    Hi All,
    Facing a weird issue now. I have written a report query which is running absolutely fine in sql command prompt but when i trying to run this as a report it is just processing and the report is not loading. What could be the reason behing this?
    Thanks in Advance
    Regards

    Hi,
    With no other information about the problem is hard to know what's happening. If you could at least provide us with the query then I think it would be easier for us to help you.
    Regards,
    Sergio

  • How can I pass a value to the command prompt?

    I was wondering how can I pass a value to the command prompt with Windows and Linux? I'm more interested in Linux's system than Windows though. Is there a way to return info from the command prompt?

    Here is a snippet from http://mindprod.com/jglossexec.html that explains how in detail.
    Runtime.getRuntime().exec("myprog.exe") will spawn an external process that runs in parallel with the Java execution. In Windows 95/98/ME/NT/2000/XP, you must use an explicit *.exe or *.com extension on the parameter. It is also best to fully qualify those names so that the system executable search path is irrelevant, and so you don't pick up some stray program off the path with the same name.
    To run a *.BAT, *.CMD, *.html *.BTM or URL you must invoke the command processor with these as a parameter. These extensions are not first class executables in Windows. They are input data for the command processor. You must also invoke the command processor when you want to use the < > | piping options, Here's how, presuming you are not interested in looking at the output:
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat" );
    Runtime.getRuntime( ).exec ("cmd.exe /E:1900 /C MyCmd.cmd" );
    Runtime.getRuntime( ).exec ("C:\\4DOS601\\4DOS.COM /E:1900 /C MyBtm.btm" );
    Runtime.getRuntime( ).exec ("D:\\4NT301\\4NT.EXE /E:1900 /C MyBtm.btm" );
    There are also overloaded forms of exec(),
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null);
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null, "C:\\SomeDirectory");
    The second argument can be a String [], and can be used to set environment variables. In the second case, "C:\\SomeDirectory" specifies a directory for the process to start in. If, for instance, your process saves files to disk, then this form allows you to specify which directory they will be saved in.
    Windows and NT will let you feed a URL string to the command processor and it will find a browser, launch the browser, and render the page, e.g.
    Runtime.getRuntime( ).exec ("command.com http://mindprod.com/projects.html" );
    Another lower level approach that does not require extension associations to be quite as well set up is:
    Runtime.getRuntime( ).exec ("rundll32 url.dll,FileProtocolHandler http://mindprod.com/projects.html" );
    Note that a URL is not the same thing as a file name. You can point your browser at a local file with something like this: file://localhost/E:/mindprod/jgloss.html or file:///E|/mindprod/jgloss.html.
    Composing just the right platform-specific command to launch browser and feed it a URL to display can be frustrating. You can use the BrowserLauncher package to do that for you.
    Note that
    rundll32.exe url.dll,FileProtocolHandler file:///E|/mindprod/jgloss.html
    won't work on the command line because | is reserved as the piping operator, though it will work as an exec parameter passed directly to the rundll32.exe executable.
    With explicit extensions and appropriately set up associations in Windows 95/98/ME/NT/2000/XP you can often bypass the command processor and invoke the file directly, even *.bat.
    Similarly, for Unix/Linux you must spawn the program that can process the script, e.g. bash. However, you can run scripts directly with exec if you do two things:
    Start the script with #!bash or whatever the interpreter's name is.
    Mark the script file itself with the executable attribute.
    Alternatively start the script interpreter, e.g.
    Runtime.getRuntime( ).exec (new String[]{"/bin/sh", "-c", "echo $SHELL"}";

  • Code for how to read an integer array from the command prompt...

    hello,
    Could anyone give me the code for how to read an integer array from the command prompt...its very urgent!..

    If you are using a recent version of Java (5 or later) you can use Scanner:
    http://java.sun.com/javase/6/docs/api/java/util/Scanner.html
    That page has some example code on it, too.

  • How to view exp.dmp contents....

    Hi All..
    How to view only contents of exp.dmp without importing into the user.
    Sudhir S.

    Use SHOW=Y option, e.g.
    $ imp test/test file=test.dmp show=y$ imp help=y (to show options)

  • How to view "File IO Stats" through database views

    Hello Guys,
    I need to view the "File IO Stats" (information of datafile that I view at AWR frecuently) through database views. Which are the view that I must use?
    Thanks in advanced.

    Hi
    The below query will display regular IO on Data files as well as Temporary IO.
    select a.file#,b.name, a.phyrds, a.phywrts, (100*(a.phyrds+a.phywrts)/&divide_by) Percent,
    a.phyblkrd, a.phyblkwrt, (a.phyblkrd/greatest(a.phyrds,1)) brratio,
    (a.phyblkwrt/greatest(a.phywrts,1)) bwratio
    from sys.v_$filestat a, sys.v_$dbfile b
    where a.file#=b.file#
    union
    select c.file#,d.name, c.phyrds, c.phywrts,
    (100*(c.phyrds+c.phywrts)/&divide_by) Percent,
    c.phyblkrd, c.phyblkwrt,(c.phyblkrd/greatest(c.phyrds,1)) brratio,
    (c.phyblkwrt/greatest(c.phywrts,1)) bwratio
    from sys.v_$tempstat c, sys.v_$tempfile d
    where c.file#=d.file#
    order by 1
    Thanks
    LaserSoft

  • How to use lengthy query in a "SQL Command from Variable"

    My oracle SQL Query length is more than 14000 characters, so how can i use this for "SQL command from variable".
    Sarvan

    Either create a view or a table valued UDF. Using stored procedure in OLEDB source has some gotchas it will not pick up metadata information by default due to late binding.
    http://consultingblogs.emc.com/jamiethomson/archive/2006/12/20/SSIS_3A00_-Using-stored-procedures-inside-an-OLE-DB-Source-component.aspx
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to execute stored procedure in the SQL Commands page

    i'm oracle express edition newbie :) i have this stored procedure. it not belong to a package.
    create or replace procedure "LIST_MEMBERS"
    ("MEMBER_CUR" OUT SYS_REFCURSOR)
    is
    begin
    OPEN MEMBER_CUR FOR
    SELECT * FROM members;
    end;
    now, in the SQL Commands page, how to run the stored procedure and return the records. i do this:
    begin
    execute list_members();
    end;
    but i'm getting some errors. just need some immediate help :) thanks!!!

    Example of using a ref cursor:
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace procedure open_cur(c IN OUT SYS_REFCURSOR) is
      2  begin
      3    open c for 'select rownum rn from dual connect by rownum <= 10';
      4* end;
    SQL> /
    Procedure created.
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2    c     SYS_REFCURSOR;
      3    v_val NUMBER;
      4  begin
      5    open_cur(c);
      6    loop
      7      fetch c INTO v_val;
      8      exit WHEN c%NOTFOUND;
      9      dbms_output.put_line(v_val);
    10    end loop;
    11    close c;
    12* end;
    SQL> /
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    PL/SQL procedure successfully completed.
    SQL>

  • [4.0EA2]Is there a way to simply pass through SQL commands?

    Hello out there,
    I wonder if there is a way to pass through some commands without SQL Developer trying to parse or otherwise process them.
    In 3.2 I could do something like this when connected to a MySQL database:
    /*sqldev:stmt*/begin;
    delete from test where some_condition=1;
    /*sqldev:stmt*/rollback;
    Now I get the following error:
    SELECT command denied to user 'tsn'@'pc259.vu2k.vertriebsunion.de' for table 'all_tab_cols'
    It seems that SQL Developer tries do do some magic that does not work on non-Oracle databases.
    So is there some magic comment like /*sqldev:stmt*/ that just passes through the command without further parsing?
    The best solution would be SQL Developer supporting transactions on MySQL though...
    I know, I posted a similar question some time ago for 4EA1, but did not get an answer for that.
    Regards,
    dhalek

    Hi Dhalek,
    Just tried out a small example and it works ok in SQL Dev 4
    drop table t1;
    create table t1 (col1 int);
    insert into t1 values (1);
    insert into t1 values (2);
    insert into t1 values (3);
    select * from t1;
    /*sqldev:stmt*/BEGIN;
    DELETE FROM t1;
    SELECT * FROM t1;
    /*sqldev:stmt*/ROLLBACK;
    SELECT * FROM t1;
    ---- RESULT ----
    table T1 dropped.
    table T1 created.
    1 rows inserted.
    1 rows inserted.
    1 rows inserted.
    col1      
    1         
    2         
    3         
    /*sqldev:stmt*/BEGIN
    3 rows deleted.
    col1      
    /*sqldev:stmt*/ROLLBACK
    col1      
    1         
    2         
    3        
    Regards,
    Dermot
    SQL Developer Team

  • How do download and install firefox from redhat command prompt step by step with commands

    How do download and install firefox from redhat 6 command prompt
    Im new to Linux so would appreciate step by step details with commands

    Is your Windows Vista 32 or 64 bit?
    To find out if your computer is running 32-bit or 64-bit Windows, do the following:
    Open System by clicking the Start button, clicking Control Panel, clicking System and Maintenance, and then clicking System.
    Under System, you can view the system type.

  • How to get no. of rows of Windows Command Prompt in java

    hi all,
    can anybody tell me that is there any java utility avalilable throght I can find the how many rows avalilbe on currently executing command prompt, and also how can i clear the content of command prompt (result of 'cls' command).
    Currently execting command prompt means from where I have run my java program.
    any reference is also welcome.
    thanks in advance.

    Clearing the screen is trivial, as long as you're OK with making your program specific to Windows only (i.e. you never hope to run it on any other OS ever):
    Runtime.getRuntime().exec("cmd /c cls");As to figuring out how many lines your command window's screen buffer has - good luck with that. I'm not familiar enough with the Win32 API to get this info, but you'll have to figure out what that is, and call it via JNI.

  • User with admin rights can't access files through the command prompt

    I have a strange situation where I have 2 users both setup exactly the same with admin rights on a 2003 (32 bit) server through an AD group membership, but one can do everything as expected but the other can't.
    The one that can't is trying to execute a program is a command prompt and keeps getting access denied or invalid directory when trying to cd into the folder.   I double and tripled check the permissions and they are correct, this person should have
    full admin.  In fact I did a effective permissions through explorer and it states full rights.  Along those lines this person can also access the folder in question through explorer just not a command prompt. 
    Has anyone seen this before ? and if so what can be done about it.
    Thanks

    Hi,
    Can the user execute the program through explorer? In Windows Server 2003, the Users group does not have Read and Execute permissions to the command processor (Cmd.exe). 
    You could refer to the article below to resolve the issue:
    "Access is denied" error message when you run a batch job on a Windows Server 2003-based computer
    http://support.microsoft.com/kb/867466
    Best Regards,
    Mandy 
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How to view the file content from the directory? getting Error:ORA-21560

    SQL> create directory READ_LOB_DIR as 'D:\Prj\Comm\Data';
    CREATE OR REPLACE Procedure READ_FILE_LOB IS
    -- Input Directory as specified in create directory
    l_dir CONSTANT VARCHAR2(30) := 'READ_LOB_DIR';
    -- Input File which is read word by word
    l_fil CONSTANT VARCHAR2(30) := 'testfile.txt';
    -- Separator Character between words is a BLANK (ascii = 32)
    l_seb CONSTANT RAW(100) := UTL_RAW.CAST_TO_RAW(CHR(32));
    -- Character at the end of the file is NEWLINE (ascii = 10)
    l_sen CONSTANT RAW(100) := UTL_RAW.CAST_TO_RAW(CHR(10));
    -- Pointer to the BFILE
    l_loc BFILE;
    -- Current position in the file (file begins at position 1)
    l_pos NUMBER := 1;
    -- Amount of characters have been read
    l_sum BINARY_INTEGER := 0;
    -- Read Buffer
    l_buf VARCHAR2(500);
    -- End of the current word which will be read
    l_end NUMBER;
    -- Return value
    l_ret BOOLEAN := FALSE;
    BEGIN
    -- Mapping the physical file with the pointer to the BFILE
    l_loc := BFILENAME(l_dir, l_fil);
    -- Check if the file exists
    l_ret := DBMS_LOB.FILEEXISTS(l_loc) = 1;
    IF (l_ret) THEN
    dbms_output.put_line('File ' || l_fil || ' in Directory ' || l_dir ||
    ' exists');
    -- Open the file in READ_ONLY mode
    DBMS_LOB.OPEN(l_loc, DBMS_LOB.LOB_READONLY);
    LOOP
    -- Calculate the end of the current word
    l_end := DBMS_LOB.INSTR(l_loc, l_seb, l_pos, 1);
    -- Process end-of-file
    IF (l_end = 0) THEN
    l_end := DBMS_LOB.INSTR(l_loc, l_sen, l_pos, 1);
    l_sum := l_end - l_pos - 1;
    DBMS_LOB.READ(l_loc, l_sum, l_pos, l_buf);
    dbms_output.put_line(UTL_RAW.CAST_TO_VARCHAR2(l_buf));
    EXIT;
    END IF;
    -- Read until end-of-file
    l_sum := l_end - l_pos;
    DBMS_LOB.READ(l_loc, l_sum, l_pos, l_buf);
    dbms_output.put_line(UTL_RAW.CAST_TO_VARCHAR2(l_buf));
    l_pos := l_pos + l_sum + 1;
    END LOOP;
    DBMS_LOB.CLOSE(l_loc);
    ELSE
    dbms_output.put_line('File ' || l_fil || ' in Directory ' || l_dir ||
    ' does not exist');
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('Error:' || SQLERRM);
    DBMS_LOB.CLOSE(l_loc);
    END;
    The Text file content is...
    Copyright 1996,2001 Oracle Corporation.     All Rights Reserved
    This file contains installation instructions for installing the
    Oracle8 ODBC Driver software.
    It is divided into four parts:
    o Part I: Summary of systems supported by Oracle8 ODBC client
    software
    Lists the platforms on which the Oracle8 ODBC Client software can
    be installed.
    o Part II: Oracle8 ODBC Driver software.
    Describes the files, and installation prerequisites for the Oracle8
    ODBC driver software.
    o Part III: Exploding the kit onto your system
    Describes how to explode the kit onto your system hard drive.
    o Part IV: Installation Instructions
    Describes how to install the Oracle8 ODBC driver.
    Part I: Systems supported by the Oracle8 client software
    You can install the ODBC client software on any of the following systems:
    o Windows 2000
    o Windows NT X86
    o Windows 95
    o Windows 98
    The Oracle8 ODBC Driver provides support for ODBC connections
    from Windows 2000, Windows NT, Windows 95, and Windows 98 systems
    to Oracle databases.
    o Part II: Oracle8 ODBC Driver software.
    Refer to the following files for information about the Oracle8 ODBC Driver:
    LICENSE.TXT - Oracle8 ODBC Driver License Agreement. Read carefully
    before installing and/or using this product. Enclosed in
    your software distribution kit.
    SQORA.HLP - A Window's Help file which is the primary reference
              manual for the Oracle8 ODBC Driver.
    ODBCRelnotes.WRI - The release notes for the Oracle8 ODBC Driver
    which contains information which may have not been
    included in the Help file.
    Installation Prerequisites
    See the Oracle8 ODBC Driver release notes (ODBCRelnotes.WRI),
    for a complete list of software products required and their versions.
    Time Required
    The installation of the Oracle8 ODBC Driver takes approximately 5
    minutes. The actual time may be shorter or longer, depending upon
    your hardware configuration.
    Disk Space Required
    The Oracle8 ODBC driver installation requires approximately 2
    megabytes of available storage space. The space required depends upon
    what files you already have installed. The installation procedure
    checks to see if you have enough available disk space. If you do not,
    the installation fails.
    Part III: Exploding the Kit onto your system
    Expand the self-extracting archive file onto your hard drive.
    C:\> ORA8174.EXE
    Part IV: Installation Instructions
    Oracle8 ODBC Driver 8.1.7.4.0
    This section assumes the following:
    1. MS Windows 2000, Windows NT, Windows 95 or Windows 98 is running.
    2. Oracle Universal Installer shipping with 8.1.7 has already been
    installed on your system.
    3. Part III has been completed.
    Software fixes:
    Refer to release notes (ODBCRelnotes.wri) for a complete list of
    Software fixes.
    Installation Instructions
    Once the self-extracting archive file ORA8174.EXE has been
    exploded it will create an installable directory structure
    onto your hard drive. Run the Oracle Universal Installer from
    your local drive.
    1. On the screen "File Locations" use the "Browse" button of
    the source path to choose the file 'products.jar' from the
    folder that ORA8174.EXE was extracted to. Choose 'Next'.
    2. You will receive a warning that some of the dependencies of
    this product are not found in the staging area. This warning
    is OK. The ODBC driver depends on the Net8 Client being already
    installed on the system. Answer 'Yes' to continue.
    Oracle is a registered trademark of Oracle Corporation.
    Microsoft, MS are registered trademarks of Microsoft Corporation.
    Microsoft Windows, Windows NT, Windows 95, Windows 98 and Open Database
    Connectivity are trademarks of Microsoft Corporation.
    All other trademarks and registered trademarks are the property
    of their respective owners.
    The output was...
    File testfile.txt in Directory READ_LOB_DIR exists
    Copyright
    1996,2001
    Oracle
    Corporation.     
    All
    Rights
    Reserved
    This
    file
    contains
    installation
    instructions
    for
    installing
    the
    Oracle8
    ODBC
    Driver
    software.
    It
    is
    divided
    into
    four
    parts:
    o
    Part
    I:
    Summary
    of
    systems
    supported
    by
    Oracle8
    ODBC
    client
    Error:ORA-21560: argument 2 is null, invalid, or out of range
    I want to diplay/view as per file content format from the file under that specified directory.
    Have any other method / any help or suggestions would be really appreciated.

    I changed the code like...
    CREATE OR REPLACE Procedure READ_FILE_LOB_tmp IS
    -- Input Directory as specified in create directory
    l_dir CONSTANT VARCHAR2(30) := 'READ_LOB_DIR';
    -- Input File which is read word by word
    l_fil CONSTANT VARCHAR2(30) := 'testfile.txt';
    -- Separator Character between words is a BLANK (ascii = 32)
    l_seb CONSTANT RAW(100) := UTL_RAW.CAST_TO_RAW(CHR(32));
    -- Character at the end of the file is NEWLINE (ascii = 10)
    l_sen CONSTANT RAW(100) := UTL_RAW.CAST_TO_RAW(CHR(10));
    -- Pointer to the BFILE
    l_loc BFILE;
    -- Current position in the file (file begins at position 1)
    l_pos NUMBER := 1;
    -- Amount of characters have been read
    l_sum BINARY_INTEGER := 0;
    -- Read Buffer
    l_buf VARCHAR2(4000);
    -- End of the current word which will be read
    l_end NUMBER;
    -- Return value
    l_ret BOOLEAN := FALSE;
    BEGIN
    -- Mapping the physical file with the pointer to the BFILE
    l_loc := BFILENAME(l_dir, l_fil);
    -- Check if the file exists
    l_ret := DBMS_LOB.FILEEXISTS(l_loc) = 1;
    IF (l_ret) THEN
    dbms_output.put_line('File ' || l_fil || ' in Directory ' || l_dir ||
    ' exists');
    -- Open the file in READ_ONLY mode
    DBMS_LOB.OPEN(l_loc, DBMS_LOB.LOB_READONLY);
    LOOP
    -- Calculate the end of the current word
    l_end := DBMS_LOB.INSTR(l_loc, l_sen, l_pos, 1);
    -- Process end-of-file
    IF (l_end = 0) THEN
    EXIT;
    END IF;
    -- Read until end-of-file
    l_sum := l_end - l_pos;
    DBMS_LOB.READ(l_loc, l_sum, l_pos, l_buf);
    dbms_output.put_line(UTL_RAW.CAST_TO_VARCHAR2(l_buf));
    l_pos := l_pos + l_sum + 1;
    END LOOP;
    DBMS_LOB.CLOSE(l_loc);
    ELSE
    dbms_output.put_line('File ' || l_fil || ' in Directory ' || l_dir ||
    ' does not exist');
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('Error:' || SQLERRM);
    DBMS_LOB.CLOSE(l_loc);
    END;
    Now its working fine with one addtional line...
    The file content is...
    This is My Content
    This is My Content
    This is My Content
    This is My Content
    This is My Content
    But The output was...
    File testfile.txt in Directory READ_LOB_DIR exists
    This is My Content
    This is My Content
    This is My Content
    This is My Content
    This is My Content
    here, i want to delete that additonal line...?

Maybe you are looking for

  • Multiple displays with an Intel Macbook Pro

    Hi, I've searching a lot, and I haven't find a way for having an external LCD display plugged to my Intel Mac Book Pro without buying Matrox DualHead2Go. I bought and adapter that I use with a projector when I'm in a meeting (VGA to Mini-DVI I think.

  • Can Ipad2 be restored and still keep some apps?

    I just purchased an Ipad2 from a friend.  Is it possible to restore to factory settings but still keep some of his purchased apps?  I assume if I restore and sync to my itunes that i will lose his apps.

  • Function module to change the date format

    hi guys is there any function module to change the date format from 08/28/2007(mm/dd/yyyy) to August 28, 2007. regards vamsi

  • Java newbie

    hi! i installed recently the j2ee server application on windows xp localhost... so i need some advice of how to start programming with java and how to implement my first applications on this server.. if anyone can point me to exsist simply applicatio

  • How to view all categories offline?

    I have for my work a e72. And i use ovi maps. For my work i often come in other countries like french and germany. Outside my own country i cant go online so i have to use ovi maps in offline mode. But then there is a problem. The categories are in o