Issues during restricted session

I have placed my database in restricted mode.
I am trying to run a few DML's with one user which has dba role assigned.
When i executed that procedure through shell scripts I got the following error.
ERROR:
ORA-12526: TNS:listener: all appropriate instances are in restricted mode
But Manually i connected to server & connected to that oracle user, i was able to execute those statements perfectly.
How to enable the user to do the same dml's through procedures?
I granted restricted session privilege to that user.

Also, there's a workaround, add "(UR=A)" to the CONNECT_DATA portion of your connect string definition. This is documented in MetaLink Doc ID 444120.1.
For Example:
DFM2 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.20.3)(PORT = 1521))
(CONNECT_DATA =
(UR = A)
(SERVICE_NAME = DFM.uservices.umn.edu)
Sources :http://dbaforums.org/oracle/index.php?showtopic=9500
ORA-12526: TNS:listener: all appropriate instances are in restricted mode
HTH
Girish Sharma

Similar Messages

  • Weird encoding issue during ssh session

    I'll start by saying that encoding during ssh is somewhat of a mystery to me, and I've always been impressed that 99% of the time it seems to "just work". Anyway, today I ran into one of the 1% cases. I was ssh-ing into my Arch machine from my OS X laptop, and everything was going great. I then realized I need to install something on my Arch machine (from the AUR) and called yaourt to do it. Everything went well with the interactive stuff (pressing Y or enter would continue, pressing n would choose the "no" menu, etc.) until the very last question when it asks if you are really sure you want to install the package. At this point I found it impossible to send a newline to what I assume is pacman. Pressing enter printed ^M, pressing backspace printed ^H, etc. Why would the terminal behave like this, but only during the pacman question and at no other point of interacting with the shell? What is likely wrong with my ssh encoding settings (either on my mac or on my Arch machine) to generate this behavior? Thanks!

    jasonwryan wrote:What happens if you remove yaourt from the equation?
    Calling just pacman works. I can press enter when prompted and install the package.

  • Restricted Sessions

    I set the database to be in restricted session by issuing alter system enable restricted session and then tried to login with a userid that has restricted session privileges and I get ora-12526. We just upgrade from 9.2.0.6 to 10.2.0.3 and I know in 9.2.0.6 I was able to do this without any issues. Does anyone know if I need to do anything different in 10.2.0.3 to make this work?

    It is an expected behavior:
    lsnrctl status
    Service "orcl.us.oracle.com" has 1 instance(s).
      Instance "orcl", status RESTRICTED, has 1 handler(s) for this service...
    Service "orclXDB.us.oracle.com" has 1 instance(s).
      Instance "orcl", status RESTRICTED, has 1 handler(s) for this service...
    The command completed successfully
    f:\Oracle\Consulting>sqlplus system/manager@localhost:1521/orcl.us.oracle.com
    SQL*Plus: Release 11.1.0.4.0 - Beta on Fri Jan 25 11:06:53 2008
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    ERROR:
    ORA-12526: TNS:listener: all appropriate instances are in restricted modeYou should perform the connect operation directly at the host.
    ORA-12526: TNS:listener: all appropriate instances are in restricted mode
    Cause: Database instances supporting the service requested by the client were in restricted mode. The Listener does not allow connections to instances in restricted mode. This condition may be temporary, such as during periods when database administration is performed.
    Action: Attempt the connection again. If error persists, then contact the database administrator to change the mode of the instance, if appropriate.
    ~ Madrid

  • Edits will not be saved. Any Edits made to the enterprise global template items are only available during this session.

    Hi,
    I am getting a pop-up message(Edits will not be saved. Any Edits made to the enterprise global template items are only available during this session.Make edits in checked-out enterprise global template to make them
    available for all users of this project server) when trying to insert a new column in the Gannt Chart View.
    Due to this what all are the columns that inserted in the project plan, will be lost when open the project in the next time.
    I have opened the Enterprise Global Template and cross checked for Gaant Chart view it is showing the table as "Entry" only.
    The requirement is what all columns are required for the project plan, manager will insert in the project first time. Next time on-wards it needs to be display the columns when opened the project from server by default.
    We are unable to reproduce this issue in our Dev Envt.
    Could anyone of you please help me.
    Thanks in Advance!
    Regards,
    Venkat

    Hi Venkat,
    I suggest to remove Gantt Chart view and Entry table from Eglobal. These are default views from client and it is highly recommended to not use them in Enterprise Global.
    Whatever a user ist doing on a view or table which is included in Enterprise Global will be reset on next open - therefore you receive this message.
    If you need some server wide defined views and tables, create them. But remove Gantt Chart and Entry.
    Does that help?
    Regards
    Barbara
    To increase the value of this forum, please mark the replies that helped to solve your issue as answer. If you find answers to questions from other forum participants to be helpful, please mark them as helpful. Your participation will help others to find
    an appropriate solution faster. Thanks for your support!

  • DMU 2.0 Disable Restricted session

    I've just run a conversion from win-1252 to al32utf8 and we noticed that restricted session was not disabled after the conversion had finished. Is this is known bug? I shut the GUI down before I noticed, but there is nothing in the dmu0.log to show that this was attempted.
    On dmu1.1 and 1.2 This was never an issue - the conversion would finish disable restricted session: e.g.
    18.14:22:28:764;V003;T;05000 SQL text is UPDATE SYSTEM.DUM$COLUMNS DC SET DC.DCCS_ID = 0 WHERE DC.DCCS_ID > 0;
    18.14:22:28:764;V002;T;05000 SQL text is ALTER SYSTEM DISABLE RESTRICTED SESSION;
    18.14:22:28:811;V003;T;05000 SQL text is UPDATE system.dum$sqltext SET time_end=SYS_EXTRACT_UTC(systimestamp), sqlcode=0 WHERE step# = 560 AND obj#= 0 AND order# = 563;
    18.14:22:29:061;V002;T;05000 SQL text is UPDATE system.dum$sqltext SET time_end=SYS_EXTRACT_UTC(systimestamp), sqlcode=0 WHERE step# = 560 AND obj#= 0 AND order# = 564;
    18.14:22:29:452;V001;T;05000 SQL text is UPDATE system.dum$sqltext SET time_end=SYS_EXTRACT_UTC(systimestamp), sqlcode=0 WHERE step# = 560 AND obj#= 284929 AND order# = 562;
    18.14:22:29:483;V000;F;45010 Thread 2, connection 2 finished converting post-conversion POST_CONVERSION, and elapsed time is 00:00:00.406.
    18.14:22:29:483;V000;C;05007 About to close connection to jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=x)(PORT=1521))(CONNECT_DATA=(UR=A)(SERVICE_NAME=xxx))).
    18.14:22:29:483;V000;T;05000 SQL text is SELECT USERENV('SID') FROM DUAL;
    18.14:22:29:499;V000;T;05000 SQL text is SELECT s.SERIAL# from v$session s where s.sid = (SELECT USERENV('SID') FROM DUAL);
    18.14:22:29:499;V000;C;05006 Connection ID is 2, session ID is 2840, serial number is 439.
    18.14:22:29:514;V000;C;00001 Disconnected successfully from jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=x)(PORT=1521))(CONNECT_DATA=(UR=A)(SERVICE_NAME=xxx))).
    18.14:22:29:514;V000;F;45010 Thread 3, connection 3 finished converting post-conversion POST_CONVERSION, and elapsed time is 00:00:00.156.
    18.14:22:29:514;V000;C;05007 About to close connection to jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=x)(PORT=1521))(CONNECT_DATA=(UR=A)(SERVICE_NAME=xxx))).
    18.14:22:29:514;V000;T;05000 SQL text is SELECT USERENV('SID') FROM DUAL;
    18.14:22:29:514;V000;T;05000 SQL text is SELECT s.SERIAL# from v$session s where s.sid = (SELECT USERENV('SID') FROM DUAL);
    18.14:22:29:530;V000;C;05006 Connection ID is 3, session ID is 3, serial number is 13.
    18.14:22:29:546;V000;C;00001 Disconnected successfully from jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx)(PORT=1521))(CONNECT_DATA=(UR=A)(xxx))).
    18.14:22:29:546;V000;F;45010 Thread 1, connection 1 finished converting post-conversion POST_CONVERSION, and elapsed time is 00:00:00.781.
    18.14:22:29:546;V000;C;05007 About to close connection to jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=x)(PORT=1521))(CONNECT_DATA=(UR=A)(SERVICE_NAME=xxx))).
    18.14:22:29:546;V000;T;05000 SQL text is SELECT USERENV('SID') FROM DUAL;
    18.14:22:29:546;V000;T;05000 SQL text is SELECT s.SERIAL# from v$session s where s.sid = (SELECT USERENV('SID') FROM DUAL);
    18.14:22:29:561;V000;C;05006 Connection ID is 1, session ID is 2363, serial number is 157.
    18.14:22:29:561;V000;C;00001 Disconnected successfully from jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=x)(PORT=1521))(CONNECT_DATA=(UR=A)(SERVICE_NAME=xxx))).
    18.14:22:29:561;V000;I;40005 Execute Post-Conversion Tasks elapsed 00:00:47.843.
    But in my 2.0 migration I had this:
    23.16:39:08:919;V001;T;05000 SQL text is UPDATE SYSTEM.DUM$COLUMNS DC SET DC.DCCS_ID = 0 WHERE DC.DCCS_ID > 0;
    23.16:39:08:934;V001;T;05000 SQL text is UPDATE system.dum$sqltext SET time_end=SYS_EXTRACT_UTC(systimestamp), sqlcode=0 WHERE step# = 560 AND obj#= 0 AND order# = 1;
    23.16:39:08:950;V000;F;45010 Thread 1, connection 1 finished converting post-conversion OBJECT_REBUILD, and elapsed time is 00:00:00.250.
    23.16:39:08:950;V000;C;05007 About to close connection to jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=x)(PORT=1521))(CONNECT_DATA=(UR=A)(SERVICE_NAME=xxx))).
    23.16:39:08:950;V000;T;05000 SQL text is SELECT USERENV('SID') FROM DUAL;
    23.16:39:08:966;V000;T;05000 SQL text is SELECT s.SERIAL# from v$session s where s.sid = (SELECT USERENV('SID') FROM DUAL);
    23.16:39:08:966;V000;C;05006 Connection ID is 1, session ID is 682, serial number is 31.
    23.16:39:08:981;V000;C;00001 Disconnected successfully from jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=x)(PORT=1521))(CONNECT_DATA=(UR=A)(SERVICE_NAME=xxx))).
    23.16:39:08:981;V000;I;40005 Execute Post-Conversion Tasks elapsed 00:13:01.292.
    This migrations are on two different databases at different time, but both are on the same Oracle version
    > select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for 64-bit Windows: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    My Log File Message Level is FINEST
    Please let me know it there is any more useful diagnostic information in the log files that I can post.
    Thanks,
    Ben

    To add to Weiran's answer: We have removed disabling the restricted session so that nobody except SYSDBA can connect to the database before it is restarted. The instance restart automatically disables the restricted session (unless you explicitly open the database in restricted session mode).
    We request the instance to be restarted as precaution because it is very difficult to guarantee in such a complex system as Oracle Database that the old (stale) database character set information is not cached somewhere in SGA by some existing or future component.
    Note, the instance restart in Oracle Database 12c is required for non-CDB databases only. PDB databases need to be closed and reopened. The CDB instance itself does not have to be restarted.
    The documentation may not talk about it yet. We will fix it.
    Thanks,
    Sergiusz
    Message was edited by: Sergiusz Wolicki (Oracle)

  • Running Job Scheduler in Restricted Session

    I want the database to be in Restricted Session while my ETL load is running via the Job Scheduler so that users will not be able to access tables during the load. When I put it in restricted session however all scheduled jobs cease to run. What user needs Restricted Session privilege? Is it DBSNMP? Is this an acceptable practice?
    Thanks,
    Susan

    Hi Susan,
    Sorry for the delay in replying, I was testing this out and talking with another developer. It turns out that you are right.
    The Scheduler will not begin running any new jobs or new job chain steps while the database is in restricted mode.
    This is intended behaviour and there is no workaround for this. The job coordinator will simply not start any new jobs if it sees that the database is in restricted mode.
    This design choice was made a long time ago and isn't currently planned to be changed (although there have been some questions about it so it may in future).
    Unfortunately you will need to find another way around this.
    -Ravi

  • Detecting Restricted Session mode

    Hi,
    We are using the RESTRICTED SESSION mode to disable logins during batch runs and backup. We are using JDBC-connection pools for web services.
    Since these pools remain connected, no ORA-01035 will be raised when a connection is taken from the pool. It's not a new login.
    Is there a way to detect RESTRICTED SESSION mode (eg. by queying a DBA-view)?
    Greets,
    Roel

    SQL> select logins from v$instance;
    LOGINS
    RESTRICTED

  • Issues during Component Batch Determination for Process Orders

    Hi,
    I am encountering a strange issue during component batch determination of process order.
    1. During creation of process order, when I execute batch determination, systems does determination based on strategies we have set and when I click on Copy it gives an error
    "Log cannot be saved: Object/subobject not specified"
    Message no. BL201
    *Diagnosis
    Log save cancelled because at least one log contains no object or subobject.
    Object and subobject are needed to classify application logs because there are several log types. Only a few logs are managed in main memory at runtime, so this classification is not needed.
    If the logs are to be saved in the database, object/subobject must be specified for later retrieval.
    Procedure for System Administration
    Object/sub object can be passed when a log is created (function module BAL_LOG_CREATE) and changed with BAL_LOG_CHANGE.
    The possible values for object and sub object must be configured in transaction SLG0.*
    If I save the order with CRTD status and come back again in change mode and do determination, It works fine.
    Again when the order is in REL status and do the determination, It gives the same error.
    This happens only for a specific plant, In other plants batch determination works in all scenarios.
    I checked for all plant related Config for batch determination and coudn't find any discrepancies.
    Please advise how to resolve this issue. Thanks in advance for your help
    Regards,
    Aheesh

    There Is no direct solution for your requirement just try this work around.
    While defining the batch determination search strategy for process order in COB1, there is one column Quantity proposal where you can attach the Routines (This is written in ABAB code )  make use of this, define New Routines with ABAB help to fulfill your requirement. Try this if found useful award full points.
    Regards,
    Ajay Nikte

  • Issue during automatic Creation of Work Order from Notification

    Hi,
    I have a issue during automatic Creation of Work Order from Notification.
    BADI implemented: NOTIF_EVENT_POST
    BAPI called in BADI: BAPI_ALM_ORDER_MAINTAIN
    I am able to create Work Order successfully but after that i need to update notification header with created work order number.
    But i am unable to update the same (VIQMEL-AUFNR).
    Can anybody provide solution for the same!
    Thanks,
    Kumar.

    Hi,
    Any inputs on above posted issue!
    Thanks in advance.
    Thanks,
    Kumar.

  • Automating Goods issue during Delivery creation

    Hi all,
    We have a requirement to automate the Goods issue creation for certain type of orders when the Delivery is getting created. The orders that need to be automatically Goods issued during delivery creation are identified based on certain plants. These plants are linked to certain output type and in the output type routine is the standard program RVADEK01 with one additonal code for automating the Goods Issue creation.
    We have a custom table that holds the status of orders and there is a code in user exit userexit_save_document_prepare which changes the status of the order as closed when the goods issue is done.
    But when the delivery is saved, in this case when an automatic goods issue needs to happen, when the flow reaches this user exit, the output type code dosenot get executed and the Goods issue is not done and so the custom table will not be updated with the closed status. So we are in need to findout a place where we can update the status of the order in that table.
    The output type code is not executed even before the other user exit userexit_save_document. The output type code gets executed and goods issue is done after the this userexit_save_document when the COMMIT statement is executed in the subroutine BELEG_SICHEN_POST in the include FV50XF0B_BELEG_SICHERN.
    I need help in finding out if any user exit or badi is called after this commit statement, so that I can add my code to close the status of the order in my custom table. Just after this commit the Goods issue happens and the VBFA table gets updated with the 'R' records for goods issue.
    Please let me know if anyone has any idea on this. The ultimate goal is to find some place after the goods issue is done to update the status of the order as closed in the custom table we have.
    Thanks,
    Packia

    Dear Siva,
    As informed yesterday I changed the language from DE to EN, to match the other shipping points settings in table V_TVST, this did not bring the solution.
    Please let me summarize, I am really desparate here:
    This is only IM related, Not WM.
    Picking lists are not printed for any Shipping Point from this warehouse, this is just a small subsidiary of my customer in Finland.
    Issue is not Aut. PGI.
    VP01SHP has not been configured for any shipping points, still there we do get the PR except for the new shipping point.
    In the deliveries of correct processed shipping points  I do not find any picking output type.
    Item category in new shipping is equal to Item category in already existing shipping points, so no need to config here.
    There is no picking block active.
    PR creation happens once I enter the pick qty in the delivery in VL02N. This is the part that we need to have automated.
    Can you please try to help me out?
    Tnx & regards,
    Chris

  • Critical Issues During SAP Implementation or After Golive

    Can anybody tell me one of  the most critical/ challenging issues During SAP Implementation or After Golive
    in these modules:-
    MM implementation
    PP implementation
    SD implementation
    FI/CO implementation
    PS implementation
    QM implementation
    HR implementation
    BI implementation
    XI implementation
    Thanks and regards
    RS

    hi,
    I will list out few of critical issues in
    Implementation :
    1 . Ensure 100% mapping of business process for all modules with SAP(avoid customization in support phase)
    2.  Unit & Integeration testing should be through with all validations
    3.  Master datas(Vendor,Customer) care must be taken will uploading datas thru LSMW,
    If there are common vendors for all plants,Create a vendor for a plant extend it to other plants
    4. Check tax procedures are customized according to requirements.
    5. Complete all print document customizations before go live
    6. Complete end user training(2 or more cycles) should be top priority before go live(This will avoid
    cancellation/reversal of documents after post go live)
    7. Ready with standard MIS reports & customized reports for business decision making
    8. Excise opening balance updation in tables for RG1 register in tables(Note 951955) on go live
    9. Check all tables datas are updating correctly
    10. Declare go live to SAP Support
    11. Check All user authorization should be correct according to their roles.
    12. Centeralize all master datas creation(avoid duplication)
    13. Create transaction variants to avoid entires in unnecessary fields & make certain fields mandatory.
    14. Ensure document numbering is completed for all documents
    15. Validate accounting entries are hit properly according to requirement in quality client with FI CTM(Core team member).
    After Go live :
    1. Missing authorization for users will play key part here,For ex : PGI while doing delivery,Excise capture & post in MIGO/J1IEX.
    2. Do internal audit every month,identify transactions if there will possibility for misuse or wrong entries,requires validation,identify users weak in certain areas.
    3. Identify there is enhancements to be done in transaction process(By step-2)
    4. Prepare a list of month & year end activities to be performed for all modules give to users
    5. Prepare  a list of frequently used transaction codes module wise give it to users
    6. If there is subcontracting,ensure challan creation,GR,reconcillation should be done regulary(monthly)
    7. Train the users,take reports in respective modules.
    8. Additonal customization might be done in print documents.
    9. Instruct users/CTM's to adapt SAP Standard practise
    10. Update excise tax rates after every indian budget
    Hope it helps.
    Edited by: Jeyakanthan A on Apr 29, 2010 6:48 PM

  • Issue during Save - BDT

    Hi All,
    I have added 2 custom fields in the additional tab of the BP transaction using BDT.
    I have enhanced the table BUT000 with the above two fields using append structure.
    But now i got following few issues during saving the BP.
    1) Not able to save those two custom field values in the corresponding table of BUT000.
         As i was new to BDT could any one guide me how to save the custom field information in BDT?
      2) If I am changing any one of the fields and trying to save for any existing BP,
          It was throwing a message saying 'No changes done to the transaction'.
          Here the Transaction was not recognizing the fields even if the changes done.
          Could any one please let me know how to handle this?
    Thanks in advance.
    Regards,
    Gopi.

    Hi,
    1> Did you implement function module for DSAVE event? Check if you have  different names for the field in the BDT table and the database table in the BDT setting
    Assign field to DB
    2> You need to write a function module for XCHNG event and export 'X' after checking the old and new memory for changes. This will correct the message.
    Thanks and warm regards,
    Smita.

  • Restricted session privilege in 9i and 10g

    We recently upgraded from 9.2.0.7 to 10.2.0.3. Oracle 9i allowed a user with RESTRICTED SESSION priv to connect (sqlplus user /@db) when the database was in restricted mode as it should. However, our Oracle 10g database will not allow a user with RESTRICTED SESSION privilege to log in after 'alter system enable restricted session' is executed. The DBA role does not work nor does granting the system privs CREATE SESSION and RESTRICTED SESSION directly to the user. The error I get when trying to log on is ORA-12526. Any advice on how to remedy this would be much appreciated.
    what is the alternative to achieve the same in 10g other than locally?
    Thanks,
    Vishal

    From 10g doc (Oracle® Database Administrator's Guide):
    Typically, all users with the CREATE SESSION system privilege can connect to an open database. Opening a database in restricted mode allows database access only to users with both the CREATE SESSION and RESTRICTED SESSION system privilege. Only database administrators should have the RESTRICTED SESSION system privilege. Further, when the instance is in restricted mode, a database administrator cannot access the instance remotely through an Oracle Net listener, but can only access the instance locally from the machine that the instance is running on.

  • Running Chain Job in Restricted Session

    I have my normal jobs running is Restricted Session
    DBMS_SCHEDULER.SET_ATTRIBUTE('job_name', 'ALLOW_RUNS_IN_RESTRICTED_MODE', TRUE);
    I did the same for my chain job. The chain job starts but the first step doesn't start until out of restricted session.
    I get this if I try to set_attribute on a program
    ORA-27469: ALLOW_RUNS_IN_RESTRICTED_MODE is not a valid program attribute
    ORA-06512: at "SYS.DBMS_ISCHED", line 4436
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 2925
    Is there some way to run the steps of a chain in restricted session?
    11gR2

    Greg Here is an example I created for you. It is very close to what I am doing and I was able to duplicate the problem with it.
    -- replace sch_util.send_mail()   with your own PL SQL code.
    DECLARE
    v_job_name VARCHAR2(32) := 'example_job';
    v_chain_name VARCHAR2(32) := 'example_chain';
    BEGIN
    --drop chain and job
    BEGIN
      DBMS_SCHEDULER.DROP_CHAIN(v_chain_name,TRUE);
    EXCEPTION WHEN OTHERS THEN
      DBMS_OUTPUT.PUT_LINE('Error DROP_CHAIN ' || v_chain_name);
    END;
    BEGIN
      DBMS_SCHEDULER.DROP_JOB(v_job_name, TRUE);
    EXCEPTION WHEN OTHERS THEN
      DBMS_OUTPUT.PUT_LINE('Error DROP_JOB ' || v_job_name);
    END;
    --create all the programs for chain
    DECLARE
      v_pl_sql VARCHAR2(4000) := 'BEGIN sch_util.send_email(''example chain step 1'', ''Hellow world 1''); END;';
      v_prog_name VARCHAR2(32) := 'example_1_prog';
    BEGIN
      --drop program
      BEGIN
       DBMS_SCHEDULER.DROP_PROGRAM(v_prog_name);
      EXCEPTION WHEN OTHERS THEN
       DBMS_OUTPUT.PUT_LINE('Error DROP_PROGRAM ' || v_prog_name);
      END;
      --create program
      DBMS_SCHEDULER.CREATE_PROGRAM (
         program_name           => v_prog_name,
         program_action         => v_pl_sql,
         program_type           => 'PLSQL_BLOCK',  
         enabled                => TRUE,
         number_of_arguments    => 0,
         comments               => 'example chain step 1');
      DBMS_SCHEDULER.SET_ATTRIBUTE (
         name                   => v_prog_name,
         attribute              => 'max_run_duration',
         value                  => interval '240' minute );
    END;
    DECLARE
      v_pl_sql VARCHAR2(4000) := 'BEGIN sch_util.send_email(''example chain step 2'', ''Hello world 2''); END;';
      v_prog_name VARCHAR2(32) := 'example_2_prog';
    BEGIN
      --drop program
      BEGIN
       DBMS_SCHEDULER.DROP_PROGRAM(v_prog_name);
      EXCEPTION WHEN OTHERS THEN
       DBMS_OUTPUT.PUT_LINE('Error DROP_PROGRAM ' || v_prog_name);
      END;
      --create program
      DBMS_SCHEDULER.CREATE_PROGRAM (
         program_name           => v_prog_name,
         program_action         => v_pl_sql,
         program_type           => 'PLSQL_BLOCK',  
         enabled                => TRUE,
         number_of_arguments    => 0,
         comments               => 'example chain step 1');
      DBMS_SCHEDULER.SET_ATTRIBUTE (
         name                   => v_prog_name,
         attribute              => 'max_run_duration',
         value                  => interval '240' minute );
    END;
    -----------------------------Start Chain Definition -----------------------------------
    DBMS_SCHEDULER.CREATE_CHAIN (
         chain_name            =>  v_chain_name,
         comments              =>  'Example chain!');
    --- define steps for this chain.
    DBMS_SCHEDULER.DEFINE_CHAIN_STEP(v_chain_name, 'example_step1', 'example_1_prog');
    DBMS_SCHEDULER.DEFINE_CHAIN_STEP(v_chain_name, 'example_step2', 'example_2_prog');
    -- define corresponding rules for the chain.
    DBMS_SCHEDULER.DEFINE_CHAIN_RULE(v_chain_name, 'TRUE', 'START example_step1');
    DBMS_SCHEDULER.DEFINE_CHAIN_RULE(v_chain_name, 'example_step1 SUCCEEDED', 'START example_step2');
    DBMS_SCHEDULER.DEFINE_CHAIN_RULE(v_chain_name, 'example_step2 COMPLETED', 'END');
    -- enable the chain
    DBMS_SCHEDULER.ENABLE(v_chain_name);
    --- create a chain job to start the chain 
    DBMS_SCHEDULER.CREATE_JOB (
         job_name        => v_job_name,
         job_type        => 'CHAIN',
         job_action      => v_chain_name,
         start_date    => '6-AUG-2014 9.35.00 AM AMERICA/CHICAGO',
         enabled         => FALSE);
       DBMS_SCHEDULER.SET_ATTRIBUTE(v_job_name , 'max_run_duration' , interval '4' hour);
       DBMS_SCHEDULER.SET_ATTRIBUTE(v_job_name, 'raise_events',DBMS_SCHEDULER.JOB_FAILED);
       DBMS_SCHEDULER.SET_ATTRIBUTE(v_job_name, 'ALLOW_RUNS_IN_RESTRICTED_MODE', TRUE);
       DBMS_SCHEDULER.ENABLE(v_job_name);
    END;

  • Privileged user cannot access restricted session

    There is a bug (Doc ID 444120.1) that stops a 10g listener from accepting connections for an instance in "restricted session" mode, even though the user has the required privilege.
    The solution is to put (UR=A) in the CONNECT_DATA part of the tnsnames.ora file. However, v1.5.1 of SQL Developer ignores this parameter and still won't allow connections. Can this be fixed in the next version please?
    Thanks, Paul

    Tablespace doesn't matter, but the owner does. You have to prefix the table with its scheme/owner (OWNER.EXPENSEREPORT), or assign a (public) synonym to it.
    Have fun,
    K.

Maybe you are looking for

  • Super Drive and DVD Regions

    Hi, I know that most DVD players lock out after a certain number of region changes but if I buy two super drives can I use one for my international DVDs and one for my American DVDs or is the region lock part of the hardware of my macbook air? Thanks

  • Office 2011 Excel Macro Support

    Generally I've been very pleased with Office 2011 on Mac. However, in using the Tables area in Excel I have encountered several problems: * VBASIC macros don't work very well (or, perhaps, don't work at all. If example it isn't possble to create a ta

  • FCP will load once but then crash the rest

    Hi guys, I dont know why this keeps happening, but everytime i load FCP it stops loading half way through. When i uninstall completely then reinstall it will load up, but only once. Then everytime i load after that, it just crashes. Anyways could som

  • Question re Verizon Samsung Charge phone and Gingerbread when we get it

    Friday - 9/16/2011 ALL, My question is, when the OFFICIAL Verizon OTA (Over The Air) version of Gingerbread comes out and I update my Samsung Charge Droid phone will it wipe out all my phones settings along with my music, videos, the APPs that I load

  • Filter data in multiple tabs from same XMLDataSet

    Hi All: What I need to do is display the content from one XML file in several different modes. I would prefer to use only one data call if possible because all information exists in the one file; however, I have not yet found a way to successfully fi