Running a Script in another schema

Hello

I have two patterns related to my workspace, DEV and TEST.

I want to load some objects in the schema of the TRIAL, scripts are greater than 32 k, so I have to download the scripts rather than using the SQL command window.
When I run a script, objects are created in DEV - the original scheme of the analysis.
I now want to change the analysis of TEST scheme so that the objects are created in this schema. Is it all the same my TEST object was created without adding prefix all object names?

I can't connect to the DB in any other way other than through APEX.
I do not have access to the internal APEX workspace to change the schema of analysis

Thank you
Adam

Are you sure?

SQLScripts select a script to run. Since this page Run, you are allowed to choose the schema on which the Script is run. The pattern selector is the small dropdown at the top right.

CITY

Tags: Database

Similar Questions

  • can the run/run .sql script in another application?

    Hello..

    I have a problem to run my .sql script (for example: @c:\Users\test.sql) in my netbeans application. There is no problem when I want to run/run my sql query (for example: "select * from...").

    But when I want to run my script, no presentation of the result. my script content my query to export to the csv file.

    script: @c:\Users\test.sql

    in the script:

    coil c:\Users\test.csv;

    ' Select ' ' ' | LOT_NUMBER | « «, » » || DEVICENUMBER | « «, » » || DEVICENAME | « «, » » || STEP_NAME | « «, » » || INSERT_DATE | « «, » » || STATUS | « «, » » || DISPOSEDBY | « «, » » || ACCEPTBY | « «, » » || AVAILABLE | « «, » » || GENDISPOSITION | » » »

    of RF_LOT_ON_HOLD_LIST;

    spool off;

    Thank you.

    bunch

    Yes, we know what talking about your question.

    a .sql script is just a plain text file containing everything you want.  The code in it can be a pure SQL statements, it may contain of the PL/SQL code, and it can also include SQL * more specific orders (keep in mind SQL * more is a tool, not a language, so that these commands are specific to this tool and other tools which can also interpret the same commands).

    Not quite sure how your question relates to this blog, as this blog is showing the code that gets the data in JSON format in a jqGrid (jQuery grid?) and then exports the data in an Excel file.

    What you're trying to do is to take a series of SQL * Plus and SQL statements in a text file and generate a CSV file from them.

    As already mentioned, SPOOL is a SQL * more order, specific to SQL * more command line tool.  The database itself has no idea what "spool" means, while passing to the database somehow does not work.  I also doubt that netbeans knows what that means, either.

    So, in short, how you try to do, not you cannot.

  • No model output module custom when you run the script from another process

    Hello

    I have a following problem:

    Try to automate the video rendering. When I run extend script of the program that is launched at windows startup, there is no custom output module template. If the script is started manually, it works perfectly.

    Trying to applyTemplate output module in the results of item renderer error queue.

    I use AE 2014 (13.1.1.3) and windows server 2012 standard r2.

    Thanks for help.

    Sounds like a permissions problem, you will need to set your user contexts and escalate privileges before running the script.

    Mylenium

  • Run dbms_cdc_subscribe.purge_window to another schema

    Hello

    Is it possible to run dbms_cdc_subscribe.purge_window to purge a subscription that is owned by another user?

    Thank you

    good to hear that :) Please do not forget to mark the thread as answered.

  • Re: "insufficient privileges" error when you run the Java stored procedure in another schema

    I get an "insufficient privileges" error when you run the Java stored procedure in another schema, see details below.  I don't know what are missing privileges (I already granted the EXECUTE privilege), suggestions?  -Thank you.

    Define a simple java class and deploy it as a Java stored procedure to test:


    Schema: User1

    test of the package;

    public class HelloWorld {}

    public HelloWorld() {

    Super();

    }

    public static String Hello () {}

    Return "HELLO";

    }

    }

    CREATE or REPLACE FUNCTION HELLO RETURN VARCHAR2 AUTHID CURRENT_USER AS LANGUAGE JAVA NAME ' test. HelloWorld.hello () return java.lang.String';

    Grant execute on USER2 HELLO

    Test the Java stored procedure through the PL/SQL function call (in the same schema):


    Schema: User1

    SET SERVEROUTPUT ON

    DECLARE

    v_Return VARCHAR2 (200);

    BEGIN

    v_Return: = User1. HELLO;

    DBMS_OUTPUT. Put_line ('v_Return =' | v_Return);

    END;

    anonymous block filled

    v_Return = HELLO

    Test the Java stored procedure through the PL/SQL function call in a different pattern:


    Schema: USER2

    SET SERVEROUTPUT ON

    DECLARE

    v_Return VARCHAR2 (200);

    BEGIN

    v_Return: = User1. HELLO;

    DBMS_OUTPUT. Put_line ('v_Return =' | v_Return);

    END;

    Error report-

    ORA-01031: insufficient privileges

    ORA-06512: at "User1." HELLO', line 1

    ORA-06512: at line 4 level

    01031 00000 - "insufficient privileges".

    * Cause: An attempt was made to change the user name or password

    without the privilege appropriate. This error also occurs if

    trying to install a database without the need for employment

    access privileges.

    When Trusted Oracle is configure in DBMS MAC, this error may occur

    If the user has been granted the privilege necessary for a higher label

    that the connection is active.

    * Action: Ask the database to perform the operation or grant administrator

    the required privileges.

    For users Trusted Oracle get this error, well that granted the

    the privilege that is suitable for the top label, ask the database

    administrator to grant the privilege to the appropriate label.

    You have created the function with AUTHID CURRENT_USER, which means that the function is executed with the rights of the applicant (but not with the rights of the author). This means that the applicant must have grants (directly or through roles) on all used/accessible objects in the service. In your case the user USER2 has not granted with EXECUTE on the class/source Java test. Class HelloWorld, causing the ORA-01031 exception. You create service without AUTHID CURRENT_USER (i.e. with AUTHID DEFINE, which is by default, if you do not have a specific reason to use AUTHID CURRENT_USER) or grant EXECUTE on JAVA test SOURCE. Class HelloWorld to User2.

    Dimitar

  • Running a script from .plb

    I use Oracle Database 10 g. I create a function in the hr schema and wrapped it. I can run this file to film in this scheme successfully. But I want to run this script in a different schema. I tried to run this encapsulated file (.plb) in the scott schema. But can not create this function. It gives an error like this-' ORA-01435: user does not exist. "Can I use this schema to another? If so, please someone provide me the way.

    MD. ROUMANE wrote:

    I use Oracle Database 10 g. I create a function in the hr schema and wrapped it. I can run this file to film in this scheme successfully. But I want to run this script in a different schema. I tried to run this encapsulated file (.plb) in the scott schema. But can not create this function. It gives an error like this-' ORA-01435: user does not exist. "Can I use this schema to another? If so, please someone provide me the way.

    Hello Joe,

    ORA-01435: user does not exist

    means that you USER_NAME. Function_name in the encapsulated file (.plb).

    First no wrapped up and remove the user name and re-packed and try.

    Hamid.

  • All files generated by a coil in sqlplus receive ownership of oracle: dba instead of the user of the BONE started sqlplus and run the script. There's a file with users owners of BONES of the coil.

    All files generated by a coil in sqlplus receive ownership of oracle: dba instead of the user of the BONE started sqlplus and run the script. There's a file with users owners of BONES of the coil.

    Script launched in until OS user 'A' on the 'A' server which launches sqlplus, then connects to a remote database through a service of tnsnames.ora as another user of the database and the results of this script are spoulées on the server "A".

    The file queued on the old server is written with rw-rw-r: read write user, group read the writing, reading and possession header that is the user of the OS. The file queued on the new server is written to rw-r-r user: reading writing, reading group, public reading and ownership oracle: dba.

    "" The user then has no privileges to modify the file and continue the process of transmitting the file, editing and deleting the file for the next set of commands. This allows us to keep the possibility to migrate to the new server we are unable to process orders.

    $ORACLE_HOME/bin/sqlplus - s user/password@prd1 @./script/CustomScript/R12_OM_UFPC-oracle.sql

    Background: old server running 4.8, Oracle 10.2.0.4 OEL

    New server running OEL 6.5, Oracle 11.2.0.4

    Tested so far:

    File and update umask to 0002 instead of 0022 is now generated as rw-r-r. However, the property is still oracle: dba.

    Update of ownershipt of $ORACLE_HOME/bin/oracle.exe of oracle: oracle (edi added the user to the oracle group) and chmod 6751 oracle.exe. This created several problems where crucial scripts, that is to say of sqlplus failed to run.

    Added! chmod 755 output.file.name - OS user 'A' is not allowed to change to mod.

    Added! command cp MV output file and that generated the file as a user of the operating system: oracle. It is a potential work around in case of emergency, but the developer would have to rewrite the countless scripts.

    Any ideas?

    I have reproduced the behavior of the old server and am able to spool a file via sqlplus under OS user. No changes have been made on the remote database server. All the changes have been on the new server hosting a small 11.2.0.4 database on a server running OEL 6.5 32 - bit OS.

    (1) removed the sticky bit $ORACLE_HOME/bin/sqlplus using chmod u-s, g-s, o - s suggestion of Billy ~ Verreynne

    (2) modified the main group for the 'oracle' user match the user operating system applications, while maintaining membership in the groups 'oracle' and 'dba '.

    -We are dealing with here EDI processes, so the Group was called edi.

    (3) modified property of the files tnsnames.ora and listener.ora for oracle: edi

    (4) restart the receiver

    (5) disconnect / reconnect

    Script runs as expected, the output file contains the correct ownership and permissions.

    Thank you all for taking a look and offering options.

    -Josh

  • [JSX] Run a script several times at the same time?

    Hello world

    I have a script that make some photoshop editing on a photo I put in his argument. Right now I am able to run this script, one at a time. If I run the script twice (on a different image) it bug to not treat both correctly.
    I might want to do some sort of a multithreaded of this script. It is a script, like never using "app.activeDocument" or is it another way to start the document that you want to process? Or again, is it possible at all?

    Thanks for your answers,

    To post scripts Photoshop forum.

    You can run a script at a time. You can create a script that batch processes your images, or you can run your script in the batch processor or image, if you first create an action to run your script.

  • Insufficient privileges in the creation of MV that he select another schema table

    Hello

    Before asking this question, I checked with similar questions in the forum, but I don't see my situation, or I'd say I'm not clear on the solution.

    I got the privileges CREATE MATERIALIZED VIEW and CREATE ANY MATERIALIZED VIEW and I want to create a MV in my schema, but the MV selects data in another schema, and I had the privilege to choose this table. Here is my code

    Create VIEW MATERIALISEE CPY_GL_HANDS_OFF_DTL

    UPDATE THE BEGINNING WITH THE LARGEST (SYSDATE, TO_DATE ('2013.10.30.23.30.00 ',' YYYY.)) MM DD. HH24.MI. THE NEXT SS SYSDATE')) + (50519 /(24*60*60)) FULL

    ENABLES QUERY REWRITE

    SELECT

    *

    Of

    User_a.GL_HANDS_OFF_DTL@dblink;

    I run it, and I get ORA-01031: insufficient privileges. According to my research so far, the schema of the latter requires the CREATE TABLE privilege, even though she already had RESOURCES (which already includes the CREATE TABLE). Is this true? That's my problem. I only have read access to the table of the dblink, I can't control the privileges of this scheme. Advise please if this is the real problem?

    Thanks and greetings

    acquired through ROLE privileges do NOT apply in the PL/SQL name procedures

  • grant the select privilege on the table in another schema by role error

    Hello
    I have a problem with the granting of privileges to another schema
    I have A user who has only 1 system priv: connect, which has a private: create session;
    I created a role X, which I have the privilege: select on a table to a diagram B customer.
    I then conceded this X role to A user.
    I can't select * B.customers when im connected to A
    identification of information like it that I'm missing?
    Thank you
    Rgds

    >
    but whenever I put a default role, the other is automatically set to zero-defects

    How did you receive the two default roles?
    >
    By running the code I posted above as user SYS.

    Drop your user and start again and use the code I posted.

  • Call another schema in a cursor

    Hello world

    I am trying to export data using UTL_FILE and using a function that receives the SQL as a parameter. Thus, the opening of the cursor within the function like this:
    OPEN C_Cursor FOR P_Query;
    P_Query contains SQL code, and it works with tables on the same schema

    for example.
     P_Query = ‘select col1, col2 from table1’)
    But when I set P_Query to select another schema, it fails.
    for example
    P_Query = ‘select col1 from schema2.table1’;
    I know that if I try this, will work:
    OPEN C_Cursor FOR 'SELECT col1 FROM '||schema2||'.table1';
    But I need to set the schema of the function parameters.
    My question: is there a way to select another schema with a slider, just change the sql script?

    Rafhael Dantas says:

    But when I set P_Query to select another schema, it fails.

    Well, when I open my wallet, I can see what is inside, but when I try to open the wallets of my colleague... :). In order to select from one table to the other schema, you must have the appropriate privileges. In addition, if the option is within the rights define object stored, privilege must be granted directly, without going through the role.

    SY.

  • Can I run a script for a procedure?

    Can I run a script for a procedure? I know I can run scripts from the command line. I was hoping to avoid that because I need my job to run several envirnoments and reliable don't know where is the STARTSCEN, or if it will still work. Basically, I would like to run multiple jobs several times, according to the values in a table that will be changed between executions.

    Hello

    Yes, you can exetute an ODI scenario leave an ODI procedure.

    The technology for this scheme will be Sunopsis API

    code OdiStartScen "-SCEN_NAME =" "-SCEN_VERSION =" "-CONTEXT =" "."

    Thank you
    Fati

  • weird error when I run the script...

    Hi all
    I am running a script script that needs to insert data into tables.
    We are the merger of process from one application to another.
    The code that I have performed in an environment works fine and creates data, how ever if I run following it will insert all the data and shows some unique_constraint_error.

    ORA-00001: unique constraint (schema_name.constraint_name) violated

    I have searched the constraint in all tables (all_constraints, user_constraints, dba_constraints..) of all dev, test, or production environment patterns in the two applications but I don't get this constraint_name.
    I really need help gurus... and thank you everyone who their response time in this forum :) of spare parts

    HTH... Search for unique indexes, they are responsible for a constraint unique voilation.

  • PL/SQL procedure in another scheme gives unexpected result call

    I have a SQL Script that does this:
    Conn pnr / < password of user pnr >;
    Set serveroutput on;
    exec vms.disable_all_fk_constraints;
    SELECT the owner, constraint_name, status FROM user_constraints WHERE constraint_type = 'R ';

    and the disable_all_fk_constraints procedure, which is owned by the user 'vms' is defined as:
    create or replace
    procedure disable_all_fk_constraints is
    v_sql VARCHAR2 (4000);
    Start
    dbms_output.put_line ('disable all referential integrity constraints.');
    for rec in (SELECT table_name, constraint_name FROM user_constraints WHERE constraint_type = 'R') loop
    dbms_output.put_line ('Disabling constraint' | rec.constraint_name |) 'from ' | Rec.table_name | '.');
    v_sql: = 'ALTER TABLE ' | Rec.table_name | "DISABLE THE CONSTRAINT ' | Rec.constraint_name;
    execute immediate (v_sql);
    end loop;
    end;

    When I run the script SQL, the call to vms.disable_all_fk_constraints disables the FK forced in the schema "vms", while I wanted to disable the FK constraints in schema "pnr" (the applicant of the procedure). I know I could do this job by copying disable_all_fk_constraints to the 'pnr' schema procedure and calling it as "+ exec disable_all_fk_constraints; +"inside, the SQL script but I want to avoid having to duplicate the PL/SQL procedure in each schema that uses it.

    What can I do?

    Thank you

    Hello

    Create the procedure with AUTHID CURRENT_USER, like this:

    create or replace
    procedure disable_all_fk_constraints
    AUTHID  CURRENT_USER               -- Added
    is
        v_sql VARCHAR2(4000);
    begin
        ...
    

    With AUTHID DEFINE (which is the default), everything that happens inside the stored procedure goes as if the Owers of procedure was done, except that the USER function returns always the name of the actual user.

    Published by: Frank Kulash, January 11, 2011 11:07
    I just see response to Sven. It is true, that it is a very dangerous thing to do.

  • Error when you try to run the script by using the software development kit at the start of the plugin

    Hello

    I am trying to run a script when my InDesign plugin loading. I called the PanelTreeView sdk sample for example and implemented a Boss StartupShutdown

    In my implementation, in the startup() method, I have the code to get the scriptManager and the scriptRunner for my javascript I want to run. However, when my code hits the following line:

    InterfacePtr < IScriptRunner > theRunner (() Utils < IScriptUtils >-> QueryScriptRunner (scriptFile)); ScriptFile is the script ID file I want to run

    I get error saying "Calling ScriptInfoDatabase::InitScriptInfoManager until resources have been registered".

    I wonder how I can fix this error. or if it of too early to call scriptrunner, then is there another place where I can call him to scriptrunner run my script

    This is how I defined my StartupShutdown Boss class in the file .fr

    Class
    {
    kmyStartupShutdownBoss,
    kInvalidClass,
    {
    / * Implementation of the IStartupShutdownService that runs a script at startup * /.
    IID_IAPPSTARTUPSHUTDOWN, kmyStartupShutdownImpl,
    / * identify the type of service * /.
    IID_IK2SERVICEPROVIDER, kCStartupShutdownProviderImpl,
    }
    },

    Appreciate any help on this one... Thank you!

    Sameer

    Depends on your version of InDesign, you can plan an IdleTask and do it from there or just use a lazy start.

    IID_IK2SERVICEPROVIDER, kLazyStartupShutdownProviderImpl,

    Again depends on your version of InDesign, you first need to check if a script can if run at all - some other nasty plugins can prevent with modal dialog boxes.

    Finally, there is the ability to run scripts to start even without plugin...

    Dirk

Maybe you are looking for

  • Problem USB C

    I have problems when connecting devices since the update USB driver 2.33 Now I need to restart the computer almost everytime I need to connect a USB key or an external hard drive to make it boot and display on the desktop. I tried to use the two memo

  • Prevent others from changing the formula

    I created a Budget sheet to spread and have different contributors who will be able to add information, BUT I don't want their change of layout page or formulas etc. How can this be achieved?

  • Can I connect a CCTV to the s-video output?

    I have a sp20 with s-video and need some images of my microscope at Uni, but when I plug in any device is detected, do I need an external card or can I set up a card for the slots? Or the graphics card from the computer should read the s-video cable

  • HP Envy 17/2000: Is hybrid GPU multiplexed or MUXless?

    My laptop is HP Envy 17 2099el with 3D support, it is the 2nd gen Envy 17 series. A very nice machine, I like it a lot. It comes with a hybrid video card, part is 2nd generation, integrated Intel GPU, another Radeon 6850 M discrete GPU. What is a MUX

  • How to get the properties of the artboard in photoshop CC 2015?

    There is a new feature in 2015 CC Photoshop to create multiple work plans in the same document.I want to get the properties of the plans of work like x, y, height, etc. Is it possible to retrieve the details of the artboard from the script?Thank you.