Validate filenames in Unix using PLSQL

Hello,
I need to check for the existence of files and its contents in a given directory that exist on a unix server using PLSQL. Could anyone suggest me how do I approach this? I am using Oracle 10g database.
Message was edited by:
user519027

Again, taking a step back, nothing I could possibly do on Machine A could possibly allow it to execute anything on Machine B unless Machine B had been set up, somehow, to permit that sort of thing. Generally, that is going to require some sort of "listener" on Machine B that can process remote requests, execute the appropriate programs/ scripts/ etc., and return the results.
Think of the security problems that would arise if you could install something on one machine and then, suddenly, be able to execute arbitrary scripts on another machine...
Of course, you could certainly configure something on the machine where the scripts reside that would permit them to be executed remotely and then have your local machine call that "listener" process via whatever protocol it understood. For example, you could install a web server on the remote machine, configure the web server to execute certain scripts when appropriate URLs are hit, and then use UTL_HTTP in your local Oracle database to generate that HTTP traffic. Of course, that's one of many, many options for an appropriate listener...
Justin

Similar Messages

  • Validate XML against XSD using PLSQL

    Hi,
    We now need some kind of automated solution that will pick
    up the XMLs from a specific location or table and validate them
    against the XSD in only Oracle PLSQL.
    The validation of the XML against the XSD should take place when the XML is parsed.
    I want to know how first the XSD's are stored or registered in the Oracle XDB repository.
    Please can anyone suggest me how this can be done with a simple example
    with a sample XML and XSD?
    Regards,
    Marlon.

    Hi, I'm not an expert but I've been reading a lot and I found this and it works. I'll hope it is useful.(Oracle 10)
    declare
    -- Local variables here
    res BOOLEAN;
    tempXML XMLType;
    xmlDoc XMLType;
    xmlSchema XMLType;
    schemaURL varchar2(256) := 'testcase.xsd';
    schemaPath varchar2(256) := '/public/testcase.xsd';
    begin
    dbms_xmlSchema.deleteSchema(schemaURL,4);
    -- Test statements here
    xmlSchema := xmlType(
    '<?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb"
    elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:element name="root" xdb:defaultTable="ROOT_TABLE">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="child1"/>
    <xs:element name="child2"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    dbms_xmlschema.registerSchema(schemaURL,
    xmlSchema , --xdbURIType(schemaPath).getClob(),
    TRUE,TRUE,FALSE,TRUE
    xmlDoc:=xmltype('<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="' || schemaURL || '"><child1>foo</child1><child2>bar</child2></root>');
    dbms_output.put_line(xmlDoc.getStringVal());
    xmlDoc.schemaValidate();
    END;

  • Validate XML against DTD using PLSQL

    Hi Friends,
    I have an xml file and also a DTD, now I need to parse and validate this XML file against the DTD.
    Please can anyone suggest me some examples or ways to do this.
    NOTE: Only with Oracle not Java.
    Regards,
    Marlon.

    Hi, I'm not an expert but I've been reading a lot and I found this and it works. I'll hope it is useful.(Oracle 10)
    declare
    -- Local variables here
    res BOOLEAN;
    tempXML XMLType;
    xmlDoc XMLType;
    xmlSchema XMLType;
    schemaURL varchar2(256) := 'testcase.xsd';
    schemaPath varchar2(256) := '/public/testcase.xsd';
    begin
    dbms_xmlSchema.deleteSchema(schemaURL,4);
    -- Test statements here
    xmlSchema := xmlType(
    '<?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb"
    elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:element name="root" xdb:defaultTable="ROOT_TABLE">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="child1"/>
    <xs:element name="child2"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    dbms_xmlschema.registerSchema(schemaURL,
    xmlSchema , --xdbURIType(schemaPath).getClob(),
    TRUE,TRUE,FALSE,TRUE
    xmlDoc:=xmltype('<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="' || schemaURL || '"><child1>foo</child1><child2>bar</child2></root>');
    dbms_output.put_line(xmlDoc.getStringVal());
    xmlDoc.schemaValidate();
    END;

  • Using plsql tables in select statement of report query

    Hi
    Anyone have experience to use plsql table to select statement to create a report. In otherwords, How to run report using flat file (xx.txt) information like 10 records in flat files and use this 10 records to the report and run pdf files.
    thanks in advance
    suresh

    hi,
    u can use the utl_file package to do that using a ref cursor query in the data model and u can have this code to read data from a flat file
    declare
    ur_file utl_file.file_type;
    my_result varchar2(250);
    begin
    ur_file := UTL_FILE.FOPEN ('&directory', '&filename', 'r') ;
    utl_file.get_line(ur_file, my_result);
    dbms_output.put_line(my_result);
    utl_file.fclose(ur_file);
    end;
    make sure u have an entry in ur init.ora saying that your
    utl_file_dir = '\your directory where ur files reside'
    cheers!
    [email protected]

  • Validate Sharepoint site url using javascript

    Hi All,
    I have the below requirement.
    User enters sharepoint site in a textbox and clicks on button.
    On button click, we have to validate the entered sharepoint site exist or not.
    All the code should be in client side. No server side code
    This should be achieved using javascript.
    So, if anyone has a solution for this, could you please help me in sharing the code for the requirement. 
    Thanks & Regards,
    Kishore
    Kishore

    Hi Kishore
    Please go through the links and below code..
    It'll help
    Validation of the entered SharePoint Site
    1. _spUserId (Variable)
    This variable gives the ID of the logged in user. For an anonymous user, this variable will be empty.
    var uid = _spUserId;
    You can test this variable in the address bar of your browser. Try
    javascript:alert(_spUserId);
    You will see an alert message with the ID of the logged in user.
    2. JSRequest (Object)
    Using this JSRequest object, we can get the querystring, pathname and filename. Before using any of these properties, you should call JSRequest.EnsureSetup();
    Ex: page url is http://www.xyz.com?qid=15
    To get a querystring value
    JSRequest.EnsureSetup();
    var q = JSRequest.QueryString["qid"]; // q = 15
    Similarly, you can use
    JSRequest.EnsureSetup();
    var f = JSRequest.FileName; // current page name
    var p = JSRequest.PathName; // server relative url
    3. GetUrlKeyValue(parameter, noDecode, url) (Method)
    GetUrlKeyValue() is a javascript function using which we can get the Query string parameter either from url in the browser or a url that we specify.
    parameter(string): query string parameter from the url.
    noDecode(bool): specifies whether the value has to be encoded or not. If false value is decoded, else returned as it is.(Optional)
    url(string): the url from which Query string values are to be retrieved.(Optional)
    Ex:
    alert(GetUrlKeyValue('a', false, 'www.xyz.com?a=te%20st'));
    The above statement will return the value ‘te st’. Here we are specifying our own url.
    alert(GetUrlKeyValue('a', false));
    The above statement will look for a query string variable ‘a’ in the browser url, and returns the decoded value.
    alert(GetUrlKeyValue('a'));
    The above statement will look for a query string variable ‘a’ in the browser url.
    4. _spPageContextInfo (Object)
    _spPageContextInfo object has several useful properties, some are
    a. webServerRelativeUrl (for current web)
    b. siteServerRelativeUrl (current site collection url)
    c. webLanguage (for localization)
    d. currentLanguage (for localization again)
    e. webUIVersion
    f. userId (current user id just like _spUserId)
    g. alertsEnabled (more for current page if it has any alerts on it)
    h. allowSilverlightPrompt (to have that prompt or not on the page)
    i. pageItemId
    j. pageListId (Guid)
    We can get the webServerRelativeUrl simply by saying
    var url = _spPageContextInfo.webServerRelativeUrl;
    All the remaining object properties can be used in the same way.
    5. escapeProperly(str) (Method)
    This function returns the URL encoded value of a given string.
    var s = escapeProperly("hello world!!"); //s = "hello%20world%21%21"
    6. unescapeProperly(str) (Method)
    This function decodes a URL encoded string.
    var s = unescapeProperly("hello%20world%21%21"); //s = "hello world!!"
    7. STSHtmlEncode(htmlString) (Method)
    This function encodes an html string
    var s = STSHtmlEncode("<p>sample text</p>");
    //s = "&lt;p&gt;sample text&lt;/p&gt;"
    8. TrimSpaces(str) (Method)
    This method trims out the leading and trailing white spaces of a string. It doesn’t remove spaces created by special characters such as ‘\n’, \t’
    var s = TrimSpaces(" Hello World!! "); //s = "Hello World!!"
    I intentionally put more spaces between ‘Hello’ and ‘World!!’ just to show that this method doesn’t remove any spaces between words.
    9. TrimWhiteSpaces(str) (Method)
    This method trims out the leading and trailing white spaces of a string. It also removes spaces created by special characters such as ‘\n’, \t’
    var s = TrimWhiteSpaces("\n\nHello World!!\t\t"); //s = "Hello World!!"
    10. LoginAsAnother(url, bUseSource)
    This method is used to login as different user.(as the name says)
    url(string): the url of the page to which the new user has to be sent after login.
    bUseSource(boolean): A boolean that indicates that the source will be added to the url, otherwise the source will be the window.location.href. This parameter is optional, default is false.
    <a href="#" onclick="javascript:LoginAsAnother('\u002f_layouts\u002fAccessDenied.aspx?loginasanotheruser=true', 0)">Log on as a different user</a>
    11. STSPageUrlValidation(url)
    This function validates a url if it starts with “http” or “/” or “:” ONLY. It returns the url value back if it is a valid url and an empty value if it is an invalid url. If the url is not valid, an alert message is displayed that says “Invalid page URL:”.
    var s = STSPageUrlValidation("praneethmoka.wordpress.com"); //s = praneethmoka.wordpress.com
    var s = STSPageUrlValidation(":praneethmoka.wordpress.com"); //s = "";
    var s = STSPageUrlValidation("w.wordpress.com"); //s = "w.wordpress.com";
    Now please don’t ask me what kind of a validation this is.
    STSPageUrlValidation(url) in turn calls a method PageUrlValidation(url) and here’s the code for PageUrlValidation method
    function PageUrlValidation(url)
    {ULSA13:;
    if((url.substr(0, 4) == "http") || (url.substr(0, 1) == "/") || (url.indexOf(":") == -1))
    return url;
    else
    var L_InvalidPageUrl_Text="Invalid page URL: ";
    alert(L_InvalidPageUrl_Text);
    return "";
    Indul Hassan
    Microsoft Community Contributor
    http://www.indulhassan.com
    You Snooze.. You Lose !!

  • Extract xml file with rowset schema using plsql

    I want to extract the rowsheet data from an xml file using plsql database procedure
    Here is an example of the xml file:
    <xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
         xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
         xmlns:rs='urn:schemas-microsoft-com:rowset'
         xmlns:z='#RowsetSchema'>
    <s:Schema id='RowsetSchema'>
         <s:ElementType name='row' content='eltOnly'>
              <s:AttributeType name='Sheet_Number' rs:number='1' rs:maydefer='true' rs:writeunknown='true'>
                   <s:datatype dt:type='int' dt:maxLength='4' rs:precision='10' rs:fixedlength='true'/>
              </s:AttributeType>
              <s:AttributeType name='Appl_Number1' rs:number='2' rs:maydefer='true' rs:writeunknown='true'>
                   <s:datatype dt:type='int' dt:maxLength='4' rs:precision='10' rs:fixedlength='true'/>
              </s:AttributeType>
              <s:AttributeType name='Rating1' rs:number='3' rs:nullable='true' rs:maydefer='true' rs:writeunknown='true'>
                   <s:datatype dt:type='string' dt:maxLength='25'/>
              </s:AttributeType>
              <s:AttributeType name='Criteria1' rs:number='4' rs:nullable='true' rs:maydefer='true' rs:writeunknown='true'>
                   <s:datatype dt:type='string' dt:maxLength='25'/>
              </s:AttributeType>
              <s:AttributeType name='Appl_Number2' rs:number='5' rs:maydefer='true' rs:writeunknown='true'>
                   <s:datatype dt:type='int' dt:maxLength='4' rs:precision='10' rs:fixedlength='true'/>
              </s:AttributeType>
              <s:AttributeType name='Rating2' rs:number='6' rs:nullable='true' rs:maydefer='true' rs:writeunknown='true'>
                   <s:datatype dt:type='string' dt:maxLength='25'/>
              </s:AttributeType>
              <s:AttributeType name='Criteria2' rs:number='7' rs:nullable='true' rs:maydefer='true' rs:writeunknown='true'>
                   <s:datatype dt:type='string' dt:maxLength='25'/>
              </s:AttributeType>
              <s:extends type='rs:rowbase'/>
         </s:ElementType>
    </s:Schema>
    <rs:data>
         <z:row Sheet_Number='32486' Appl_Number1='198970' Rating1='-2' Criteria1='RTG' Appl_Number2='198989' Rating2='5'
              Criteria2='RTG'/>
         <z:row Sheet_Number='12345' Appl_Number1='198970' Rating1='-3' Criteria1='RTG' Appl_Number2='198989' Rating2='3'
              Criteria2='RTG'/>
    </rs:data>
    </xml>
    I need to extract the values from all of the columns : sheet_number, appl_number1, rating1, criteria1, appl_number2, rating2, criteria2. Validate the data and insert into oracle tables.
    I'm having dificulties extrating the data from the "z:row" recordset
    Can anyone help with the syntax ?
    I'm use to extracting with tags using syntax like this
    declare
    v_xml_content XMLTYPE;
    begin
    v_xml_content := db_get_xml_from_file (p_file_name, p_directory, 'ISO-8859-1');
    FOR f IN (SELECT value(x) file_data
    FROM TABLE
    (xmlsequence
    (extract (v_xml_content,'/data'))) x) LOOP
    SELECT extractvalue(f.file_data,'/data/row') into v_row from dual;                                                                      END LOOP;

    I want to extract the rowsheet data from an xml file using plsql database procedure
    Here is an example of the xml file:
    <xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
         xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
         xmlns:rs='urn:schemas-microsoft-com:rowset'
         xmlns:z='#RowsetSchema'>
    <s:Schema id='RowsetSchema'>
         <s:ElementType name='row' content='eltOnly'>
              <s:AttributeType name='Sheet_Number' rs:number='1' rs:maydefer='true' rs:writeunknown='true'>
                   <s:datatype dt:type='int' dt:maxLength='4' rs:precision='10' rs:fixedlength='true'/>
              </s:AttributeType>
              <s:AttributeType name='Appl_Number1' rs:number='2' rs:maydefer='true' rs:writeunknown='true'>
                   <s:datatype dt:type='int' dt:maxLength='4' rs:precision='10' rs:fixedlength='true'/>
              </s:AttributeType>
              <s:AttributeType name='Rating1' rs:number='3' rs:nullable='true' rs:maydefer='true' rs:writeunknown='true'>
                   <s:datatype dt:type='string' dt:maxLength='25'/>
              </s:AttributeType>
              <s:AttributeType name='Criteria1' rs:number='4' rs:nullable='true' rs:maydefer='true' rs:writeunknown='true'>
                   <s:datatype dt:type='string' dt:maxLength='25'/>
              </s:AttributeType>
              <s:AttributeType name='Appl_Number2' rs:number='5' rs:maydefer='true' rs:writeunknown='true'>
                   <s:datatype dt:type='int' dt:maxLength='4' rs:precision='10' rs:fixedlength='true'/>
              </s:AttributeType>
              <s:AttributeType name='Rating2' rs:number='6' rs:nullable='true' rs:maydefer='true' rs:writeunknown='true'>
                   <s:datatype dt:type='string' dt:maxLength='25'/>
              </s:AttributeType>
              <s:AttributeType name='Criteria2' rs:number='7' rs:nullable='true' rs:maydefer='true' rs:writeunknown='true'>
                   <s:datatype dt:type='string' dt:maxLength='25'/>
              </s:AttributeType>
              <s:extends type='rs:rowbase'/>
         </s:ElementType>
    </s:Schema>
    <rs:data>
         <z:row Sheet_Number='32486' Appl_Number1='198970' Rating1='-2' Criteria1='RTG' Appl_Number2='198989' Rating2='5'
              Criteria2='RTG'/>
         <z:row Sheet_Number='12345' Appl_Number1='198970' Rating1='-3' Criteria1='RTG' Appl_Number2='198989' Rating2='3'
              Criteria2='RTG'/>
    </rs:data>
    </xml>
    I need to extract the values from all of the columns : sheet_number, appl_number1, rating1, criteria1, appl_number2, rating2, criteria2. Validate the data and insert into oracle tables.
    I'm having dificulties extrating the data from the "z:row" recordset
    Can anyone help with the syntax ?
    I'm use to extracting with tags using syntax like this
    declare
    v_xml_content XMLTYPE;
    begin
    v_xml_content := db_get_xml_from_file (p_file_name, p_directory, 'ISO-8859-1');
    FOR f IN (SELECT value(x) file_data
    FROM TABLE
    (xmlsequence
    (extract (v_xml_content,'/data'))) x) LOOP
    SELECT extractvalue(f.file_data,'/data/row') into v_row from dual;                                                                      END LOOP;

  • Count files in a dirctory using plsql

    Hi ,
    Currently i am using a shell script that counts the number of files in unix level directory that had xml files and load to the table as CLOB using the sql loader.
    Now i want to use plsql l to count files and then load using insert the script.I am able to use insert statement but not have any idea to count files at unix level using plsql.
    Please give me some ideas.
    Thanks in Advance.
    Rede

    Neither does anyone else... <<LOL
    I've found this one quite some time ago...
    -- How to get a listing of files in a directory using PL/SQL has got to be one of the most
    -- popular questions asked by Oracle developers. Prior to 10g, DIY solutions included the
    -- sophisticated, using either Java (8i onwards) or External Procedures (8 onwards),
    -- or the clunky (pipe servers and shell scripts from 7 onwards)
    -- However in 10g there is a new procedure hidden away in the undocumented
    -- DBMS_BACKUP_RESTORE package. It's called searchfiles, which is a bit of a giveaway
    -- and appears to have been introduced for the new backup features in 10g, as RMAN
    -- now needs to know about files in the recovery destination.
    -- Calling this procedure populates an in memory table called X$KRBMSFT, which
    -- is one of those magic X$ tables, the only column which is of relevance to us
    -- is FNAME_KRBMSFT which is the fully qualified path and file name.
    -- This X$ table acts in a similar fashion to a global temporary table in that it's contents
    -- can only be seen from the calling session. So two sessions can call searchfiles and each
    -- can only see the results of their call (which is extremely useful).
    -- The code sample below will only really run as SYS, due to the select from X$KRBMSFT, it's
    -- just intended as a demo. The first two parameters in the call to searchfiles are
    -- IN OUT so must be defined as variables, even though the second parameter is of no consequence
    -- to us and should be left as NULL. Even though they are IN OUT, testing shows they don't
    -- appear to change.
    -- Updated 29/05/2007
    -- The first parameter is the string to search for, in much the same format as you would pass
    -- in a call to dir (Windows) or ls (Unix). However, on some platforms and versions
    -- passing in a wildcard or anything other than a directory name will result in an empty X$KRBMSFT.
    -- The trick here is to simply pass a valid OS directory name - the entire listing of that directories
    -- contents will now appear in X$KRBMSFT, which can then be filtered using LIKE.
    -- This procedure appears to raise no exceptions, passing an invalid search string, such
    -- as a non-existant path or one with no permissions, simply results in an empty X$KRBMSFT.
    -- However, if the database parameter db_recovery_file_dest is not set, you will get ORA-19801.
    -- Interestingly, this procedure recursively searches sub directories found in the search string.
    -- So passing a string of 'C:\windows' (for example) populates X$KRBMSFT with not only the files found
    -- in that directory but all the files found in all directories beneath, such as C:\windows\system32.
    -- As X$KRBMSFT is an in memory table, you have been warned! Calling this procedure on a directory
    -- with thousands of sub directories and files has the potential to blow out memory
    -- The way forward is to wrap this functionality in a package, perhaps using
    -- directory objects instead and checking access priviliges, creating a view based on X$KRBMSFT,
    -- maybe even allowing/disallowing subdirectory traversal and limiting memory usage search size.
    -- I see another project coming, stay tuned for XUTL_FINDFILES!
    -- This code has been tested and works as intended on Oracle 10104 EE.
    -- Get this tip and others, along with useful PL/SQL utilities at
    -- www.chrispoole.co.uk
    DECLARE
    pattern VARCHAR2(1024) := '/u01/oracle/admin/SID/udump';
    ns VARCHAR2(1024);
    BEGIN
    SYS.DBMS_BACKUP_RESTORE.searchFiles(pattern, ns);
    FOR each_file IN (SELECT FNAME_KRBMSFT AS name FROM X$KRBMSFT WHERE FNAME_KRBMSFT LIKE '%.trc') LOOP
    DBMS_OUTPUT.PUT_LINE(each_file.name);
    END LOOP;
    END;
    DECLARE
    pattern VARCHAR2(1024) := 'C:\temp\*';
    ns VARCHAR2(1024);
    BEGIN
    SYS.DBMS_BACKUP_RESTORE.searchFiles(pattern, ns);
    FOR each_file IN (SELECT FNAME_KRBMSFT AS name FROM X$KRBMSFT) LOOP
    DBMS_OUTPUT.PUT_LINE(each_file.name);
    END LOOP;
    END;
    /Thomas

  • Can't copy file to network drive as "The operation can't be completed because the [Filename] is in use

    Following upgrade to Yosemite I now can't copy files from iMac to my network HDD in external media center. I have iMac connected by wi-fi to airport extreme and media center connected to airport extreme by cable. I can see the HDD as a network drive on my iMac and can initiate the copy but right when copy process is finished I see "The operation can’t be completed because the [Filename] is in use". I am trying to copy different media files downloaded from internet which are not used by any program and stored on my hard drive. I actually can copy small files of 1mb and it works but anything above 20mb is halted. I can also move/copy/delete the file on iMac. Cant understand the nature of the problem. I tried to format external HDD as EXT2/EXT3/NTFS but same outcome.
    OS X Yosemite 10.10.3 | iMac late 2009 | Apple Airport Extreme | Dune HD Base 3D mediacenter

    Have you tried a restart or logging out/in?
    Some more ideas.
    Re: The operation can’t be completed because the item “ " is in use.

  • How to get the customize url of an portlet using PLSQL

    How to get the customize url of an portlet using PLSQL.

    Are you trying to call the portlet Customization form directly from the browser?

  • Help Required :Excel Upload Into Oracle Table Using PLSQL Procedure/Package

    Please Help , Urgent Help Needed.
    Requirement is to Upload Excel file Into Oracle Table Using PLSQL Procedure/Package.
    Case's are :
    1. Excel File is On Users/ Client PC.
    2. Application is on Remote Server(Oracle Forms D2k).
    3. User Is Using Application Using Terminal Server LogIn.
    4. So If User Will Use to GET_FILE_NAME() function of D2K to Get Excel File , D2k Will Try to pick File from That Remote Server(Bcs User Logind from Terminal Server Option).
    5. Cannot Use Util_File Package Or Oracle Directory to Place That File on Server.
    6. we are Using Oracle 8.7
    So Need Some PL/SQL Package or Fuction/ Procedure to Upload Excel file on User's Pc to Oracle Table.
    Please Guide me wd some Code. or with Some Pl/SQL Package, or With SOme Hint. Or any Link ....
    Jus help to Sort This Issue ........
    you can also write me on :
    [email protected], [email protected]

    I also Tried to Use This
    But How can i Use SQLLDR Command In Stored Procedure.
    Well IN SQL*PlUS it is successfull but in Stored Procedure /Package ,PL/SQL does not recognise the OS commands.
    So now my Question How can I recognise the SQLLDR Commnad in Stored Procedure.

  • Help Required:How Upload Excel file Into Oracle Table Using PLSQL Procedure

    Please Help , Urgent Help Needed.
    Requirement is to Upload Excel file Into Oracle Table Using PLSQL Procedure/Package.
    Case's are :
    1. Excel File is On Users/ Client PC.
    2. Application is on Remote Server(Oracle Forms D2k).
    3. User Is Using Application Using Terminal Server LogIn.
    4. So If User Will Use to GET_FILE_NAME() function of D2K to Get Excel File , D2k Will Try to pick File from That Remote Server(Bcs User Logind from Terminal Server Option).
    5. Cannot Use Util_File Package Or Oracle Directory to Place That File on Server.
    6. we are Using Oracle 8.7
    So Need Some PL/SQL Package or Fuction/ Procedure to Upload Excel file on User's Pc to Oracle Table.
    Please Guide me wd some Code. or with Some Pl/SQL Package, or With SOme Hint. Or any Link ....
    Jus help to Sort This Issue ........
    you can also write me on :
    [email protected], [email protected]

    TEXT_IO is a PL/SQL package available only in Forms (you'll want to post in the Forms forum for more information). It is not available in a stored procedure in the database (where the equivalent package is UTL_FILE).
    If the Terminal Server machine and the database machine do not have access to the file system on the client machine, no application running on either machine will have access to the file. Barring exceptional setups (like the FTP server on the client machine), your applications are not going to have more access to the client machine than the operating system does.
    If you map the client drives from the Terminal Server box, there is the potential for your Forms application to access those files. If you want the files to be accessible to a stored procedure in the database, you'll need to move the files somewhere the database can access them.
    Justin

  • How to create a folder using plsql

    hi all
    i want create a folder using plsql procedures .

    I am not sure weather you can create a folder on database server file system using pl/sql code but you certainly can create/read/write file system files using UTL_FILE package.
    'The Oracle supplied package UTL_FILE can be used to read and write files that are located on the server. It cannot be used to access files locally, that is on the computer where the client is running.'

  • Read a text file from DB directly (don't use PLSQL).

    how can I Read a text file from DB directly (don’t use PLSQL). ?

    If there is a known structure, you could use External Table access and query that "file" as any table.
    Nicolas.

  • How to send mail in APEX 4.1 using PLSQL

    Hi All,
    How to send mail in APEX 4.1 using PLSQL?
    Thanks In advance.
    Regards
    Shail

    http://lmgtfy.com/?q=oracle+apex+4.1+send+mail

  • Get the tab page that the mouse clicked on using PLSQL

    Another canvas related question ...
    Is it possible to detect the tab page that the mouse clicked on
    from within a WHEN-MOUSE-DOUBLECLICKED trigger,
    SYSTEM.MOUSE_CANVAS returns the name of the tab canvas.
    However, I need the name of the tab page within the tab canvas
    thanks
    Scott

    resolved - thanks
    resolution notes follow:
    ========================
    I forgot to mention that I dont know the type of canvas at runtime,
    so the code needs to work for tab and non-tab canvases
    Unfortunately, calling TOPMOST_TAB_PAGE for a non-tab canvas results in an
    error that can only be suppressed using an ON-ERROR trigger
    (SYSTEM.MESSAGE_LEVEL wont supress it, nor will EXCEPTION)
    anyway, I resolved this via another related post that I raised today.
    "Determining canvas type using PLSQL"
    thanks anyway.

Maybe you are looking for