Issuing SQL command through  Forms

Hi
How we can issue SQL command e.g. CREATE USER, through Forms.
Regards!

Issues dynamic SQL statements at runtime, including server-side PL/SQL and DDL.
Note All DDL operations issues an implicit Commit
Syntax
Function FORMS_DDL(statement VARCHAR2);
If you use FORMS_DDL to executed a valid PL/SQL Block:
If you user FORM_DDL to executed a single DML or DDL stmt :
Omit the trailing semicolon to avoid an invalid character error
Thanks

Similar Messages

  • Issues in calling Sql Loader through forms developer (10g)

    Hi,
    I am developing a form(in 10g) ,in which I am calling sql loader for loading data onto a oracle database table from external source (e.g. data file is a .CSV file).
    But , somehow the sql loader is not getting executed.
    Here , I am giving the environment settings , approach i am taking;
    This is a distributed system , both the application server,and database server are mounted on two different servers.
    The form is delpoyed on the application server.
    The database table , and the sql loader are configured on the databse side.
    I am using host(<sql loader command>) command to invoke the Operating System command through forms.
    The sql loader is working ok , and the data is getting loaded successfully onto the required database table when I am executing the sql loader command on Unix prompt , but through the forms , it's not working.
    Do I need to change some environmental setting to make this work...
    Any quick help in this regard is highly appreciated.
    Thanks.

    Hi Craig,
    I have already tried out the option of calling sql loader through stored procedure,but this is not working ...
    could you please share any examples to do so ...
    code snippet i am using in forms:
    declare
    usid get_application_property(userid);
    pwd get_application_property(password);
    db get_application_property(host);
    msqlldr varchar2(250);
    begin
    msqlldr:='/u01/oracle/formss/bin/sqlldr' username=<uid/pwd@db> control=<control file name> data=<data file name> log=<log file name>
    hosts(msqlldr);
    end;
    Note that sqlldr command ,for that matter any unix shell command is not working through the hosts() command ...
    could you please suggest any way out ...
    Thanks.

  • SQL Loader through Forms 6i

    Hi,
    I need to know the steps to run sql loader through forms6i in windows environment.
    Please help me in this regard.

    1. Create a control file for Sql*Loader with all parameters you need
    2. Create a .bat file to run Sql*Loader, e.g. "sqlldr username/password@db control=<file above>"
    3. Use HOST command within Forms 6i to run the .bat file.

  • Calling SQL Loader through Forms using webutils

    hi all,
    Can anyone tell me how can i call a sqlldr through forms 9i using webutils?Let me know if anyone have a sample script.
    Thanks
    Best Regards,
    Abrar
    [email protected]

    If your middle tier and database server are both unix boxes you could use host(rsh...)
    Are you suggesting webutil because your data to be loaded is on the PC ? If so you probably want to move it then load it as two seperate operations.
    If there isn't too much data you also have the option of using text_io to load it into a forms database block, which has the advantage that the user can see what is happening, and validation rules could be added if required.

  • ODBC for SQL Server through FORMS 6

    Does a way exist of through the forms6 acessando oracle 8i to record data in a bank SQL Server 7 of Microsoft... do I marry yes, as it would be the instruction?
    null

    Check your DSN, I am using Jdbc-Odbc bridge to open connection to MS-SQLServer. Using System DSN, Check usrname and password. My connection looks like this.
    public Connection getDbConnection(String dbdriver,String url,String user,String passwd){
    Connection dbconn = null;
    try {
    Class.forName(dbdriver);
    dbConn = DriverManager.getConnection(url,user,passwd);
    }catch(ClassNotFoundException e){
    System.err.println(e.getMessage());
    }catch(SQLException sqle){
    handleSQLException(sqle);
    }catch(Exception e){
    System.err.println(e.getMessage());
    return dbconn;

  • Tunning through Forms?

    Hi,
    I am the student of Oracle Developer forms 6i.
    I am using Windows XP O/S and 10 G database with forms 6i.
    With regard to SQL Tracing I would like to ask the following please suggest me :
    1. I want to enable SQL Tracing through forms 6i, in this regard there is no clear concept coming in my mind that how should I enable SQL Trace for a particular Session from forms 6i.
    I read in another book that ifrun60 command with statsistic= yes on command line would enable forms 6i sql tracing. If yes then how should I automize this command in my forms application. I mean where should I place this command in forms 6i in order to start sql tracing of this form application. As well as what should we do if I want to enable tracing for a particular session from forms 6i and the output of a SQL Trace file would be generated on forms screen.
    I know there is a Sys.dbms_system.set_sql_trace package and Alter session command available for enabling Sql Tracing, but how should we do that via forms 6i.
    I will appreciate if someone on that forum please suggest me and give me the clear picture about what I am wanting. I know there are several GUI tools available in Oracle but I have to do this through forms.
    Best Wishes
    Malan

    You can turn trace on or off in a form by doing this:
    Forms_DDL('ALTER SESSION SET SQL_TRACE = TRUE');However, I don't know of any method for displaying the results from Forms. You have to switch to your operating system commands to view the output. Here are the notes I use on my Windows XP platform:
    Run TKPROF:
      from Windows:
      start cmd.exe window.
      CD C:\ORA92\admin\ORA92\udump
      -- find name of newest file in window
      TKPROF ora92_ora_???? TKOut explain=scott/tiger
      view file with Notepad or PFE:  C:\ORA92\admin\ORA92\udump\tkout.prf

  • Running Copy command from Forms 6i

    HI!
    I want to run Copy command through Forms 6i i.e copy from scott/tiger@orcl insert test@msora(ename) using select to_char(ename) ename from emp;
    I can run DDL command through Forms_ddl functions in Forms 6i, But copy command is not working using Forms_ddl.
    thanks in advance.
    Edited by: Kami_Lily on Aug 2, 2009 10:04 PM

    Dear Kami Lily,
    Oracle Forms is able to execute SQL and PL/SQL command only. Additionally it supports Operating System command by HOST built-in.
    Though COPY is a SQL*Plus command, it is not possible to execute this command by HOST built-in.
    Instead, if you hardly want to execute COPY command oracle forms 6i, then you make a batch file in operating system and run that batch file from HOST built-in.
    Thanks.

  • Sql command example in oracle 9

    Hi,
    I want to use oracle 9
    select * from tab .
    And use the output to issue "desc XXX " for every row of output in select statement...
    How can I do it automatically ???
    Any example ???

    You cannot issue sql commands in plsql. Try this way:
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2  cursor c1 is select * from all_tab_Cols where table_name = 'ALL_OBJECTS';
      3  BEGIN
      4  FOR I IN C1 LOOP
      5  DBMS_OUTPUT.PUT_LINE(I.table_name||' : '||I.column_name||' '||I.data_type||'('||I.data_length||
      6  END LOOP;
      7* END;
    SQL> set serveroutput on
    SQL> /
    ALL_OBJECTS : OWNER VARCHAR2(30)
    ALL_OBJECTS : OBJECT_NAME VARCHAR2(30)
    ALL_OBJECTS : SUBOBJECT_NAME VARCHAR2(30)
    ALL_OBJECTS : OBJECT_ID NUMBER(22)
    ALL_OBJECTS : DATA_OBJECT_ID NUMBER(22)
    ALL_OBJECTS : OBJECT_TYPE VARCHAR2(18)
    ALL_OBJECTS : CREATED DATE(7)
    ALL_OBJECTS : LAST_DDL_TIME DATE(7)
    ALL_OBJECTS : TIMESTAMP VARCHAR2(19)
    ALL_OBJECTS : STATUS VARCHAR2(7)
    ALL_OBJECTS : TEMPORARY VARCHAR2(1)
    ALL_OBJECTS : GENERATED VARCHAR2(1)
    ALL_OBJECTS : SECONDARY VARCHAR2(1)
    PL/SQL procedure successfully completed.
    SQL>

  • Can I issue this command in PL/SQL: EXECUTE IMMEDIATE '@filename.sql';

    can I issue this command in PL/SQL: EXECUTE IMMEDIATE '@filename.sql';

    Hi,
    Rather the opening a new process (sqlplus), a new connection (need password) etc... I would rather read and execute the file in pl/sql.
    I do not know if someone wrote it already, but here is a quick and dirty code for doing that with UTL_FILE.GET_LINE
    Here, I am only processing some DML statements and no SELECT statements. Correct it as you like !
    CREATE OR REPLACE PROCEDURE run_script ( dir_name IN VARCHAR2,file_name IN VARCHAR2)
    IS
    vSFile UTL_FILE.FILE_TYPE;
    vCmd VARCHAR2(200);
    vNewLine VARCHAR2(200);
    BEGIN
        vSFile := UTL_FILE.FOPEN(dir_name, file_name,'r');
        vCmd := NULL;
        IF UTL_FILE.IS_OPEN(vSFile) THEN
        LOOP
            BEGIN
                UTL_FILE.GET_LINE(vSFile, vNewLine);
                if (vCmd is null) THEN
                    if (upper(vNewLine) like 'INSERT%' or upper(vNewLine) like 'UPDATE%' or upper(vNewLine) like 'DELETE%') THEN
                        if (vNewLine like '%;') THEN
                            /* we have a single line command, execute it now */
                            dbms_output.put_line(substr(vNewLine,1, length(vNewLine)-1));
                            execute immediate substr(vNewLine,1, length(vNewLine)-1);
                        else
                            /* we have a command over multiple line, set vCmd */
                            vCmd := vNewLine;
                        end if;
                    else
                        /* ignore the rest like spool, prompt, accept, errors, host, @, ... */
                        null;
                    end if;
                else
                    if (vNewLine like '%;') THEN
                        /* we have a the last line of the command, execute it now */
                        vCmd := vCmd || ' ' || substr(vNewLine,1, length(vNewLine)-1);
                        dbms_output.put_line(vCmd);
                        execute immediate vCmd;
                        vCmd := null;
                    else
                        /* keep concatenating to vCmd */
                        vCmd := vCmd ||' '|| vNewLine;
                    end if;
                end if;
            EXCEPTION
                WHEN NO_DATA_FOUND THEN
                    EXIT;
                END;
        END LOOP;
        COMMIT;
        END IF;
        UTL_FILE.FCLOSE(vSFile);
    EXCEPTION
        WHEN utl_file.invalid_path THEN
            RAISE_APPLICATION_ERROR (-20052, 'Invalid File Location');
        WHEN utl_file.read_error THEN
            RAISE_APPLICATION_ERROR (-20055, 'Read Error');
        WHEN others THEN
            RAISE_APPLICATION_ERROR (-20099, 'Unknown Error');
    END run_script;
    set serverout on
    create directory scriptdir as '/home/oracle';
    grant read,write on directory to scott;
    exec run_script('SCRIPTDIR', 'test.sql')

  • SQL Command table linking issues

    I have created a simple SQL command in CR 2008 to save the creation of a view on the DB (SQL Server 2005).  I then link it to another table from the same DB.  Once this was done I began experiencing extremely long run times versus the link with the original view.  The SQL command set was copied directly from the view in MS Visual Sudio.  The joins in CR are left outers and inner that worked fine with the original view.  We ended up running a trace of the SQL Server and found the SQL was producing 21,000 record reads everytime the primary table read a record.  It was not following the inner join at all.  I did a Show SQL in CR and found that the CR generated SQL looked very strange and not like the typical construction when the view was being used instead of the table  What am I doing wrong?  Below is a copy of the Show SQL for this particular issue.  It seems to be the second command set in italics that causes the issue.  That is from the SQL command I created in CR.
    Thanks,
    Brian
    PROD - FIN
    SELECT "MAN_JOBS"."JOB_NUMBER", "MAN_JOBS"."ACTUAL_START_DATE", "MAN_JOBS"."ACTUAL_START_DATE_2", "MAN_JOBS"."STD_PROCESS_SPEC", "MAN_JOBS"."COMPANY_CODE"
    FROM   "fin_prod"."dbo"."MAN_JOBS" "MAN_JOBS"
    EXTERNAL JOIN MAN_JOBS.STD_PROCESS_SPEC={?PROD - FIN: C_IC_PRODUCT_CHARACTERISTICS.PART_CODE} AND MAN_JOBS.COMPANY_CODE={?PROD - FIN: C_IC_PRODUCT_CHARACTERISTICS.COMPANY_CODE} AND MAN_JOBS.COMPANY_CODE={?PROD - FIN: KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.COMPANY_CODE} AND MAN_JOBS.JOB_NUMBER={?PROD - FIN: KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.DOCUMENT_NUMBER} AND MAN_JOBS.STD_PROCESS_SPEC={?PROD - FIN: KX_PRODUCT_MASTER_EXT.PART_CODE}
    PROD - FIN
    SELECT *
    FROM dbo.IC_PRODUCT_CHARACTERISTICS
    WHERE (CHARACTERISTIC_CODE = 'TEXT')
    EXTERNAL JOIN C_IC_PRODUCT_CHARACTERISTICS.PART_CODE={?PROD - FIN: MAN_JOBS.STD_PROCESS_SPEC} AND C_IC_PRODUCT_CHARACTERISTICS.COMPANY_CODE={?PROD - FIN: MAN_JOBS.COMPANY_CODE}
    PROD - FIN
    SELECT "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."IC_MOVE_QUANTITY", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."TRANSACTION_TYPE", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."IC_LOT_NUMBER", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."WAREHOUSE", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."PERIOD_TXT", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."YEAR_TXT", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."DOCUMENT_NUMBER", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."PART_CODE", "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."COMPANY_CODE"
    FROM   "fin_prod"."dbo"."KX_IC_MOVEMENTS_PRODCTN_IN_OUTS" "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"
    WHERE  "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."COMPANY_CODE"={?PROD - FIN: MAN_JOBS.COMPANY_CODE} AND "KX_IC_MOVEMENTS_PRODCTN_IN_OUTS"."DOCUMENT_NUMBER"={?PROD - FIN: MAN_JOBS.JOB_NUMBER}
    EXTERNAL JOIN KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.PART_CODE={?PROD - FIN: PRODUCT_MASTER.PART_CODE} AND KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.COMPANY_CODE={?PROD - FIN: PRODUCT_MASTER.COMPANY_CODE}
    PROD - FIN
    SELECT "PRODUCT_MASTER"."PRODUCT_CLASS", "PRODUCT_MASTER"."COMPANY_CODE", "PRODUCT_MASTER"."PART_CODE"
    FROM   "fin_prod"."dbo"."PRODUCT_MASTER" "PRODUCT_MASTER"
    WHERE  "PRODUCT_MASTER"."PART_CODE"={?PROD - FIN: KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.PART_CODE} AND "PRODUCT_MASTER"."COMPANY_CODE"={?PROD - FIN: KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.COMPANY_CODE}
    PROD - FIN
    SELECT "KX_PRODUCT_MASTER_EXT"."PRODUCT_CLASS", "KX_PRODUCT_MASTER_EXT"."PART_CODE"
    FROM   "fin_prod"."dbo"."KX_PRODUCT_MASTER_EXT" "KX_PRODUCT_MASTER_EXT"
    WHERE  "KX_PRODUCT_MASTER_EXT"."PART_CODE"={?PROD - FIN: MAN_JOBS.STD_PROCESS_SPEC}

    As an update, I created a view in MS VIsual Studio and copied the SQL command set into a Crystal SQL command and made changes in the report to use the new CR SQL command.  It ran in seconds instead of hours.  There is something wrong with the way CR is building the SQL command when a CR SQL command is linked to a normal DB table.  HELP!  I started using the CR SQL command with only another 1 or 2 tables and it was slower but bearable.  This one uses more table and more data and dies.  Here is what the SQL command set looks like that I built in MS VS and used to create the CR SQL command.  This is from the Show SQL in CR.
    SELECT        dbo.MAN_JOBS.ACTUAL_START_DATE, dbo.MAN_JOBS.ACTUAL_START_DATE_2, dbo.MAN_JOBS.JOB_NUMBER,
                             dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.DOCUMENT_NUMBER, dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.IC_LOT_NUMBER,
                             dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.IC_MOVE_QUANTITY, dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.PART_CODE,
                             dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.PERIOD_TXT, dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.YEAR_TXT,
                             dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.TRANSACTION_TYPE, dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.WAREHOUSE,
                             dbo.PRODUCT_MASTER.PRODUCT_CLASS, dbo.KX_PRODUCT_MASTER_EXT.PART_CODE AS KX_PART_CODE,
                             dbo.KX_PRODUCT_MASTER_EXT.PRODUCT_CLASS AS KX_PRODUCT_CLASS, dbo.IC_PRODUCT_CHARACTERISTICS.CHARACTERISTIC_CODE,
                             dbo.IC_PRODUCT_CHARACTERISTICS.IC_DEF_CHAR_TEXT
    FROM            dbo.MAN_JOBS INNER JOIN
                             dbo.IC_PRODUCT_CHARACTERISTICS ON dbo.MAN_JOBS.COMPANY_CODE = dbo.IC_PRODUCT_CHARACTERISTICS.COMPANY_CODE AND
                             dbo.MAN_JOBS.STD_PROCESS_SPEC = dbo.IC_PRODUCT_CHARACTERISTICS.PART_CODE LEFT OUTER JOIN
                             dbo.KX_PRODUCT_MASTER_EXT ON dbo.MAN_JOBS.STD_PROCESS_SPEC = dbo.KX_PRODUCT_MASTER_EXT.PART_CODE AND
                             dbo.MAN_JOBS.COMPANY_CODE = dbo.KX_PRODUCT_MASTER_EXT.COMPANY_CODE LEFT OUTER JOIN
                             dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS ON dbo.MAN_JOBS.COMPANY_CODE = dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.COMPANY_CODE AND
                             dbo.MAN_JOBS.JOB_NUMBER = dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.DOCUMENT_NUMBER LEFT OUTER JOIN
                             dbo.PRODUCT_MASTER ON dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.COMPANY_CODE = dbo.PRODUCT_MASTER.COMPANY_CODE AND
                             dbo.KX_IC_MOVEMENTS_PRODCTN_IN_OUTS.PART_CODE = dbo.PRODUCT_MASTER.PART_CODE
    WHERE        (dbo.IC_PRODUCT_CHARACTERISTICS.CHARACTERISTIC_CODE = N'TEXT')

  • Sql commands issues based on security

    give me the sql commands for the following scenarios:
    1. to revoke sysdba privilege from normal users.
    2. how to protect normal user user name and password
    3. how to grant only export privilege to normal user.
    4. when user is trying to get connected as sysdba. it should prompt for password. how to set this parameter.
    5. how to prevent unix users reading and writing in to oracle scripts.
    6. how to prevent some of the normal users from accessing applications tools like toad, etc.,
    thanks and regards
    suresh

    give me the sql commands for the following
    scenarios:
    1. to revoke sysdba privilege from normal users.
    revoke sysdba from <username>;
    2. how to protect normal user user name and password
    alter user <username> identified by <password>;
    3. how to grant only export privilege to normal
    user.
    Each user can export objects they own automatically.
    4. when user is trying to get connected as sysdba. it
    should prompt for password. how to set this
    parameter.
    Remove them from the ORA_DBA group on Windows or DBA group on Linux. Another option is to set SQLNET.AUTHENTICATION_SERVICES=(NONE) in the ORACLE_HOME/network/admin/sqlnet.ora file.
    5. how to prevent unix users reading and writing in
    to oracle scripts.
    Do not add them the same group the Oracle user belongs to and/or remove read and write privileges form the files to those user that are not owners or group members (chmod -x -r <filename>)
    6. how to prevent some of the normal users from
    accessing applications tools like toad, etc.,
    Why?

  • APEX - SQL Workshop - SQL Commands : Issue in extracting hour from date

    Hello All,
    When I run
    SELECT to_char(sysdate,'hh24') from DUALon SQL Developer and APEX SQL Commands window, both are returning correct hour value.
    But when I run
    SELECT to_char(i_date,'hh24') from t_factthen I'm getting correct values in SQL Developer but not in APEX SQL Commands window. In APEX, it always returns '00' for all rows. I'm totally lost what could be the issue with APEX? Any suggestions?
    DB Version: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    APEX Version: 4.0.1.00.03
    Web Server : EPG
    Table structure:
    CREATE TABLE  "T_FACT"
       (     "TF_KEY" NUMBER,
         "TOWER" VARCHAR2(20),
         "LOC_ID" NUMBER,
         "TF_CAT" VARCHAR2(35),
         "EQP_NAME" VARCHAR2(35),
         "I_DATE" DATE,
         "MON_CATEGORY" VARCHAR2(35),
         "EVENT" VARCHAR2(35),
         "UNIT" VARCHAR2(35),
         "TF_VALUE" NUMBER
       );Regards,
    Hari

    Hi,
    Just silly question case you have same table in multiple schemas:
    You run query in same schema?
    Regards,
    Jari

  • Report not running through Forms menu

    Hi Gurus,
    In our reports we have used Query PL/SQL to reference cursor. When it is compiled and an executable 'rep' file is created, which when
    called through froms menu generates following error and aborts the report.
    REP-1401:'qr_1refcurds': Fatal PL/SQL error occured.
    ORA-06508: PL/SQL: could not find program unit being called
    The same report when called through forms menu, without the compiled version, executes smoothly. Also it runs through report builder perfectly after compilation and generation of rep file.
    Would appreciate if anyone can provide suitable guidelines to solve this issue.
    null

    hello,
    is the program-unit you are trying to call, in an external plsql-library ? if so, you have to provide the PLX version of this library in order to use it from a REP file.
    however, why are you using the compiled REP version at all ? i would suggest to use the RDF file.
    regards,
    the oracle reports team --pw                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Runtime Error in SQL command ..

    Hi everybody
    I have a report wich terminates with a dump message.
    The error is in an SQL command, here the program aborts:
    SELECT KUNNR KKBER KLIMK SAUFT SKFOR SSOBL
        INTO TABLE I_KNKK
        FROM KNKK
       WHERE KUNNR IN R_KUNNR
         AND KKBER IN R_KKBER
         AND SBGRP IN S_SBGRP.
    DATA: BEGIN OF I_KNKK OCCURS 0,
          KUNNR LIKE KNKK-KUNNR,
          KKBER LIKE KNKK-KKBER,
          KLIMK LIKE KNKK-KLIMK,
          SAUFT LIKE KNKK-SAUFT,
          SKFOR LIKE KNKK-SKFOR,
          SSOBL LIKE KNKK-SSOBL,
          SBGRP LIKE KNKK-SBGRP,
          END OF I_KNKK.
    In first moment, i saw the table and SQL filter have the SBGRP field but the SQL fields selection has not this field. But, these same program works good with others selection parameters, in fact this SQL only terminates the program for the bigest company, wich causes the program make many BD access because all previous SQL.
    The dump log says:
    Runtime errors         DBIF_RSQL_INVALID_RSQL
    Exception              CX_SY_OPEN_SQL_DB
    Occurred on            23.05.2006 at   17:27:15
    Error in the module RSQL accessing the database interface.
    An exception occurred. The exception, which is assigned to the class 'CX_SY_OPEN_SQL_DB',  neither caught nor passed along using a RAISING clause, in the procedure "(FORM)" . Since the caller of the procedure could not have expected this except to occur, the running program was terminated.
    The reason for the exception is:
    The SQL statement generated from the SAP Open SQL Statement violates restriction imposed by the database system used in R/3.
    Possible errors:
    o The maximum size of an SQL statement has been exceeded.
    o The statement contains too many input variables.
    o The space needed for the input data exceeds the   
        available memory.
    o ...
    How can i be sure the dump is for a lot of BD access for all the SQL commands ?
    If these is the error, does somebody knows how can i eliminate this error ?
    Please help ..
    Regards
    Frank

    I think the field discrepancy is a red herring here. Not guilty! I agree that using the 'CORRESPONDING FIELDS OF' is safer though.
    The error could be happening because your range variables have lots of entries in them which makes the generated sql huge.
    To break it up you could use the 'package size' option of the select. This will work it's way through the input in chunks (or packages) of the size you specify.
    You could change it to:
    SELECT KUNNR KKBER KLIMK SAUFT SKFOR SSOBL 
    INTO TABLE I_KNKK package size 2000 "or a variable value      
    FROM KNKK                                  
    WHERE KUNNR IN R_KUNNR                     
    AND KKBER IN R_KKBER                       
    AND SBGRP IN S_SBGRP.                      
    process current contents of i_knkk here                                           
    endselect.     
    or ,
    SELECT KUNNR KKBER KLIMK SAUFT SKFOR SSOBL 
    appending TABLE I_KNKK package size 2000       
    FROM KNKK                                  
    WHERE KUNNR IN R_KUNNR                     
    AND KKBER IN R_KKBER                       
    AND SBGRP IN S_SBGRP.                      
    endselect.

  • User-friendly way to issue chown commands on remote servers

    I'd like my technically unversed users to have, on demand, the benefit of chown commands giving them ownership of certain files being executed on remote servers. I'd like this to be doable without administrators' involvement and with no physical access to the servers by any of the users being entailed.
    By "benefit of chown commands" I mean the results a competent user would get entering the command if he or she were actually doing so. By "technically unversed" I mean specifically that said users aren't and won't ever be trained to ssh into subject servers and issue chown commands themselves directly.
    I should mention that the "Get Info" interface does not in this case avail users of a way to take ownership of particular files because ACEs apply to the files in question. That ACEs apply changes what is presented: instead of any editable fields under Ownership and Permissions, all users see in the "Get Info" interface is a list of whatever ACEs apply.
    Please note that users do, by virtue of ACEs, have "change ownership" permissions for the files in question. Also, authentication to the servers in question under subject users' own logins is possible as necessary.
    What I'd like to start with is getting some idea how complicated this could be for me to do myself as a beginning AppleScripter. I'll describe what I guess would be involved and hope for someone to shed light.
    I'm guessing that something the user at his or her own machine does involving a file he or she has selected would constitute an Apple Event which a process on the client would send to a process on the server. Then I expect the server process would issue the chown command locally respectively of
    1) which file was selected when the Apple Event took place, and
    2) subject user's identity.
    Finally, I expect some feedback might contingently be sent to client process incidentally to need to give user feedback.
    Is this a fair sketch of how this should work? What is a beginner with limited time likely to accomplish attempting this?
    (Find context for this posting here: http://discussions.apple.com/thread.jspa?threadID=831517&tstart=0)
    PowerMac   Mac OS X (10.4.8)  

    First, if I understand you correctly, I'd be using
    Curl and, say, Perl rather than Applescript to get
    this done. In other words, what you wrote in
    Applescript is about all I'd need in that
    language--yes?
    That's correct, give or take any errors in the script. (For obvious reasons I didn't test it.)
    Then, please note that I want to chown, not chmod. Is
    this an issue?
    Nope. (Beyond what you pointed out below.)
    I am looking at Perl documentation and read that "on
    most systems, you are not allowed to change the
    ownership of the file unless you're the superuser..."
    (http://perldoc.perl.org/functions/chown.html).
    However, isn't apache running as root?
    I never thought about that. Wow, this is complicated! Are you really sure you can't make do with chmod instead?
    Anyway, the answer is yes and no. The main Apache process usually runs as root, but executes CGI scripts (and other requests) as another user to avoid inherent insecurity. So unless you do something terribly, terribly insecure, you will not be able to chown from Perl. (And, although I am often lax about security, enabling root access for CGIs strikes even me as dangerous, which means it's a very bad idea.)
    Really what you want is for the CGI, which does not run as root, to hand off to another process which does. I'm not a Unix guru, and would never claim to be, but I think the two following methods might work:
    1. Set up a cron job running as root which looks in a directory once every minute/hour/whatever. The file name should be the user to change the owner to, and it should contain a delimited (in some form; return is possibly safe) list of files. Have the cron job walk through the list of files and use chown, then clobber the contents of the file. (Note that a CGI can use "chmod", which can make sure that the files it creates in the directory are readable by the cron job.) (Also note that you'll want to use flock to avoid race conditions between the cron job and the CGI!) This method would not be instantaneous, since the cron job only runs periodically.
    2. Set up a script which runs as root which takes a line of text in the format:
    user:path/to/file
    and executes chown using that information. Make this process run at startup as root. Have it open a named pipe, with permissions such that CGI script can write to it, and watch for input from that pipe.
    Some general notes:
    A. Whatever you do, make sure that the binary/script/whatever running as root can't be written to by anyone who doesn't have root permissions.
    B. Make sure to check that the user and file actually exist before doing anything with them. (And make sure to do it in the root process, since you have no guarantee that someone won't figure out what's going on and come up with some clever injection scheme to make your root process break security.) (And don't do it by passing a command to the shell; use Perl's chown or some equivalent, so that you'll be somewhat less vulnerable.)
    C. For that matter, don't forget to check and make sure that the path you're about to chown is within the share point, and that the user you're going to chown to makes sense in context, so that nobody can (for example) take over someone else's user directory, or get write permission to /sbin, or something evil like that. (In fact, it might be for the best if you limited the chown operations to files only, just to be sure.)
    Also, I get the part about how a constraint involving
    "do shell script" method argues against using pure
    Applescript in this case. But just for my information
    is Applescript otherwise sufficiently capable?
    If it weren't such matter of getting everything on
    one line, could Applescript send commands between
    hosts, convert local paths to paths on servers, issue
    change ownership commands, and handle authentication?
    Do methods adequate to those purposes exist in
    Applescript?
    Or would using multiple scripting languages be
    entailed anyway? I'm guessing the latter.
    Yes and no. Helpful answer, right?
    First and foremost: AppleScript was originally created as a language to control programs, which would have an extensible grammar through the installation of files called "Scripting Additions". It has since been puffed up via AppleScript Studio to an application-building language in its own right, but the language itself does not have support for a lot of things which, nevertheless, the language can do by controlling another program or by extension.
    AppleScript can send messages between hosts. If the remote host is a Mac, and has "Remote Apple Events" turned on in the "Sharing" control panel, then you can send commands to programs on the remote machine almost exactly as though they were local. (The only differences are in how you specify the application and how you let AppleScript know what the remote application "understands".) This support is built into the language.
    If the remote host is not a Mac, you must control a program which can "translate". When it comes to terminal programs, for security reasons Apple did not include any interactive systems which could be controlled. (Although they did include "expect", I see, which would theoretically allow you to work around this...)
    Since converting a path is really just text processing, yes, AppleScript can do that. I didn't try to build that in because I am under the impression that you know some other language/shell scripting tool better than AppleScript, so it makes better sense for you to put as much of the work into the parts you know, in order to make debugging easier. One method of doing it in AppleScript:
    set x to [a POSIX path found somehow for a file on a connected server]
    if (the offset of "/Volumes/" in x) is 1 then
    -- "the offset of" uses 1-based offsets, not 0 as in most languages
    set x to text 10 through -1 of x
    -- This removes "/Volumes/" from the beginning of x
    set x to text ((the offset of "/" in x) + 1) through -1 of x
    -- That removes up through the next slash, which is the volume name
    set x to "/Path/To/The/Share/Point/On/The/Server/" & x
    else
    error "The path isn't in /Volumes/, so either the server is mounted in a nonstandard way or the path isn't on a remote host at all." number 9000
    end if
    (The other method of which I am aware is to change AppleScript's text item delimiter to "/", convert the path to a list, test whether the first item is "Volumes", then put together items 3 and up into a string again. I have always had a semi-irrational prejudice against using this method because Apple's documentation circa about 1996, from which I learned AppleScript, made it sound like this might be dangerous, but it works.)
    The Finder (which can be scripted) can apparently change ownership and permissions -- a fact which I did not know until just now; I must have missed it last time I looked for it -- and of course "do shell script" can be used to call "chmod" and "chown". The problem with both of these methods, vis-a-vis your particular difficulty, is that your files are not local. You could turn on Remote Apple Events and have the Finder do it, but that's really a security hole. And a potentially maddening one to figure out if anyone starts exploiting it.
    I'd stick with a CGI and the cron/named pipe scheme. No matter what you do you're going to have a little extra security risk, just because chown requires root permissions, but minimizing that risk is probably a good thing.

Maybe you are looking for

  • Error while generating Journal Reports

    Hi Experts, We need to create a report of all the journals that has been posted in a particular time period in the system. We are trying to create the report using the create Journal report option provided in BPC. But on using the option an HTML scre

  • Steps to send a clip to AE to utilize Warp Stabilizer VFX then back to Premiere Pro CC

    So I use Warp Stabilizer for about 200 clips per project. It's effectiveness has shaped how I shoot. It's awesome. Now there's VFX in AE...Can someone layout the steps involved in the following: a) Taking a clip from Premiere Pro CC and sending it to

  • How to process job in SM35

    Hi. A job that was created and is waiting for processing in SM35. I'm looking for a way to process this job through ABAP code. I tried using Batch-input but for some reason it's not working + I'm sure there is an FM for this. Thanks. Ayal Telem.

  • Session management in JAX-RCP with JWSDP 1.0_01

    Hi all, How can I access to the HTTP Session of the TOMCAT which run the Web Services engine? Browsing by the API I've found the method getHttpSession() in the interface javax.xmlrpc.server.ServletEndpointContext. How can get an instance which implem

  • Can't intsall oracle products on Windows 2000

    The Oracle Universal Installer didn't start (no any error message returns) when I run setup.exe to install the Oracle8i Enterprise Server on the Windows 2000, the same problem happened with the Oracle9i Application Server too. My machine is Dell Dime