Different schema on same database

i have 2 schemas in the same database, i create a table in one schema and can access the same table from the other schema without grant option. For eg, i create one table 'emp' in one schema 'schema1' like:
create table emp(no number);
Now, from the other schema, schema2, i can access this table data using the following select statement :
select * from schema1.emp;
without first giving the grant on the table from 'schema1' like this:
grant select on emp to schema2.
Please help in solving my doubt as i need it resolved urgently.

Have you (perhaps mistakenly) granted a user the SELECT ANY TABLE privilege?
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC

Similar Messages

  • JDBC Lookup - Import table data from a different schema in same DB

    Hi XI Experts,
    We are facing an issue while importing a Database table into the external definition in PI 7.1.
    The details are as below:
    I have configured user 'A' in PI communication channel to access the database. But the table that I want to access is present in schema "B". Due to this, I am unable to view the table that I have to import in the list available.
    In other words, I am trying to access a table present in a different schema in the same database. Please note that my user has been given all the required permissions to access different schema. Even then, I am unable to access the table in different schema.
    Kindly provide your valuable suggestions as to how I can import table which is present in another schema but in the same Database.
    Regards,
    Subbu

    If you are using PI 7.1, then you can do JDBC Lookup to import JDBC meta data (table structures from DB). Configure a jdbc receiver communication channel where you specify username and password which has permission to access schema A and Schema B of database. Specify database name in the connection string. Then you might have access to import both schema.
    Please refer these links
    SAP PI 7.1 Mapping Enhancements Series: Graphical Support for JDBC and RFC Lookups
    How to use JDBC Lookup in PI 7.1 ?

  • Sinlge select query in different schemas for same table(Indentical Structu)

    Scenario :
    Table XYZ is created in Schema A
    After an year, the old data from the previous year would be moved to different schema. However in the other schema the same table name would be used.
    For eg
    Schema A contains table XYZ with data of 2012 yr
    Schema B contains table XYZ with data of 2011 yr
    Table XYZ in both the schemas have identical structure.
    So can we fire a single select query to read the data from both the tables in effective way.
    Eg select * from XYZ where date range between 15-Oct-2011 to 15-Mar-2012.
    However the data resides in 2 different schema altogether.

    Thanks for the reply
    Creating an view is an option.
    But my problem, there is ORM layer(either Hibernate or Eclipse Top Link) between the application and the database.
    So the queries would be formed by the ORM layer and are not hand generated.
    So i cannot use view.
    So is there any option that would allow me to use single query on different schema's ?

  • Commit handling with Different sessions on same Database

    Hi,
    We have a requirement, where-in we have two modules working on the same database but different schemas.
    In this case, also the oracle session for both the module is also different.
    We want to ensure a two phase commit logic in this scenario, wherein the integrity of the data commit is maintained across sessions.
    How can I achieve the same, Because I have heard two phase commit works of Distributed database using DTC(Distributed transaction co-ordinator.
    Regards,
    Uravesh

    urvesh wrote:
    Hi,
    We have a requirement, where-in we have two modules working on the same database but different schemas.
    In this case, also the oracle session for both the module is also different.
    We want to ensure a two phase commit logic in this scenario, wherein the integrity of the data commit is maintained across sessions.
    How can I achieve the same, Because I have heard two phase commit works of Distributed database using DTC(Distributed transaction co-ordinator.
    Why do you think that the integrity of the data would not be preserved with the commit functionality ? What do you think two phase-commit does?
    Aman....

  • Cloning Schema within same database in DG environment

    Hi guys,
    I have a Production database with Data Guard configured (2 physical standbys, one same DC, 2nd other DC). I need to clone a schema (size approx. 380GB) within the same database, ofcourse creating cloned schema with a new name.
    Example:
    ======
    Primary DB: wflprd
    Standby 1: wflprddr1
    Standby 2: wflprddr2
    Source Schema: PegaRules - Size 380 GB
    Desitnation Schema: NewSchema within same database
    what are possible options available? expdp/impdp?
    regards,
    Anjum

    I believe my question is not understood correctly or may be I put the question incorrectly.
    I understand expdp/impdp or exp/imp works but is this the only solution in case of large schema sizes and data guard in place.
    log_archive_dest_1 = LOCATION=/u03/orarch/wflprd, valid_for=(ONLINE_LOGFILE,ALL_ROLES)
    log_archive_dest_2 string service="(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=baswflprddatz02)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=wflprddr1_XPT)(INSTANCE_NAME=wflprddr1)(SERVER=dedicated)))", ARCH SYNC NO AFFIRM delay=0 OPTIONAL max_failure=0 max_connections=1 reopen=300 db_unique_name="wflprddr1" register net_timeout=180 valid_for=(online_logfile,primary_role)
    log_archive_dest_3 string service="(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=actwfldredatz01)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=wflprddr2_XPT)(INSTANCE_NAME=wflprddr2)(SERVER=dedicated)))", ARCH SYNC NO AFFIRM delay=1440 OPTIONAL max_failure=0 max_connections=1 reopen=300 db_unique_name="wflprddr2" register net_timeout=180 valid_for=(online_logfile,primary_role)
    Objective: We have one big schema containing data of three different customers. We are segregating that big schema into different schemas, one for each customer. So, once schema is cloned within same database, irrelavent data is cleaned.
    regards,
    Anjum

  • Create trigger on view belong to different schema of same db

    Hi Guru's,
    I have two different schema in the same DB.
    Example : schema1 and schema2
    I have one view on schema1 and i have grant select to schema2 and create synonym for that view.
    Now i need to create trigger on synonym which created from view in schema1 and insert the data into different table from trigger when insert happen on view.
    first of all , is it possible?
    if its possible then do i need to give create any trigger on view to schema2.
    Or is there any other we can get this done..
    Many thanks.

    Hi,
    user590978 wrote:
    Hi Guru's,
    I have two different schema in the same DB.
    Example : schema1 and schema2
    I have one view on schema1 and i have grant select to schema2 and create synonym for that view.
    Now i need to create trigger on synonym I'm not sure I understand you.
    Triggers operate on tables and views (but I'll just say "table" from now on). It doesn't matter if the statement that caused the trigger to fire used the actual table name or a synonym.
    which created from view in schema1 and insert the data into different table from trigger when insert happen on view.
    first of all , is it possible?I'm not sure I understand you here, either.
    It is possible to have a trigger on a view in schema1, which INSERTs data into a table. That table can be in any schema, just so long as the trigger owner has privilges on INSERT into it.
    if its possible then do i need to give create any trigger on view to schema2.It's very dangerous, and usually a terrible idea, to grant the CREATE ANY privileges to users.
    Schema2 needs the CREATE ANY TRIGGER system privilege only to create a trigger in another schema, such as schema1. There's probably no reason to do that. Let schmea1 create the objects in its own schema.
    Post a test script that shows what you want to do. Include CREATE TABLE, CREATE VIEW, CREATE TRIGGER, CONNECT and INSERT statements, and the results you want (the contents of tables where the trigger INSERTed data). If you don't know how to code something, post the closest thing you can, and explain what you really want to do in that place.

  • Conn generating link ddl but schema in same database

    i have a connector which associates 2 locations in the same database. when i deploy the connector, it generates link ddl. when i deploy my mapping it uses that link. i can't get the mapping to generate schema.table_name.
    any help would be appreciated.
    i've searched the forum and gone through the docs. i don't know what i'm doing wrong.

    Chandra,
    Such document is always one and the same with all Oracle products - a User Guide that ships with a product and is available online http://www.oracle.com/technology/documentation/warehouse.html The User Guide is searchable and indexed. Look up "register locations" and you'll find "Registering Locations" section in Chapter 13 (of OWB 10g User Guide) with step-by-step instructions.
    Nikolai Rochnik

  • Oracle troubles with multiple schemas in same database

    We have several different users set up with individual schemas in the
    same Oracle database. We run into trouble when more than one user tries
    to use Kodo in their local schema. Things go fine for User A, but when
    the User B tries to run the schematool on their own Oracle schema, they
    get this nonsense:
    javax.jdo.JDOFatalDataStoreException: An error occurred while connecting
    to the data store.
    NestedThrowables:
    com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper: [SQL=SELECT
    DISTINCT JDO_SCHEMA_METADATAX.CLASSNAMEX FROM JDO_SCHEMA_METADATAX]
    ORA-00942: table or view does not exist
    at
    com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.<init>(SchemaTool.java:99)
    at
    com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.main(SchemaTool.java:1114)
    at
    com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.main(SchemaTool.java:1083)
    at
    com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.main(SchemaTool.java:1073)
    at
    com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.main(SchemaTool.java:1064)
    If the User A drops all the tables from their schema, then things go
    fine for User B ... but then User A will have the same problem when they
    try to run the schematool.
    It is our suspicion that Kodo is actually selecting the metadata all of
    the tables in **everybody's** schemas, and thus erroneously thinking
    that jdo_schema_medatax already exists. It really ought to restrict
    itself to the schema it's actually connected to.
    If our theory is correct, it would explain why Kodo is so incredibly,
    horribly, painfully slow to connect to our Oracle database -- we have
    dozens of schemas in there, many of which have hundreds of tables.
    Is 2.3.0 addressing this problem?
    Paul

    Paul,
    Are you using the 'schema-name' system preference setting for each user?
    Oracle's mechanism for selecting database metadata requires that the
    appropriate schema name be explicitly when more than one schemas are used.
    See the database setup section of our documentation for more information.
    -Patrick
    On 7/3/02 3:50 PM, "Paul Cantrell" <[email protected]> wrote:
    We have several different users set up with individual schemas in the
    same Oracle database. We run into trouble when more than one user tries
    to use Kodo in their local schema. Things go fine for User A, but when
    the User B tries to run the schematool on their own Oracle schema, they
    get this nonsense:
    javax.jdo.JDOFatalDataStoreException: An error occurred while connecting
    to the data store.
    NestedThrowables:
    com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper: [SQL=SELECT
    DISTINCT JDO_SCHEMA_METADATAX.CLASSNAMEX FROM JDO_SCHEMA_METADATAX]
    ORA-00942: table or view does not exist
    at
    com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.<init>(SchemaTool.java:99)
    at
    com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.main(SchemaTool.java:1114)
    at
    com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.main(SchemaTool.java:1083)
    at
    com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.main(SchemaTool.java:1073)
    at
    com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.main(SchemaTool.java:1064)
    If the User A drops all the tables from their schema, then things go
    fine for User B ... but then User A will have the same problem when they
    try to run the schematool.
    It is our suspicion that Kodo is actually selecting the metadata all of
    the tables in **everybody's** schemas, and thus erroneously thinking
    that jdo_schema_medatax already exists. It really ought to restrict
    itself to the schema it's actually connected to.
    If our theory is correct, it would explain why Kodo is so incredibly,
    horribly, painfully slow to connect to our Oracle database -- we have
    dozens of schemas in there, many of which have hundreds of tables.
    Is 2.3.0 addressing this problem?
    Paul
    Patrick Linskey [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Data comparison and update/insert between two schemas in same database

    Hi all,
    I have requirement like this. In one database, i am having two users, user1 and user2. Both users is having same tables and structure wise also same. In user1, data will be populated by job.
    Now, what i want to do is, i have to find out difference between user1 and user2 data and the Difference data will be updated/inserted into the user2.
    Any ideas please...
    Thanks in advance,
    Pal

    Will trigger help you ... ie. for every update/insert on user1 will do on user2-- it is heavy to do for all table...
    --svmg                                                                                                                                                                                                                                                                   

  • Reference a function in a different schema over a database link?

    I have a database link, DBL, that connects with user GENE/***. I want to select columns from table BOOKS in schema JOE using function UNIFIX, which is defined in schema BRAD. Can I do it?
    I can select without the function:
    SELECT TITLE
    FROM JOE.BOOKS@DBL;
    I tried this syntax:
    SELECT BRAD.UNIFIX(TITLE)
    FROM JOE.BOOKS@DBL;
    But Oracle gives me a ORA-00904. Is there any syntax that will allow me to reference the function in the linked database? Or do I need to define a view in the remote DB that includes the function?

    SELECT brad.unfix@dbl( title )
      FROM joe.books@dblshould work. Assuming, of course, that the Gene user on the remote system has access both the the BOOKS table in the JOE schema and to the UNFIX function in the BRAD schema.
    Justin

  • How to create table in another schema of same database

    Hi..
    I've a database DB1
    and has 2 schemas / USers in that..
    Usr1 and Usr2...
    And i created a TEMP table in Usr1 schema... and created
    Then tried the following statement in Usr2 schema...
    CREATE TABLE TEMP AS SELECT * FROM Usr1.TEMP;
    Then it's giving error that ...
    :00942 TABLE OR VIEW DOESN'T EXIST..
    What is the reason for that...
    Thank you

    josh1612 wrote:
    What other grants do i need to give so as to replicate the Primary Keys also...????That's not a matter of grants. It's the way the CREATE TABLE AS SELECT statement works. It does not copy over indexes, primary key constraints, unique constraints, foreign key constraints, etc.
    If you want to copy all that over, you would probably want to get the DDL from the original table (using the DBMS_METADATA package if you're in a recent version), modify the DDL with the new schema name, create the table, indexes, and constraints, and then do an INSERT ... SELECT to populate the data. Or do an export & import of the table from one schema to another.
    Justin

  • Same index name for different tables in different schema

    Just a quick query
    Can two tables present in different schema of same database has same index name ?
    Will there be any problem?
    Thanks

    And just a quick answer:
    859486 wrote:
    Just a quick query
    Can two tables present in different schema of same database has same index name ?Yes.
    >
    Will there be any problem?No.
    >
    Thanks

  • Schema Copy/replicate in Same database....

    Hello - I have a requirement to copy a schema in same database - with different name. What will be my best options other than export/import.
    Schema name: PROD
    Schema Size: 120GB
    Tablespace: All data of PROD is in PROD_D tablespace only
    New Schema name will be: NPROD
    Thanks in advance

    hi,
    If you're worried about the dump size, you may generate it and get a 20Gb size file...
    follow instructions from link Compressed dump
    ... if your schema has only tables, you may use CTAS
    Regards
    Ignacio
    http://oracledisect.blogspot.com

  • Cloning a schema using transportable tablespace in same database?

    In 10g r2, is it possible to clone the schema in same database using transport tablespace?
    sample syntax
    impdp USERID=<TargetConnection> DIRECTORY=NHS_DIR Remap_Schema=TESTA:TESTB
    TRANSPORT_DATAFILES='<TargetDataFile>' DumpFile=<DumpFileName> logfile=<LogFileName>

    >
    In 10g r2, is it possible to clone the schema in same database using transport tablespace?
    sample syntax
    impdp USERID=<TargetConnection> DIRECTORY=NHS_DIR Remap_Schema=TESTA:TESTB
    TRANSPORT_DATAFILES='<TargetDataFile>' DumpFile=<DumpFileName> logfile=<LogFileName>
    >
    Well, why not simply test that yourself? You seem to know the command already. It is possible but with some effort:
    You have to rename the original tablespace before importing it back. Also, you have to create the user testb with the appropriate privileges. The datafile that you import has to be renamed also, because a file with that name already belongs to the database.
    Kind regards
    Uwe
    http://uhesse.wordpress.com

  • Accessing a Cube under different schema

    Guys,
    Is it possible for a user to access OLAP cube residing in a different schema under same oracle database and SID ? If yes, how it can be done (permissions etc.)
    Thanks,
    Mav

    Hi,
    Yes this is possible. The other user needs to have the olap_user role, and if you are going to use discoverer it also needs the d4opub role.
    In addition to that you also need to grant rights on the AW$ table to the user you want to give access to.
    The AW$ table is where actually the AW is stored and should be in the schema where you have created the AW. The name of it s AW$<AW_NAME> so in order for you to grant select on it to other users, all you need to do is the following:
    grant select on aw$<aw_name> to <user>
    Ragnar

Maybe you are looking for

  • How to load a class dynamically and then a call a method?

    Hi I want to call a method from a class,which class is loaded dynamically. Consider a classA and ClassB.. ClassB contains a method showvalue() which returns a String value. I want to load a ClassB dynamically in ClassA,and call the method showvalue()

  • Machine needs new OS; whither CS4?

    I've got CS4 faculty/student edition on a Dell laptop that's taken some pretty severe hits,  It still works if I don't close the cover (hinge damage), but there are also signs of malware here and there.  I'm retired faculty now (not emeritus) and can

  • Mail stopped coming in for reason that I can see.

    My test message did not go through to either thr iCloud or gmail inbox.  I did receive some routine mail in the gmail but it did not show in the all mail inbox page.  Any ideas?

  • C2-03 software/maps update for Pakistan

    Dear Nokia Team We are anixiously waiting for new software update for c2-03 as number of complain suggest that device has most buggy software, as I noticed software update is available for some countries but for Pakistani variant we are still waiting

  • Connection error  / as sysdba

    I cant connect from client as well as from the server. No error at the alert file . But my tnsnames log file show this error Please give suggessions to trace where the problem is TNS-12500: TNS:listener failed to start a dedicated server process TNS-