creating the procedure

database Oracle 10.2.0.4
operating system red hat linux 5

Hi experts I want to implement a procedure, and I want to run one of the users private so that it can unlock the accounts in the database
change the username unlock user account
can any body help me with this

thanx
SQL> create procedure unlock(p_account varchar2)
  2  is
  3  begin
  4  if (upper(p_account) != 'SYS' and (upper(p_account) != 'SYSTEM'))
  5  then
  6   execute immediate 'alter user ' || p_account || ' account unlock';
  7  else
  8   raise_application_error(-20001,'Cannot unlock account for SYS or SYSTEM');
  9  end if;
 10  end;
 11  /

Edited by: P. Forstmann Nov. 22. 2010 16:21

Tags: Database

Similar Questions

  • Hi, I created the procedure and its code is / / DELETE FROM <? = odiRef.getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "", "D")? > / / and when I'm running, the error appeared //com.sunopsis.tools.core.exception.SnpsSimpleMessageExcepti

    Hi, I created the procedure and its code is / / DELETE FROM <? = odiRef.getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "", "D")? > / / and when I'm running, the error appeared.

    com.sunopsis.tools.core.exception.SnpsSimpleMessageException: ODI-17517: error in the interpretation of the task.

    Task: 1

    java.lang.Exception: the application script threw an exception: com.sunopsis.tools.core.exception.SnpsSimpleMessageException: Exception getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "DEVELOPMENT", "D"): SnpLSchema.getLSchemaByName (): SnpLschema is no information OSB: Delete_Tar_Sales on line: column 0: columnNo

    at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.transform(SnpCodeInterpretor.java:489)

    at com.sunopsis.dwg.dbobj.SnpSessStep.createTaskLogs(SnpSessStep.java:737)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:465)

    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2128)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:366)

    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)

    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:292)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:855)

    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)

    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)

    at java.lang.Thread.run(Thread.java:662)

    Caused by: java.lang.Exception: the application script threw an exception: com.sunopsis.tools.core.exception.SnpsSimpleMessageException: Exception getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "DEVELOPMENT", "D"): SnpLSchema.getLSchemaByName (): SnpLschema is no information OSB: Delete_Tar_Sales on line: column 0: columnNo

    at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.transform(SnpCodeInterpretor.java:476)

    ... 11 more

    Caused by: org.apache.bsf.BSFException: the application script threw an exception: com.sunopsis.tools.core.exception.SnpsSimpleMessageException: Exception getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "DEVELOPMENT", "D"): SnpLSchema.getLSchemaByName (): SnpLschema is no information OSB: Delete_Tar_Sales on line: column 0: columnNo

    at bsh.util.BeanShellBSFEngine.eval (unknown Source)

    at bsh.util.BeanShellBSFEngine.exec (unknown Source)

    at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.transform(SnpCodeInterpretor.java:471)

    ... 11 more

    Text: REMOVE OF <? = odiRef.getObjectName ("L", "TRG_SALES", "ORACLE_ORCL_LOCAL_SALES", "", "D")? >.

    at com.sunopsis.dwg.dbobj.SnpSessStep.createTaskLogs(SnpSessStep.java:764)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:465)

    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2128)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:366)

    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)

    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:292)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:855)

    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)

    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)

    at java.lang.Thread.run(Thread.java:662)

    If you do this in a procedure, use the following syntax:

    <%=odiRef.getObjectName("L", "TRG_SALES", "D")%>

    and set the relevant logical schema in the options on the target tab of the procedure. Also, make sure you only select the correct technology type in the options on the target tab.

  • Create the procedure using time as a variable

    Dear team,

    Please find below the details.

    Database version:-11g Release 2

    I want to create a procedure to help if another condition. Can someone help me how declare TIME as variable. just for example

    If the time < 6 pm.

    Start-> run, loop

    Another thing,

    end of the program.

    My doubt is how to initialize with time as a variable

    Dear Sybrand,

    k do not write the code for free... And I don't do any kind of work. I'm a businessman. Just for Oracle knowledge point of view, I asked the question. And the next time suggest me.

    Kind regards

    Vivek

    Director-general

  • Create the privilege granted procedure, but cannot create the procedure

    I have a user that I have given the following privileges:
    CREATE THE SESION
    SELECT ANY TABLE
    CREATE A PROCEDURE
    CREATE PROCEDURE
    RUN THE PROGRAM
    RUN THE PROCEDURE

    But when I try to create a procedure with this user I get, error proveleges not enough. What I am doing wrong?

    What's wrong? You open the doors of barn proverbial ito security. This isn't how security should be made - allowing a schema create any code of procedure anywhere in the database. Or select data from any table.

    How do you think that Sony's PS network has been hacked and millions of stolen credit card data users?

    By this precarious type of stuff-security approach to security.

    A schema has the minimum privileges in order to achieve its goals and its requirements. Nothing more.

    For example

    // standard logical database schema, 10Gb space allocation
    create user HRDB
      identified by 
      default tablespace USERS
      quota 10G on USERS;
    
    // configure the basic security layer for the schema
    grant
      create session, --// allow client-server connections to schema
      create table, create trigger, --// allow to create standard db objects
      create sequence, create view, --// allow access to defining extended objects
      create procedure --// allow creating stored proc code
    to HRDB;
    

    In addition, you can decide on assign a profile of resources and specific roles and so on. In some cases, you can also leave the schema create types, synonyms and private database links, views materialized, etc.

    Don't grant access. No access to the SYS code and objects. By default. Everything else is a security exception requiring a valid justification.

  • Create the procedure to check existing data, then update, if not then insert.

    Dear all,

    Help, please
    I create a procedure to check the current data are available or not tables, if not match, the row in the table will insert another table, if matched, data will be updated.
    table source: Table_read;
    check table: stor_matdata;
    key to two table ID is (assy_no and t.produced_number).
    Here's the code I create, but he still has an error...
    ---------------------------------------------------------------------

    create or replace
    procedure Matched
    as
    Start
    Fusion in stor_matdata m using double on (m.assy_no = t.produced_number)
    When not matched then insert into stor_matdata (sequence_id, assy_no, package, basic_type, materialnumber, factor, mattype)
    Select rownum, t.producednumber, t.package_name, t.basic_type, t.consumed_number, t.factor, t.mattype FROM (select * from Table_read xxxx) t
    when matched, then update package set = t.package_name, basic_type = t.basic_type, materialnumber = t.consumed_number, = t.factor, mattype = t.mattype, sequence_id = rownum factor;
    end Matched;


    Thank you and best regards,

    Hadi

    There is a support missing after values

            VALUES (
                    t.r
                   ,t.producednumber
                   ,t.package_name
                   ,t.basic_type
                   ,t.consumed_number
                   ,t.factor
                   ,t.mattype
                   );
    

    Concerning
    Marcus

  • Create the procedure - drop index

    Hello

    Using Oracle 10.2, I want to create the following procedure:

    Create or replace procedure Procedure_X IS
    BEGIN
    DROP INDEX TablespaceX.index11;
    end;
    /

    However, this becomes an error PLS-00103:

    Met the 'DROP' symbol during the expected in the following way:

    begin case declare exit end exception for goto if loop mod
    pragma raise return null select update while with
    < an ID > < a between double quote delimited identifiers of >
    < a variable binding > < < close current delete fetch locking insert
    Open restore savepoint sql set run commit forall fusion
    pipe

    Any ideas?

    Sedso

    Try this:

    Create or replace procedure Procedure_X IS
    BEGIN
    EXECUTE IMMEDIATE 'DROP INDEX TablespaceX.index11';
    end;
    

    You must use EXECUTE IMMEDIATE to perform DDL operations in stored programs.

  • HEEELP: Re-create the procedure for the Essbase.sec file in 11.1.2.0

    Hello
    What is the procedure for recreating the file Essbase.sec in 11.1.2.0 Essbase environment... In older versions, it has been used to remove Essbase.sec, start the Essbase server and it has been recreated a file void essbase.sec... But in 11.1.2.0 with Shared services... is the procedure? If it is deleted from the file essbase.sec... start Essbase Service recreates and will update SSP Outlook2003?


    Please someone help...

    Thank you...

    Hi Alex,

    Unfortunately, I have about 20 questions to ask in order to really be able to provide useful guidance, but at least I recommend checking out 'The Essbase security file management' section of the Essbase DBAG and eventually the Oracle Hyperion Enterprise Performance Management System Backup and Recovery Guide.

    11.1.2.1 SER60-online http://docs.oracle.com/cd/E17236_01/epm.1112/esb_dbag/frameset.htm?launch.html

    11.2.1.1-online http://docs.oracle.com/cd/E17236_01/epm.1112/epm_backup_recovery_11121/frameset.htm?launch.html BURG

    Thank you

    Todd Rebner

  • Create the procedure, truncate table

    When I run the following, I get the following error:
    PLS-00103: Encountered the symbol "TABLE" when expecting one of the following:
    
       := . ( @ % ;
    on the 'truncate table BASE;' line in the following text:
    CREATE OR REPLACE PROCEDURE TransferData IS
    
    BEGIN
        --clear current tables to allow for clean data    
       truncate table BASELINE;    
       truncate table TREATMENT;   
       truncate table FOLLOWUP;   
       truncate table WITHDRAW;
    END;
    Can someone tell me what I am doing wrong?

    Thank you!

    TRUNCATE is not DML, DDL, but you will need the dynamic SQL statements here:

    CREATE OR REPLACE PROCEDURE TransferData IS
    BEGIN
        --clear current tables to allow for clean data
       execute immediate 'truncate table BASELINE';
       execute immediate 'truncate table TREATMENT';
       execute immediate 'truncate table FOLLOWUP';
       execute immediate 'truncate table WITHDRAW';
    END;
    
  • insufficient privileges when you create sequence using the procedure

    CREATE OR REPLACE PROCEDURE schema1.proc1 AS
    BEGIN
    EXECUTE IMMEDIATE 'DROP SEQUENCE schema1.add_ins_seq';
    EXECUTE IMMEDIATE 'CREATE SEQUENCE schema1.add_ins_seq MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 1000 NOORDER  NOCYCLE';
    END;
    

    This procedure is created to schema1 by schema1.

    Schema1 boasts a CREATE SEQUENCE privilege.

    When I run this procedure through SQL Developer after the Cup to schema1, the error is thrown in insufficient privilege to CREATE SEQUENCE, however, DROP SEQUENCE is executed. I can create the sequence without the procedure call.

    If I add AUTHID CURRENT_USER so I don't get the error of insufficient privileges.

    Why it gives this error when the owner and the applicant of the procedure is schema1?

    Hello

    1st thing to know: when a procedure is defined (and updated), any privileges granted through ROLE is not taken into account. This is because these privileges can be active or not at the level of the session (as happens if for example a user has active 'role A' in session 1 but not in session 2 and if this role has been used to define a procedure?) The proecedure must at the same time be VALID in session 1 and INVALID session 2? Is not possible.

    Thus, for instance in a situation of 'standard': user SYSTEM has 'DBA Rôle', so you can for example make a sqlplus session "SELECT * v $ instance;", but you would write a procedure owned by system making instance_name SELECT INTO l_variable OF v$ instance;  "then"surprise": the procedure cannot be compiled because of the ORA-904 Table or view does not exist..." To be able to create the procedure, a DSS system needs to be done.

    2nd thing for your special case, a little more complex: default for a procedure is 'AUTHID DEFINE', but once more: it means "privileges of the author creating the procedure", so without taking into account the acquired privileges through roles... Your user name is 'sequence create' through a role, it cannot use the privilege within the procedure.  But... but when you define the procedure with AUTHID CURRENT_USER, privileges are evaluated at run time, and thanks to the active ROLE in the session by calling the procedure, at this time, the user can create the sequence.  If try again you but with 'The VALUE NONE ROLE' in the session before the call, you will again have the question.

    Conclusion: If you need to do the action, you must grant the user the necessary privilege directly.

    Best regards

    Bruno Vroman.

  • Cannot create the plsql procedure, fails at the cursor

    He was a working procedure that would take ID and then copy the data from the source to the destination parameter parameter. Now I would like to have the NAME as a parameter, I changed the code to accommodate the new settings. But I'm not able to create the procedure. I get error 3-CURSOR (in bold red). I would really appreciate if someone can take a look and let me know what the problem is.

    Thanks in advance

    3 errors

    1 PLS-00103: encountered the symbol "CUR_V_HSP_COLUMN_DETAIL" during the expected in the following way:

    := . ( @ % ;

    The symbol ': = ' was replaced by 'CUR_V_HSP_COLUMN_DETAIL' continue.

    2 PLS-00103: encountered the symbol "NUMBER" when expecting one of the following conditions:

    (

    The symbol "(" was substituted for "NUMBER" to continue.

    3 PLS-00103: encountered the symbol "NUMBER" when expecting one of the following conditions:

    (

    CREATE or REPLACE procedure EPM_PLAN_PLANSAMP. Copy_Details_test1 - Arguments

    ( IN VARCHAR2, HSP_object in_From_Version_Name.) Object_name - Version of

    in_From_Scenario_Name IN VARCHAR2, HSP_object. Object_name - scenarios of

    in_From_Year_Name IN VARCHAR2, HSP_object. Object_name - year from

    in_To_Version_Name IN VARCHAR2, HSP_object. Object_name - Version to

    in_To_Scenario_name IN VARCHAR2, HSP_object. Object_name - scenarios

    in_To_Year_Name IN VARCHAR2 - HSP_object. Object_name - year to

    )

    IS

    number of v_From_Object_Id; -Version of

    number of s_From_Object_Id; -Scenarios of

    number of y_From_Object_Id; -The year of

    number of v_To_Object_Id; -Version to

    number of s_To_Object_Id; -Scenarios to

    number of y_To_Object_Id; -The year to

    BEGIN

    Select object_id in v_From_Object_Id

    of hsp_object

    where type_objet = 35

    and object_name = in_from_version_name;

    Select object_id in s_From_Object_Id

    of hsp_object

    where type_objet = 31

    and object_name = in_from_scenario_name;

    Select object_id in y_From_Object_Id

    of hsp_object

    where type_objet = 38

    and object_name = in_from_year_name;

    Select object_id in v_To_Object_Id

    of hsp_object

    where type_objet = 35

    and object_name = in_to_version_name;

    Select object_id in s_To_Object_Id

    of hsp_object

    where type_objet = 31

    and object_name = in_to_scenario_name;

    Select object_id in y_To_Object_Id

    of hsp_object

    where type_objet = 38

    and object_name = in_to_year_name;

    -Select Details of support for the current Version

    CURSOR Cur_V_HSP_COLUMN_DETAIL (cV_From_Object_Id in NUMBER, cS_From_Object_Id number) IS

    Select DETAIL_ID in the EPM_PLAN_PLANSAMP. HSP_COLUMN_DETAIL where DIM5 = cV_From_Object_Id AND DIM1 = cS_From_Object_Id;

    li_DETAIL_ID NUMBER;

    Li_Next_DETAIL_ID NUMBER;

    FETCH_STATUS NUMBER: = 0;

    v_step_name varchar2 (200);

    v_rec_cnt number: = 0;

    number of v_cnt;

    v_err varchar2 (2000);

    -----------------------------------------Begin Copy Version ---------------------------

    BEGIN

    -Removed next version if already exists

    v_step_name: = 'delete the HSP_COLUMN_DETAIL_ITEM ";

    Remove from HSP_COLUMN_DETAIL_ITEM

    Where DETAIL_ID in (Select DETAIL_ID from HSP_COLUMN_DETAIL

    Where = v_To_Object_Id AND DIM1-DIM5 = s_To_Object_Id);

    v_cnt: = number of lines sql %;

    insert into t_copy_supporting_dtls_log values (v_step_name, v_cnt, 1, sysdate, 'success');

    v_step_name: = 'delete the HSP_COLUMN_DETAIL ";

    Remove from HSP_COLUMN_DETAIL

    where = v_To_Object_Id AND DIM1-DIM5 = s_To_Object_Id;

    v_cnt: = number of lines sql %;

    insert into t_copy_supporting_dtls_log values (v_step_name, v_cnt, 1, sysdate, 'success');

    Open Cur_V_HSP_COLUMN_DETAIL (v_From_Object_Id, s_From_Object_Id);

    v_step_name: = "Insert";

    LOOP

    Look FOR Cur_V_HSP_COLUMN_DETAIL IN li_DETAIL_ID;

    WHEN the OUTPUT Cur_V_HSP_COLUMN_DETAIL % NOTFOUND;

    -Find the next detail_id

    Select Max (DETAIL_ID) + 1 IN HSP_COLUMN_DETAIL Li_Next_DETAIL_ID;

    -Insert in the Table HSP_COLUMN_DETAIL

    Insert into HSP_COLUMN_DETAIL (DETAIL_ID, PLAN_TYPE, DIM1, DIM2, DIM3, DIM4, DIM5, 6,

    DIM7, DIM8, DIM9, DIM10, DIM11, DIM12, DIM13, DIM14, DIM15,

    DIM16, DIM17, DIM18, DIM19, DIM20)

    Select Li_Next_DETAIL_ID, PLAN_TYPE, S_To_Object_Id, DIM2, DIM3, DIM4, V_To_Object_Id, 6.

    DIM7, DIM8, DIM9, DIM10, DIM11, DIM12, DIM13, DIM14, DIM15,

    DIM16, DIM18, DIM19, DIM17, DIM20

    Of HSP_COLUMN_DETAIL

    Where DETAIL_ID = li_DETAIL_ID;

    v_rec_cnt: = v_rec_cnt + sql rowcount %;

    -Insert in the Table HSP_COLUMN_DETAIL_ITEM

    Insert into HSP_COLUMN_DETAIL_ITEM (DETAIL_ID, VALUE, POSITION, GENERATION, OPERATOR, LABEL)

    Select VALUE, POSITION, GENERATION, OPERATOR, Li_Next_DETAIL_ID, LABEL

    From HSP_COLUMN_DETAIL_ITEM where DETAIL_ID = li_DETAIL_ID;

    v_rec_cnt: = v_rec_cnt + sql rowcount %;

    END LOOP;

    Close Cur_V_HSP_COLUMN_DETAIL;

    insert into t_copy_supporting_dtls_log values (v_step_name, v_rec_cnt, 1, sysdate, 'success');

    commit;

    exception when others then

    Rollback;

    v_err: = substr (sqlerrm, 1, 2000);

    insert into t_copy_supporting_dtls_log values (v_step_name, 0, -1, v_err, sysdate);

    commit;

    END;

    END;

    /

    You DECLARE the cursor before using it.

  • Failed to create the stored procedure with the object as a parameter

    Hello

    No idea how to create procedures to the current data stored in SQLFire, try to run the command prompt "sqlf" per call "create_proc.sql" as give below error below

    C:\SQLFire10Beta>sqlf
    sqlf version 10.4
    sqlf> connect client 'localhost:1527';
    sqlf> run 'create_proc.sql';
    sqlf> CREATE PROCEDURE INSURANCE.SEARCHCUSTOMER (IN CUST OBJECT) DYNAMIC RESULT SETS 1 LANGUAGE JAVA PARAMETER STYLE JAVA READS SQ
    L DATA EXTERNAL NAME com.xxx.xxx.sqlfire.dao.CustomerSearchProcedure.searchCustomer;
    ERROR 42X01: Syntax error: Encountered "" at line 1, column 47.
    Caused by: SqlException: Syntax error: Encountered "" at line 1, column 47.
            at com.vmware.sqlfire.internal.client.am.Statement.completeSqlca(Statement.java:1838)
    sqlf> sqlf> 


    and I created a class Java as described below:

    public class CustomerSearchProcedure {
     
     public static void searchCustomer (BaseDTO[] customers, ResultSet[] outResults,
       ProcedureExecutionContext context) throws SQLException {
      BaseDTO searchCriteria = customers[0];
      StringBuilder sql = new StringBuilder();
      sql.append("SELECT * FROM INSURANCE.CUSTOMERS WHERE CUST_NAME LIKE '"+searchCriteria.getCustName().trim() + "%'");
      
      Connection cxn = context.getConnection();
      Statement stmt = cxn.createStatement();
      ResultSet rs = stmt.executeQuery(sql.toString());
      outResults[0] = rs;
     } //END OF METHOD
    }


    This procedure is called class using the class StoredProcedure Spring DAO

    You can let me know why am not able to create the procedure?

    FYI, pots can also can be dynamically installed in the system by using the SYS. Table client-side JARS to transport the jar bytes rather than by requiring that the pot be accessible side Server (http://pubs.vmware.com/vfabric5/index.jsp?topic=/com.vmware.vfabric.sqlfire.1.0/deploy_guide/Topics/sysjars_install.html)

  • Create a procedure SQL with SQL toolkit

    Hello

    I use the SQL Toolbox to get data from a MySQL database (using ODBC connectors).

    I would like to automatically create a procedure on my DB when lauching my application software, so that I do not know there is when I use it.

    But I can't figure out how to do with the SQL Toolbox.

    Indeed, you try to run this script (which works by operating on MySQL workbench) returns the following error:

    DELIMITER $$

    CREATE DEFINER='indus'@'%' PROCEDURE ' FPY'(datetime IN START_DATETIME, IN END_DATETIME datetime)
    BEGIN
    CREATE a temporary table ListingUUT
    (
    UUT_SERIAL_NUMBER VARCHAR (127).
    TEST_COUNTER INT,
    DateTime TEST_TIME,
    UUT_STATUS VARCHAR (32)
    );

    CREATE a temporary table Stat_FPY
    (
    TESTED INT,
    TESTED_ONCE INT,
    REPORT / FLOAT
    );

    INSERT INTO Stat_FPY VALUES (0,0,0).
    INSERT INTO ListingUUT
    (
    SELECT
    UUT_SERIAL_NUMBER, SUM (1), START_DATE_TIME, UUT_STATUS
    OF booster_results.uut_result
    WHERE START_DATE_TIME BETWEEN START_DATETIME AND END_DATETIME
    UUT_SERIAL_NUMBER GROUP
    ORDER BY DESC START_DATE_TIME
    )
    ;

    END

    -Online error-2147217900 took place at NI_Database_API.lvlib:Conn Execute.vi-> Untitled 1

    Possible reasons:
    ADO error: 0x80040E14
    Exception occurred in the Microsoft OLE DB provider for ODBC drivers: [MySQL] [ODBC 5.2.a Driver] [mysqld - 5.6.10 - log] you have an error in your syntax SQL; consult the manual for your version of the MySQL server for the right syntax to use near ' DELIMITER $$

    CREATE DEFINER='indus'@'%' PROCEDURE ' FPY '(IN START_DATETIME datet' à la ligne 1 en NI_Database_API.lvlib:Conn Execute.vi-> sans titre 1)

    An idea so that I can create the procedure?

    Finally, give up on the creation of the procedure with SQL Toolkit functions.

    In fact using exec.vi system to address directly the command-line mysql server...

  • Implementation of associative array (indexes per Table) in the procedure

    Hi guys,.

    I'm trying to implement collections in the procedure. I am trying to store integer values as well as the names & to print the same list of names. Here is my procedure

    create or replace procedure (coll_proc)

    )

    is

    pay type is table of the index number to varchar2 (20);

    salary_list salary;

    L_Name varchar2 (2000);

    Start

    salary_list ('Aude'): = 62000.

    salary_list ("Mohammed"): = 50000;

    ("Julian") salary_list: = 45000;

    L_Name: = salary_list.first;

    l_name is not null loop

    dbms_output.put_line (' the wages of ' |) L_Name | « est » ||' ='|| TO_CHAR (salary_list (L_Name)));

    L_Name: = salary_list. Next (L_Name);

    end loop;

    end;

    Below is the error

    "Error (2.1): PLS-00103: encountered the symbol") "when expecting one of the following numbers: Remove current exists prior" "

    You people could please check this & tell me that where I'm going wrong.

    Hello

    It seems that you have all the parameters in your stored procedure, so remove the "()" after the name of the procedure.

    create or replace procedure coll_proc
    is
      type salary is table of number index by varchar2(20);
      salary_list salary;
      l_name varchar2(2000);
    begin
      salary_list('Rajnish'):=62000;
      salary_list('Minakshi'):=50000;
      salary_list('Seetha'):=45000;
    
      l_name:= salary_list.first;
      while l_name is not null loop
        dbms_output.put_line('Salary of ' ||l_name|| 'is'||'='|| to_char(salary_list(l_name)));
        l_name:=salary_list.next(l_name);
      end loop;
      end;
    

    I tried this and able to create the procedure

    Procedure created.
    

    Kind regards

    Jitendra

  • Using the procedure to display the table of multiple data

    Hi, I need help for the procedure in oracle

    I want to create the procedure to display the table of multiples with sample plan

    with a parameter imployee_id to display an employee_id, name, function, start_date, end_date

    IAM using this query to select more than one table

    SELECT e.employee_id, e.first_name, j.job_title, h.start_date, h.end_date

    E EMPLOYEES

    JOIN j jobs

    ON j.job_id = e.job_id

    JOIN the job_history:

    ON h.employee_id = e.employee_id

    WHERE e.employee_id = 200;

    Thanks for the help

    Blu and Billy showed you the 'real' solution. You can display the data returned by a cursor ref in SQL Developer, too:

    http://www.thatjeffsmith.com/archive/2011/12/SQL-Developer-tip-viewing-refcursor-output/

    Yet as a duty for a beginner is generally do not have the expected solution. Usually, teachers want to see you using a LOOP and dbms_output. something like

    DECLARE

    Xy CURSOR IS

    SELECT whatever

    As much as;

    BEGIN

    FOR r IN xy LOOP

    dbms_output.put_line (r.col1 |' # ' | r.col2);

    END LOOP;

    END;

    Of course this suggestion will inaugurate a discussion abusing DBMS output but I keep my position that it is authorized to use it for learning the basics.

  • Vs role directly privilege on the creation of the procedure

    I gave an our develpers create them all procedure/run procedures privleges and also granted him a role that has choose, update privileges, but always as insufficient privileges error when attempting to create a procedure.

    On the other hand, when I grant the same privilege directly to the user, it is able to create the procedure without error.

    What I'm doing wrong - I'd like only to all privilege granted through roles.

    Your input please.

    acquired through ROLE privileges do NOT apply within the named PL/SQL procedures

Maybe you are looking for

  • Sierra of macOS in combination with hp photosmart 6520

    I installed macOS sierra and now my printer doesn't work anymore. I have already installed the software for the hp several times, but the printer remains invisible.

  • Mac Pro click when turned om

    Is it normal for a macro 2010 started with a loud single click and do the same thing as a result of his sleep?

  • someone has problems trying to change home page

    I'm on 10.11.3 on my mac pro book and now can't go back to my homepage to google. IT is by default in the apple page, and when I go to safari preferences and I click on it it goes nowhere.

  • Why Ctrl + T or new tab do not work?

    I'm using version 3.6.15 and found problem yesterday when I press Ctrl + T, choose new tab or click + in the tab bar but it will not work, but in safe mode, it's working so I tried to uninstall and reinstall this version but it still the same problem

  • Problem with registration of XP

    Please help me. Every 5 minutes XP open this screen. http://img116.echo.CX/my.php?image=snap5pn.PNG I am registered with Microsoft and Toshiba about 100 times...