Access to several tables to the user

Hi forum members,

Am an Oracle, PL/SQl newbie. A request came from the customer. There is a database with two other user/schema - ABC and XYZ.

Each scheme has its own set of tables.

Now, our customer wants to access (select access only) all tables from a diagram of the ABC XYZ scheme. Now, there are a more than 200 tables in the schema XYZ, where his bulky to run as the same grant the select query again and again. Could someone help me with a query that would do the work at once?

NB:client connects the two schemas, using only the users of ABC and XYZ.

Oracle-11 g

Thank you very much

Published by: user1128836 on May 18, 2012 02:31

Hello

run these instructions with the user that you want to access:

set linesize 2000 pagesize 999999999 echo off feed off hea off
select 'GRANT SELECT ON XYZ.'||table_name||' TO ABC;' from user_tables where table_name not like 'SYS_NT%'

You can then copy and run the output.

Tags: Database

Similar Questions

  • Expdp unable the aud$ table as the user sys

    Hello
    Oracle 11 g 2
    OS: Solaris

    Expdp unable the aud$ table as the user sys

    Audit tables is size: 5 GB to check tablespace

    Error details:

    Current estimation using BLOCKS method...
    Total estimation using BLOCKS method: 0 KB
    ORA-39166: Object SYS. AUD$ has not been found.
    ORA-31655: no data or metadata of objects selected for employment

    Export is suspended for 4 hours and shows 0kb of dumpfile to the os levl.

    kindly, one please help on this issue.

    Thank you
    visu.

    try to export the table SYS. AUD$ using the traditional export...

    $exp system / file yourdmpfile.dmp log = yourlogfile.log = tables = sys.aud$

    Please see below notes for more information.
    DBMS_AUDIT_MGMT to manage and purge Audit information [ID 731908.1]

  • GRANT SELECT on a table to the user / role changes for the tab last_DDL

    Hello

    Is grant select (or any private object) to the user/role a DDL statement?

    GRANT SELECT on a table to the user / role changes the last_DDL to the table.
    1 > is this expected behavior?
    2 > no way in which we can grant select on a table by another user, without changing the DDL? (for example create view).


    The test is performed:

    Prior to the issuance:


    OBJECT_NAME CREATED TIMESTAMP LAST_DDL_TIME OWNER
    ------- ---------------------- ---------- ------------- --------------------
    AR HZ_CUSTOMER_PROFILES 8 MAY 00 13 MARCH 13 2003-06 - 26:12:41:29



    Grant statement:
    GRANT SELECT ON "AR". "' HZ_CUSTOMER_PROFILES ' TO 'AR_VIEW ';

    Note: AR_VIEW is a role, I tried granting also directly to the user.


    After the grant:

    OBJECT_NAME CREATED TIMESTAMP LAST_DDL_TIME OWNER
    ------- ---------------------- ---------- ------------- --------------------
    AR HZ_CUSTOMER_PROFILES 8 MAY 00 21 MARCH 13 2003-06 - 26:12:41:29



    Old thread, discuss whether Grant is DDL or not, but no documented conclusions.
    ( Re: Grant, revoke is DDL and DCL? )

    Please help in the assessment above.

    -Best regards,.
    Mani

    It's the DOF.

    After all, this isn't DML, it implicitly committed and you cannot use it directly in PL/SQL: features of DDL. :-)

  • Objects of scheme of access without having to specify the user.

    I just created a role in a scheme and assigned to certain privileges. Then, I created a user and granted the role to him. But as the newly created user is not the owner of the schema when I say a query select simle like this:

    SELECT EMLOYEENAME FROM EMPLOYEES

    I get the error "table or view does not exist. Is there a way I can wirte to refer to objects in this schema without having to identify the owner. For example, instead of writing to SCOTUS. I want to write just the EMPLOYEES EMPLOYEES.

    >
    So, I create SYNONYMS for all objects in the right of the schema? And also, I have to use these synonyms in all procedures, functions and views rather than their real names?
    >
    Yes, if the procedures are not owned by the user who owns objects.
    A procedure created by SCOTT didn't need to use the synonym to access the objects belonging to SCOTT.

    Then, if you issue

    GRANT EXECUTE ON scottProcedure1 TO DAVID
    

    Then the user DAVID can perform the Procedure1 scott without the need to have privileges on scott objects used by the procedure.

       EXEC SCOTT.PROCEDURE1;
    

    DAVID must use the schema to perform the procedure, unless you create a synonym for the procedure.

  • How to insert multiple rows in a table by the user (pl/sql)

    Hello
    I was trying to insert several rows in a table by a user by some pl/sql, but not every time entry. :/
    What is happening is that the program requires each time ask the user for the new value but the loop
    1 values inserts actually four times (the loop is run four times). can any point on what I am
    doing wrong or solutions will be fun ;)

    what I wrote here

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

    Set serveroutput on
    set verify off

    declare

    EmpNo number;
    EmpName varchar2 (20);

    Start

    because loop me in 1.4
    EmpNo: = & empno;
    EmpName: = '& empname';

    insert into values(empno,empname) of the employee;

    end loop;

    end;

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

    do not laugh at my code, I'm new to this oracle :D

    Thank you, prospects for the future for a response

    user13371438 wrote:
    Thanks for the info, looks like a nice tool will ;) try
    but I really want (my problem) in pl/sql

    Take a quick re-read my post above.

    PL/SQL is a process running on the database server. This process cannot interact with the client computer. He can't ask for user input, and it cannot display the output to the client. Client interface tools can only do. You are eager to get feedback from a user, if you need an interface tool to do. SQL * Plus can interface and application of entry, but only as variable substition, and it does not really provide a programming construct that allows you to run a program in a loop to do. Do this using SQL * Plus you must pair it with shell/dos scripting languages, but more ideally you should use an interface appropriate as Apex.

    I was wondering if it all works in pl/sql to release cached data (as fflush (stdin) in c ++)

    PL/SQL does not a customer entry, so there is no sense to have something to release the cached data. You pass the values of PL/SQL code using procedures or functions with parameters.

  • Relational table between the user and UD_ADUSER profile

    Hello

    I have a requirement where in I need to write a query to find out the difference between user profile for a particular user data and the form data from the same user AD process in Oracle Identity Manager 11g R2 (11.1.2.0)

    While the details of the user are stored in usr table, the table of process for AD shape is UD_ADUSER table. By comparing the two tables, I find the common attribute to be orc_key in UD_ADUSER and ORC table contains the usr_key and table orc_key / usr the usr_key.

    Is ORC table the proper relational table between usr and UD_ADUSER tables to link users between these two tables usr and UD_ADUSER?

    Please correct me if I'm wrong.

    -Thank you,

    def.

    You can use these two tables. I always spend Ouedraogo table between them because the OST has the status of a resource. You can query between them.

    -Kevin

  • SQLDR can access datafile that placed on the user by simultaneous use thing

    I use the data file for SQL LOADER, Path = /oradata/d01/oracle/PROD/apps/apps_st/appl/pay/12.0.0/bin (my_data_file.txt) Server
    every time that the user created file I have manually placed on EBS server on above path,.

    IIS, it is possible that the user can chose file by EBS concurrent program (this user placed on or clint PC) as c:\my_data_file.txt.


    requirment
    : = data file user simultaneous copy and pest on the spacific by screen server location, and then it will download by SQL LOADER


    OR

    : = database user entitlement that puts on his machine and direct sql loader loads this file, do not need to place the data file on server

    Published by: Abdul wahab on January 26, 2013 02:06

    Abdul Wahab says:
    I use the data file for SQL LOADER, Path = /oradata/d01/oracle/PROD/apps/apps_st/appl/pay/12.0.0/bin (my_data_file.txt) Server
    every time that the user created file I have manually placed on EBS server on above path,.

    IIS, it is possible that the user can chose file by EBS concurrent program (this user placed on or clint PC) as c:\my_data_file.txt.

    N °

    We have similar programs and we download files on the application server. These directories are shared on a file server and accessed by specific end users who have permission to read/write of their client machines.

    Thank you
    Hussein

  • No Internet access after you have copied the user files on.

    I created a new user account and copied all the files including documents and settings from an old user account.  Before I did I unhid all hidden files and system files.  What I was expecting, it was the new user account should behave exactly like the old user account without problem outside the difference between user account names.

    However, after doing this I couldn't Internet new user even account I could ping all web Internet sites I've tried.  Finally, I have to create another user account and copy only the document and manually I have to redo all the personal settings.

    If the problems were gone.  However, I would like to know if it is a problem to copy personal settings.  What is the most efficient and effective way to transfer the account from one to the other?

    Hello

    Did you remove the following files on the new account?

    • Ntuser.dat
    • Ntuser.dat.log
    • Ntuser.ini

    http://support.Microsoft.com/kb/811151/en-GB

    The link above shows how to copy a profile, however as far as the most effective way of copying, it depends on what you want, that is to say some parameters can be set for all users of the computer local strategies etc. If you want documents available to all users, use an all the "users share" with the permissions to prevent some accounts, editing files. This may or may not be what you want to achieve.

    Please confirm what data/files/personal etc settings you want to duplicate to the new user accounts, and state what - this time when creating or on an ongoing basis.

    Finally you use XP Home or Professional?

  • expdp + query option to export from several tables with the same condition

    Hello

    We want to export a subset of data only from databases to another. Both on AIX.

    Source/testdatabase 11.2.0.3 (non partitioned tables)
    Target productiion 11.2.0.3 database (separate tables)

    Tables of same names of columns but diffrenet structures a partitioning index and traget so only want to import content

    Each source datbaase hascolumn seq number table and want only to extract the last months of data.


    TABLES:table1,table2...
    DUMPFILE=dump_dir
    CONTENT=data_only
    QUERY= table1:"WHERE seq_num >100 "
    want to use expdp but not sure how to make sure that all tables have the seq_num WHERE > 100 condition, if let table1: go out and have just
    QUERY = "WHERE seq_num > 100"this condition would apply to all tables that we want."


    I'm assuming that can also use impdp CONTENT = data_only?

    Any ideas/thoughts?

    Thank you

    QUERY = "WHERE seq_num > 100"this condition would apply to all tables that we want."

    Yes, it will work for all tables, but ensure that all exported table must include this column.

    QUERY
    Default: no
    Goal
    Allows you to filter the data that is exported by specifying a clause of a SQL SELECT statement, which is applied to all tables in the work of export or a specific table.

    The query_clause is usually a WHERE clause for the selection of refined lines, but could be any SQL clause. For example, an ORDER BY clause can be used to accelerate a migration from a table in a heap in a table held in index. * If a [schema]. table_name is not provided, the query is applied to (and must be valid for) all tables in the export job.*

    http://docs.Oracle.com/CD/B19306_01/server.102/b14215/dp_export.htm

  • deployment of a BPM Application large Oracle with several projects of the user interface

    Hello world
    I'm working on a large application with Oracle BPM 11.1.1.5.0.

    I use JDeveoper 11.1.1.5.0 to build the application.
    The application has many tasks user with a lot of the UI (one for each task of the user).

    My problem is, whenever I make a small change in the project, I need to deploy this, which includes a master project and five or six projects UI (for now) for tasks of the user.
    As demand grows, I'm sure that this will certainly become a problem.

    So my question is if I do this the good sense? or should there be a more effective way?

    Thanks in advance

    Published by: luke on April 17, 2012 12:16 AM

    Hi Luke
    1. as a general rule, there is NO need to have a user interface project for an individual task. As initiator, approver, reviewer, LegalApprover etc etc, you have like 10 tasks (.task files). You can have just a single project of TaskForms UI and have taskDetails.jspx generated for each of these tasks. This is appropriately.

    2. any Application workflow must have only 2 deployers. Deploy resources are for real Workflow stuff that will have the main BPEL or process, BPM, human tasks etc. Basically, everything that goes into the workflow project. And another official of the deployment is that the REST of things means that the UI TaskForms project and other project support as useful projects, WebServices, EJB projects (if you have Web services). All this will be deployed as a SINGLE EAR.

    Lets take an example JDeveloper IDE point of view.
    1. application Name: SalesOrderApp
    2 workflow project name: SalesProcess (he is a a project jdeveloper project SOA or BPM Project type and has all human tasks, bpels, process bpm, rules etc.).
    3 interface user Project: SalesTaskForms (it is a form generated automatically for the first task you choose. Then for the rest of the tasks you can use this same project, to generate jspx for all others. WORK files. VIEW documents online on how to do it. I'll see if I can compile this list of URLS for you).
    3. support the EJB projects: MyEJBProject1 (some EJB project that connects to some specific to your back-end database project)
    4. support another Service EJB project: MyExtServiceProject1 (as another project EJB that uses data from an external source)
    5. some WebService project: SalesCreditCardValidationWebService (some WebService project to be deployed as. WAR file that performs a service).

    Try to apply the Concepts of SOA for each Service your application needs. Instead of putting all the EJBs and everying in one giant project, try to split their need logically commercial/sage and geenrate separate projects so that they can maintain as it is to other projects and other applications.

    Anyway, coming back, in the example above, you should have deployment just 2: 1 is the JAR file of SCA in the Workflow and another complete of the EAR file.
    (a) for the workflow project, right-click and generate a deployment profile to deploy all the workflow and NOT on the other projects of the user interface.
    (b) for each project individual genereate a profile of deployment such as MyEJBProj1, MyEJBProj2, MyWebService1, etc etc.
    (c) for TaskForms project, generate a deployment as SalesTaskForms profile. It is a WAR file.
    (d) at the level of the Application, create a new profile of deployment of the EAR type and now assemble all the projects in this EAR, with the exception of the Workflow project.

    First of all, you deploy file JAR of SCA of the Workflow. You need to redeploy this again only when you make changes to the workflow, humantasks etc etc.
    Deploy the full blown EAR file that has all the stuff (EJB JARs, TaskForm WARs, WebService wars etc.).

    At any time, you change your code taskforms or redeploy a java, ejb, EAR file.

    You should have a POT and an EAR to deploy at the end of the day. Infact this is how it should go into UAT, and production. They may not have many pots, multiple wars deployed. The reason why we have separated Workflow SCA Jar file is, because the workflow will not change frequently. And also older versions of SOA/BPM (before 11.5 FP) have a huge disadvantage. Whenever we deploy a workflow project, it will make existing processes VITIATED, unless you deploy a different version. This isn't a problem anymore for 11.5 + FP (Feature Pack applied). Therefore, be careful when you redeploy workflow project.

    Thank you
    Ravi Jegga

  • granting of privileges to the schema for several tables at the same time... any script?

    Hello gurus,

    I have about 25 tables in the ABC scheme

    I want to give all privialges to the XYZ schema for all tables of 25 which is in the pattern ABC... So is there is SQL statement or a script, I can run to grant privileges to all tables.

    Something similar to these...

      SELECT 'create synonym ' || table_name || ' for ' || table_name
      FROM user_tables  {code}
     
    So i get all the table names ....then i can run as a script.... U r help is greatly appriciated gurus!!!
    
    
    Thank you!!!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

    Administrator:

    set head off
    set pages 0
    set feed off
    spool myscript.sql
    Select 'grant select, insert, update, delete on abc.'||table_name||' to xyz;'
      from dba_tables
     where owner = 'ABC';
    
    Select 'create synonym xyz.'||table_name||' for abc.'||table_name||';'
      from dba_tables
     where owner = 'ABC';
    
    spool off;
    

    Obviously this does not all new table that will be created in the future on ABC schema...

    Max
    [My Italian blog Oracle | http://oracleitalia.wordpress.com/2010/02/07/aggiornare-una-tabella-con-listruzione-merge/]

  • To get the last table by the user access time

    Hello

    We plan to remove unwanted objects in the database.

    Our goal is to monitor the tables, their frequency of access, users who have access to details of paintings.

    We can enable the AUDIT TRAIL Paramaeter. But this is not recommended because it will affect the performance of the database in a real environment.

    We can question session$ v. But it will ensure that the current data. It will not provide data when a session is closed.

    How can we get access to the frequency of the tables, their time of last access etc.

    Please could you suggest on this?

    user11343182 wrote:
    We can enable the AUDIT TRAIL Paramaeter. But this is not recommended because it will affect the performance of the database in a real environment.

    This will certainly have an impact, but it might be very light, there are also beautiful grain audit, but basically, it's the same thing, must audit objects.
    And about the degradation in performance, you must choose to live with your objects 'dead' or temporarily reduce the performance. It is perhaps interesting for all active objects is.

    Nicolas.

  • Unity connection 8.5 Accessing and purge messages from the user as administrator

    Is it possible that an admin I can purge a registered users of voice messages in Unity Connection 8.5 without deleting their account in full and recreate?

    Is it also possible using an admin account, I can access a users mailbox and export messages to individual files (.wav, etc.) for purposes of storage/reading/evidence?

    Jim

    Hi Jim,.

    Just as an info... .the unity tools are not 3rd party, but rather built and

    support of the Cisco BU's messaging products. My

    Guess is that most, if not all are designed/built by Mr. Lindborg itself

    and that's probably why they are so important to use. I used this tool a lot

    both ends different many without problem

    I can't imagine the unit running connection without using this large suite

    Tools.

    http://www.ciscounitytools.com/sitelist/AllDownloads/AllDownloads.html

    In regard to the messages, you can use Web Inbox and

    registration as a Save option to save messages in the form of .wav files.

    See you soon!

    Rob

    "Celebration is around us, every nations, all around us.
    "Singin' ' forever young, sing songs in the Sun '-K'naan

  • ADF Mobile access protected web service with the user name and password

    With Jdev 11.1.2.4 (with the extension of the ADF Mobile) I am creating a data control that uses a SOAP web service. The web service is not protected by a policy of wss, but its point of endpoint URL is only protected by simple HTTP authentication (internal weblogic server is not accessible public.) We use an Apache server that is configured with a location that is a simple proxypass on url of the web service endpoint weblogic. This apache location apply simple HTTP authorization). I can invoke successfully the methods with parser HTTP by simply adding to the request HTTP header "authorization: xxxxxxxxxxxxxxxxxx base =" (where xxx = user name and encrypted password).

    In the mobile application of ADF, I used the DataControls.dcx-> window to connect to the Web Service change and provided the username and password to the URL of the endpoint. The problem is that after the deployment and execution of this application on the emulator (or the device itself), I get no data by the web service since with the HTTP 401 error http server responses. It seems that that the credentials are not deployed to the device, so while the application is running can not find them.

    I searched a lot and found a similar article (quite old) in the RTO by Frank Nimphius here access_protected_web_services_from_adf.htm

    Is there a way to do this, or if I'm missing the entire image?

    Thank you very much.

    Christos

    Check out blog Shay https://blogs.oracle.com/shay/entry/accessing_secure_web_services_from

    or Andrejus http://andrejusb.blogspot.de/2012/11/adf-mobile-secured-web-service-access.html

    Timo

  • To Access SOUL for iProcurement, what the user needs to be put in place as a buyer?

    Hello

    We are on Oracle R12.1.3.

    We are setting in motion the approval (TEA) of iProcurement and purchase management engine.

    We're about to entrust the responsibilities of the SOUL "Approvals Management Administrator" and "Approvals Management Business Analyst" a user USER123

    Must USER123 be set up as a buyer to create rules of the SOUL?

    Kind regards

    Natalia

    Rules of SOUL for iProcurement are defined for the applicant. Then to test the rule of the SOUL itself, you don't have to be a buyer.

    In addition, the responsibility of configuration may be granted to any employee (of THE Department) who may not be a buyer in the role.

    So the answer is "not necessary".

Maybe you are looking for

  • New IPads come with an integrated SIM card

    I recently bought a new iPad Pro in an Apple Store.  I didn't put them up, but now I'm wondering if there's a SIM inside.  I want to activate cell phone but don't want to start paying for the service, unless it will be able to be used immediately.

  • How can I get the graphics in the games on screen and Intel graphics card?

    Hello: I recently got a Compaq Presario CQ57-339wm laptop PC. It has Win 7 HP 64 bit installed. I've updated the memory up to 8 GB. Intel Celeron 1.5 gb CPU B800 Intel HD graphics card. And there the new Chipset HM65. My question is this. While I kno

  • Want 5530: several images, e.g., passport photos

    How can I print multiple images of an image, such as passport photos, on a sheet of paper?

  • HP LJ CM1410 Scan: Scan not

    I moved from Dell with Windows 7 for a HP Envy laptop using Windows 10.  I was able to scan from the printer Dell with Windows 7, but when I moved to the HP with Windows 10 I can scan is no longer.  I get the message "scanner communication cannot be

  • HP psc 1315 all-in-one will not scan

    My all-in-one HP 1315 machine is more scanning documents. It copies and prints without any problem, but I can't scan. After I have put a document on the glass and press the "Scan" button, the "On" flashes several times and then the machine makes a sh