Creating table in the schema has with the user B and granting permissions to the user C

Hello, I have a problem fun - we have a large table which requires a batch to make millions of updates, and he needs to finish more quickly. It takes several hours as an update, but a select create table did the same thing in about a minute. Yay! Then we just delete the old table and rename the new table to the former, rebuild all the index and grant select/insert/update/delete permissions to another user who needs access... and there is the problem, Oracle said insufficient privs.

We have A figure, which is the owner of the table, userid B who done all the stuff of application batch and userid C which performs inserts for a process of middleware. None of them are actual users, of course. We want that user B to do the ETG, rename, rebuild and re-grant of the authorisation of the index. But user B apparently cannot grant permissions on objects in the schema A to user C, even if B has created the table and has the role DBA (not ideal, I know)!

What's really crazy is that there is no sense unique user b can grant permissions to user C, which is to:

grant select any table USER c;
grant insert any table USER c;
grant update any table USER c;
Grant delete any table USER c;

It seems really perverse can create tables in diagram A and even grant C privs "whole table" that user B, but may not grant privs specifically on this object in the schema A, even with DBA privs. I must be missing something... right?

Yes. By default, the stored procedures are stored procedures from DEFINER rights. If A is the owner of a stored procedure, this stored procedure can do whatever A enjoys the privileges to directly. If A grants B privileges RUN this stored procedure, when B calls the stored procedure, the procedure runs with the privileges.

I agree point stew, however, re-creating objects in Oracle is generally a bad idea and a TRUNCATE with one insert direct-path, possibly combined with the deactivation and the rebuilding of the index would be more appropriate than a DEC. If you're going to stick with this Assignment, however, that really do in a stored procedure owned by A while B has no need to CREATE ANY TABLE.

Justin

Tags: Database

Similar Questions

  • create table in the remote database

    Hi friends,

    Is it possible to create a table in a remote with the syntax as database

    create table - on the remote database
    in select * from tbl - table with user defined data types.

    Thank you
    Akila Mathon.

    Remote DDL operations are not allowed.

    Create a procedure on the remote database, which will create the table using

    execute immediate 'Create table table_1 as select * from table@remote_link '
    
    Example
     create procedure ddl_remote(str varchar2)
     as
     begin
       execute immediate str ;
     end ;
     /
    

    Where remote_link is the database when you call the procedure.

    Directly GRANT EXECUTE CREATE TABLE to the user in which the procedure is created.

    Call the procedure of your current database.

    begin
       ddl_remote@DB_remote('create table emp as select * from emp@remote_link ') ;
    end ;
    /
    

    HTH
    SS

  • create table on the production database

    Hi expert I want some knowledge in real time
    If a user has requested to create a table on the production database where DBA one should contact 1.
    form where dba approval for create table.


    Thanks and greetings
    Sanat

    It depends on your hierarchy of society. Generally, your immediate boss.

  • Create table replaces the existing table in mssql

    In a program that allows us to update our sites, we use the function 'create an array' of MS SQL to create missing tables in databases.

    Thousands of time we used it, if a table already exists with the same name of the table in the create table MS SQL survey command an error.

    In fact, MS SQL documentation indicates that only if you include the optional 'replace' command, will be a replaced existing table.

    But today, we used this program on a new host, that we are trying, and the create table command actually did replace an existing table with a new table, delete all the records from the old table.

    I'm trying to understand what this would allow the settings at the server level.

    This is the code we use:

    < CFQUERY NAME = "recipe" DATASOURCE = "recipe" dbtype = "ODBC" username = "" #ruser # "password =" #rPASS #">"
    Create table recipecats)
    RecipecatID int IDENTITY(1, 1) NOT NULL PRIMARY KEY,
    recipecatdescription NVARCHAR (50) NULL)
    < / cfquery >

    Are you sure that this is not just to create another table with the same name, but one
    different owner?

    I saw the strangeness (it's probably just weird for me because I am ignorant)
    of what is happening), I can READ a table owned by another user without
    calling the name of the table with its owner, and when I go to CREATE a table
    of the same name, it is actually created as my current user and subsequently when
    you ask the name of the full table, I get the results of one, is not new
    the former. If I'm right in the name of the table, I can ask both/either. Kind
    way similar CF hunting around different scopes when you aren't eligible one
    reference to a variable.

    Also, your code should probably be testing to see if the table exists
    before you try to create it anyway. "Just try and catch.
    "If it errors" is not considered as 'test' if there is

    --
    Adam

  • How to create table of the method

    Hello-

    Could someone please tell me how can I create an af:table with more than one column of an AppsModule method.

    When I have a 1 d table return for example:

    public String [] createTable()}
    String [] str = new String [1];
    return str;
    }

    I can get as a table and a column is created. But how do I get mutiple columns in a table. I want to write a method that when inserted on jsp page create table with multiple columns.

    I use ADF 11 g.

    Please suggest.

    Greetings-
    Rohit

    Hello

    to do this, you use a matrix, or a list of arrays of objects. The object represents the contents of the line, e.g., person. The Person class then have setter/getter for each property you want to display in a column

    Frank

  • Creating table in the desired tablespace

    Hello

    I created the CUZK_BACKUP tablespace:


    CREATE the TABLESPACE CUZK_BACKUP DATAFILE ' / oradata/RUIAN/cuzk_backup01.dbf' SIZE 3 G AUTOEXTEND ON NEXT 100 M MAXSIZE 15 G;

    Now I'm trying to create table in this space of table like this:

    BEGIN

    -zjisti, if jiz existuji tabulky ve schematu centrumadmin (0 - no, 1 - year)

    SELECT COUNT (*) in the nCount_aud FROM dba_tables owner WHERE to = 'CENTRUMADMIN' and table_name = "$ _BACKUP2";

    SELECT COUNT (*) in the nCount_fga FROM dba_tables owner WHERE = 'CENTRUMADMIN' and table_name = "FGA_LOG$ _BACKUP2";

    IF (nCount_aud < = 0)-pokud tabulka neexistuje, vytvor ji partisnovanou po mesici

    THEN

    v_sql_aud: =' CREATE TABLE CENTRUMADMIN. AUD$ _BACKUP2

    TABLESPACE CUZK_BACKUP

    storage (initial 500 m next 50 m maxextents unlimited)

    PARTITION BY RANGE (NTIMESTAMP #)

    INTERVAL (NUMTOYMINTERVAL (1, "MONTHS"))

    (

    P_2013 PARTITION VALUES LOWER THAN (TO_DATE ("01/01/2014", "DD-MM-YYYY"));

    P_2014_01 PARTITION VALUES LOWER THAN (TO_DATE ("02/01/2014", "DD-MM-YYYY"));

    P_2014_02 PARTITION VALUES LOWER THAN (TO_DATE ("03/01/2014", "DD-MM-YYYY"));

    P_2014_03 PARTITION VALUES LOWER THAN (TO_DATE ("04/01/2014", "DD-MM-YYYY"));

    P_2014_04 PARTITION VALUES LOWER THAN (TO_DATE ("05/01/2014", "DD-MM-YYYY"));

    P_2014_05 PARTITION VALUES LESS THAN (TO_DATE ("06/01/2014", "DD-MM-YYYY")))

    AS select * from SYS. AUD$ where 1 = 2';

    EXECUTE IMMEDIATE v_sql_aud;

    DBMS_OUTPUT. Put_line ('Vytvorena tabulka CENTRUMADMIN.) AUD$ _BACKUP2.') ;

    ON THE OTHER

    DBMS_OUTPUT. Put_line (' CENTRUMADMIN Tabulka.) AUD$ _BACKUP2 jiz existuje.') ;

    END IF;

    Table is created, but not in the CUZK_BACKUP tablespace:

    Select table_name, tablespace_name from dba_tables where owner = "CENTRUMADMIN";

    TABLE_NAME, TABLESPACE_NAME

    ------------------------------ ------------------------------

    CUZK_SLUZBY OKO_USR_SCD

    CUZK_LOG_BEHU OKO_USR_SCD

    CUZK_LOG_FAZE OKO_USR_SCD

    CUZK_LOG_CHYBY OKO_USR_SCD

    AUD$ _BACKUP

    AUD$ _BACKUP2

    FGA_LOG$ _BACKUP

    FGA_LOG$ _BACKUP2

    Why there is no tablespace and how to make it work?

    Thank you

    Honza



    For a partitioned table, the actual segments are at the Partition level.  If a query DBA_TAB_PARTITIONS and DBA_SEGMENTS.

    Hemant K Collette

  • Create table in the select statement.

    Hello Oracle gurus,

    I am creating a table using select * in the other table.

    The procedure I am following is as follows: -.

    I have a temporary table whose signature is on delete rows commit.

    I insert records into this table.

    When I select * from temporary_table, perm_table, I get a few lines.

    so I try to create a result_table the use of this

    CREATE TABLE result_table
    AS SELECT * FROM temporary_table, perm_table;

    I see the created array, but the number of records in 0. Please can someone explain where the validation is performed while the sequence in this query occurs.

    Thank you

    Published by: user10696492 on November 10, 2009 08:47

    Hello

    When you perform DDL like CREATE TABLE implicit validation takes place just before and just after the statement.

    Concerning
    Peter

  • DataPump - expdp.open creates tables in the schema

    Hello

    I use datapump in Oracle 10 g to archive old main schema to another schema partitions.

    I noticed that when dbms_datapump.open is called and a new table is created by dbms_datadpump for internal purposes. This is verified in the oracle documentation

    http://docs.Oracle.com/CD/B12037_01/AppDev.101/b10802/d_datpmp.htm#997383

    Notes on use

    • When the task is created, a master table is created for work under the scheme of the appellant in the default tablespace of the appellant. A handful referring to employment is returned that attaches to the current session to use. Once attached, the handle remains valid until that either explicit or implicit detach occurs. The handle is only valid in the session of the appellant. Other handles can be attached to the same task from another session using the ATTACH procedure.

    Does anyone know if this table can be removed by a call to dbms_datapump Oracle 'clean', or if it has to be cleaned manually.

    can confirm that this is what you do

    v_job_handle: = DBMS_DATAPUMP. OPEN('EXPORT', 'TABLE', NULL, v_job_name);

    -The parallelism 1 value and add the file

    DBMS_DATAPUMP. SET_PARALLEL (v_job_handle, 1);

    DBMS_DATAPUMP. ADD_FILE(v_job_handle, v_job_name |) '_' || v_partition. PARTITION_NAME | ".dmp", "PARTITION_DUMPS");

    -Apply filters to process only a partition in the table

    DBMS_DATAPUMP. METADATA_FILTER(v_job_handle, 'SCHEMA_EXPR', 'IN ("SIS_MAIN")');

    DBMS_DATAPUMP. METADATA_FILTER(v_job_handle, 'NAME_EXPR', ' AS "' | t_archive_list (i) |) '''');

    DBMS_DATAPUMP. DATA_FILTER(v_job_handle, 'PARTITION_EXPR', ' IN ("' | v_partition.partition_name |)) ')', t_archive_list (i), "SIS_MAIN");

    -Use statistics (rather than blocks) to estimate the time.

    DBMS_DATAPUMP. SET_PARAMETER(v_job_handle, 'ESTIMATE', 'STATISTICS');

    -Start the work. An exception is returned if something is not installed correctly.

    DBMS_DATAPUMP. START_JOB(v_job_handle);

    -The export job should work now. We loop until its finished

    v_percent: = 0;

    v_job_state: = "UNDEFINED";

    WHILE (v_job_state! = 'DONE') and (v_job_state! = "STOPPED") LOOP

    DBMS_DATAPUMP.get_Status (v_job_handle,DBMS_DATAPUMP.ku$_status_job_error + DBMS_DATAPUMP.ku$_status_job_status + DBMS_DATAPUMP.ku$_status_wip,-1, v_job_state, m);

    js: = sts.job_status;

    -As percentage-complete in this loop changes, displays the new value.

    IF js.percent_done! = v_percent THEN

    v_percent: = js.percent_done;

    END IF;

    END LOOP;

    -Once the work is finished, view the status before you loose work.

    PRC_LOG (f1, t_archive_list (i) |) ': Export complete with status: '. v_job_state);

    -DBMS_DATAPUMP. Detach (v_job_handle);

    -Use STOP_JOB instead of DETACHING otherwise 'master' table that is created when the OPEN is called is not removed.

    DBMS_DATAPUMP. STOP_JOB(v_job_handle, 0, 0);

  • Creating table in the model with 80 columns

    Hello

    I am trying to create a model to display 80 columns, but in Word format, I get the message "you cannot create a table with more than 63 columns.
    Can how I put the 80 columns in the Template.rtf?

    Env: Suite Oracle E business 12
    Output required: Excel

    Thanks in advance.

    It's the MSword limitation and no BEEP, but indirectly there is a limitation of the BEEP ;)

    MSWord supports only maximum of 63 columns.
    As MS Word supports only the width of page maximum of 22 inches wide and 22 inches high.

    Option 1:

    Create a table with two columns
    Insert a table with 63 columns in the first cell,
    Insert a table with 63 columns in the second cell,
    How we can get rid of limitations columns.

    Option 2:

    If you want to use more than 63, then you use templates other than RTF. I recommend XSL.

  • Creating Tables using the piped cmdlets

    Hi all

    Sorry to do this, but I'm in a hurry nature. I know that I need to read the manual and I intend to do very soon!

    I'm currently building a table or create an output that displays the name of the virtual machine and the NetworkName. I don't know how make the output show both. I implemented the command below, but it only displays the NetworkName. I tried various things, but I can't get the two items will appear...

    Can someone help me? Thank you!!!

    Get-Cluster DEV | Get - VM | Get-NetworkAdapter | Select-Object - property "NetworkName".

    Try something like this

    Get-Cluster DEV | Get-VM |
    Select Name, @{N="NIC";E={$_ | Get-NetworkAdapter | %{$_.NetworkName}}}
    

    If you have more than 1 NETWORK adapter on a virtual machine, you can do

    Get-Cluster DEV | Get-VM |
    Select Name, @{N="NIC";E={[string]::Join(',',($_ | Get-NetworkAdapter | %{$_.NetworkName}))}}
    
  • create table from the XML file at several levels

    Hello

    I'm working on the provision of an app to display xml data, which are currently using data from the settings file where the data was stored in a table.

    CONT =]
    [{txt: 'Perfume'} //main menu]

    [[{txt: 'Top Note', framework: 'topNote'}, {txt: 'Heart notes', frame: "heartNote"}, {txt: frame, 'Note of Base': 'gaps'}] / / submenu]

    ,[
    {txt: 'Packaging', field: 'packaging'} / / main menu

    ]

    ]

    I created an xml file and am able to recover data and impossible to find the same.

    Here's the xml file

    < Products >
    < produces txt = setting "Perfume" = "" > "".
    < = frame 'Top Note' = "topNote" txt file name > < / name of the file >
    < = txt file name ' heart notes"frame ="heartNote"> < / name of the file >
    < file name txt = "Core score" frame = 'gaps' > < / name of the file >
    < / product >
    < produces txt = framework of 'Packaging' = 'packaging' > < / product >
    < produces txt = framework "3D Animation" = "tvAd" video = "true" flvName = "video.flv" w = "547" h = "309" > < / product >
    < product txt framework "advertising Lla' = 'the package' = >
    < name of the txt-file = "Print Ad Creative Pack" frame = "printCp" > < / name of the file >
    < / product >
    < / product >

    AS A CODE

    ---------------------------------------

    (GlobalVarContainer.myXML is the place where is stored the xml file)

    var node:XMLNode = GlobalVarContainer.myXML.firstChild;
    var navItm:int = int (node.childNodes.length);
    for (i = 0; i < wheel; i ++) {}

    var temp_array:Array = new Array();
    var subnavCount:int = int (node.childNodes [i].childNodes.length);     subnav
    var obj:Object = new Object();
    obj.txt = node.childNodes [i] .attributes ['txt ""]
    obj. Frame = node.childNodes [i] .attributes ["frame" "]
    trace (node.childNodes [i]. Attributes ['txt'])

    for (var j: int = 0; j < subnavCount; j ++)
    {
    trace (node.childNodes [i] Sublst.ChildNodes(1).ChildNodes(0) [j]. Attributes ['txt'])
    obj.subtxt = node.childNodes [i] Sublst.ChildNodes(1).ChildNodes(0) [j]. Attributes ['txt'];
    obj. Subframe = node.childNodes [i] Sublst.ChildNodes(1).ChildNodes(0) [j]. Attributes ['frame'];
    temp_array.push (obj);
    }
    GlobalVarContainer.my_array.push (temp_array);

    }

    If I add - trace (GlobalVarContainer.my_array); -to code the outout is

    [object Object], [object Object], [object Object]
    [object Object], [object Object], [object Object],.
    [object Object], [object Object], [object Object],.
    [object Object], [object Object], [object Object], [object Object]

    but trace (.txt [i] GlobalVarContainer.my_array + "array"); or trace (GlobalVarContainer.my_array [i] [0] .txt + "array"); no results.

    need advice to move forward from here.

    Thank you

    AYUSH

    What I meant is that if you load the XML e4x, you have to analyze in a table to use it. You can retrieve the syntax of e4x XMLList and use it directly in your code. You can treat the XMLList almost as you treat any array using a for each loop for example.

    Take the code below as an example and adapt it to your needs:

    var mainMenu:XMLList = this.testXML.menu;

    for each {var menu: XML (in mainMenu)}

    trace ("Menu:" + menu.@txt);

    You can use your logic to create menu main point here

    var mynavItem:Navitem = new Navitem (0, spatie * i, GlobalVarContainer.my_array [i] [0], [i, 0], false, true);

    this.holder.addChild (mynavItem); ABLE TO VIEW THE MAIN MENU

    var items: XMLList = menu.children ();

    If (items.length () > 0) {}

    for each {var point: XML (in the points)}

    trace ("point:" + item.@txt);

    Logic of creation of subitem here

    var mySubnavItem:Navitem = new Navitem (dash, spatie * (i + 1 + j), GlobalVarContainer.my_array [i] [2], [i, j], true);

    this.holder.addChild (mySubnavItem);        DISPLAYS ONLY THE LAST ENTRY IN THE SUBMENU

    }

    }

    }

  • How to create an accessible PDF for Thesaurus with many chapters, Acrobat and InDesign CS 5.5

    Hi people,

    I was thinking about a thesaurus (controlled vocabulary for the archives of the Agency) in InDesign CS 5.5. I am preparing an accessible PDF from many files (using a book created in InDesign). Coverage, the preliminary pages and back cover are not part of the book, to keep the simple page numbering.

    The book has two main sections, one alphabetical display and a hierarchical display of terms and their relationships. I created chapters by lists of the alphabet, i.e. alphabetical screen A, B, C, etc. So, there are more than 50 chapters, including coverage, preliminary pages, etc.

    I managed to do the cover and the preliminary pages PDFs after viewing the videos here: http://tv.adobe.com/watch/accessibility-adobe/preparing-indesign-files-for-accessibility/ and download and use this Action for recommended Acrobat: InDesign CS5_5 accessibility Touchup.sequ

    Several issues specific to this project do not seem to be addressed in the videos, however.

    • First of all, I would like to know if I can create an accessible PDF using the book feature > export book to PDF. Or should I make a PDF by chapter? The book has over 50 chapters (by alphabet, twice), so creating one by one, will take much longer, but I'll do it if it is the best practice.
    • After creating the PDF files, if I use (in Acrobat): create > combine PDF files to make a complete in PDF (over 600 pages BTW), will be the final PDF settings of accessibility? Do I need to rerun the accessibility to the combined PDF report?
    • I used the InTools.com power Headers plugin to add a page header that appears automatically the first new term used by page. Thus, a chapter (with the title of the chapter title H1) will have a different page header (which will be H2) per page, but the text circulates throughout the chapter. I don't see where to add page headers in the Article window in InDesign. Can I add in the following order: H1, H2, text (for the whole chapter), H2, H2, H2, etc. I need to work on the PDF file in Acrobat, where pages will be displayed, to obtain the correct H2 with the text on the page? Am I missing something?
    • I have problems with the bookmarks that requires a specific workflow?

    I think it is in this regard, although I could run more questions as I progress through the project.

    Thank you, Marilyn

    I understand why you need updated running headers in your book. For a reader seeing these serve as a guide for where you are and help you find things quickly.  In addition, if you export your data to XML or HTML from the tagged PDF document it would be also important to have these in the right place.

    But for accessibility purposes, should not be there because the screen reader reads everything in linear order, line by line.  No one is looking at the page.  A user to listen to the screen reader read the page will hear this position, just before the word itself. Then they hear the first word of the page two times.  It is not the end of the world if it is there, but these positions are not required for accessibility, unless they are not repetitive and contain information that is not otherwise available.

    So I would say, very well if you need it or want it, it's just a Word.

    I think you should try to export your book in PDF format (or even just one chapter of the book) and look at the Panel tags in Acrobat to see if you get the desired result.  I can't tell you exactly what you need to do to get these results, you use a plug-in, I did not.

    I can tell you that I didn't have to add headers to any article at all, they just automatically export if the other items in the file are added and that you do not select the style of header option 'not for export in XML format.

    You may not experience the same results with your plugin, but I think this would work probably the same way.

    Give it a try and good luck.

  • Create a schema of the user with the same name and tables within this scheme

    I am a newbie with Oracle.
    I installed my first Oracle 10 g database in my life.
    I need to create a user and a new schema with the same name.
    Subsequently, I need to create tables in this schema using the * isqlPlus.
    I got to create the user via the Oracle Enterprise Manager Console.
    I tried to create a schema through the same tool, but I have not found a possibility to do using GUI.
    Is it possible to do so through Oracle Enterprise Manager Console?
    What are the permissions the user must have access isqlPlus to create the tables in the schema?

    Thank you!!!

    Felipe

    A schema is just a collection of objects belonged to a particular user. If you do not need to create a separate schema: the schema is created automatically when you create the user.

    To connect to the database, a user must CREATE SESSION privilege. To create a table, the user has the CREATE TABLE privilege and should be given a quota on any tablespace will be created in the table. If you don't care management quota or limit the storage space that a user can create tables, you can grant the user the UNLIMITED TABLESPACE privilege. If you care the management of quota, you must run commands like

    ALTER USER <>
      QUOTA <>
      ON <>
    

    for each tablespace for the user to be able to use.

    Justin

  • Create triggers in the table, sequence, insert and update with "model"?

    It must be of rtfm, trial and error thing but you wanted to ask, is it possible to have models or similar automation for the following scenario:

    1.), I add the table to the logic model

    2.) Using glossary I transform a relational model that was recovered / synchronized with the data dictionary

    3.) then I have the new table to add

    -but

    I would then have auto-DDL of to be synchronized to database:

    -create sequence for the id column

    -create table

    -create indexes for the id column pk

    -Create triggers for insert and update

    -l' idea is to have db_created_dt and db_modified_dt defined in the table, so that each table has them to the fields of record etc.

    -activate the triggers

    Each of them following the same naming convention.

    Similarity with approx. generator Apex workshop utils sql create table of the copy paste "excel" that creates 'id' - column + sequence and insert the trigger.

    rgrds Paavo

    Hi Paavo,

    most of the steps can be made in one or other way

    -create sequence for the id column

    -create table

    -create indexes for the id column pk

    If you want to start in the logic model and you don't want to have the ID column in the logic model and select 'Create the surrogate key' checkbox in the dialog entity - you will get an identity column in the relational model and the version of database and settings in ' preferences > Data Modeler > model > physics > Oracle "you can set the sequence generation and the trigger for taking in load.

    fields of record defined in the table, so that each table has them

    You can add the same set of columns in all tables with the transformation script 'model of Table... ».

    You can also look here Oracle SQL Developer Data Modeler 4.1 user - defined DDL generation using transformation scripts

    to see how to grant your DDL generation using the transformation script. DM comes with example to generate separate tables of logging and triggers. You can create your build script of triggers that support logging in these common columns.

    Philippe

  • How to move a table to the other schema

    Salvation;

    Imagine that I have a scheme A and I create table in this scheme as a test. Now, I have a different schema, the name is B. I want to spend my A.test table to B.test2

    How can I do?

    Thank you

    If you create a new table in diagram B, the new table must be stored in tablespace default B. Unless you want the new table to be stored in a default tablespace, you need not specify a tablespace during the creation of the new table.

Maybe you are looking for