Database Access in Oracle 9i

Hi I am new in Oracle, I am tring to understand how Oracle gives permission for users to access databases. For example if I create store database, system creating also store user, how about if I create a single user, say user1, what should I do to access store database with using user1 user?
So far I could not access even though I set some privileges for user1.
Thanks

In order to make things, try creating a role
Then, grant select on all tables of a particular schema to this role
Grant this role to new schema being created
Then create public synonyms for these tables.
The new schema should then be able to access the tables owned by remote user.
For example,
user SCOTT wants to access all the tables owned by user SH
create role browse_schema_role;
[Now login in as SH or SYSTEM]
grant select on SH.customers to browse_schema_role;
grant select on SH.products to browse_schema_role;
grant select on SH.sales to browse_schema_role;
etc...
[Login as SYSTEM or a user that has DBA privileges]
grant browse_schema_role to SCOTT;
create public synonym customers for SH.customer;
create public synonym products for SH.products;
create public synonym sales for SH.sales;
[Now login as SCOTT]
Now you should be able to select any table owned by SH
e.g., select * from customers;
Hope this helps.
Shakti
http://www.impact-sol.com
Developers of Guggi Oracle - Tool for DBAs and Developers

Similar Messages

  • Database access from Oracle Java Cloud Service application

    I have registered for Oracle Java Cloud Service for trial period. I want to deploy a Spring MVC 3.2 and Hibernate 4.0 web application.
    I created a table in the Database Cloud. I am not sure how do I access the Database Cloud Service from my application.
    Need your guidance/pointers/references that can help me establish connection from my application to the database.
    Thanks,
    Ujjwal

    Hi,
    Use JPA - see the visitors example, it uses @PersistenceUnit injection with previously weaved .class entity files.
    You can use application managed EMF's and EntityManagers with code like the following - which is not preferable to using @PersistenceContext injection on an @Stateless session EJB but...
              EntityManagerFactory emf = Persistence.createEntityManagerFactory("JPAServletPU");
              EntityManager em = emf.createEntityManager();
              EntityTransaction transaction = null;
              try {
                   transaction = em.getTransaction();
                   transaction.begin();
                   Visitor entity = new Visitor();
                   entity.setName(name);
                   entity.setNum(num);
                   em.persist(entity);
                   transaction.commit();
                   System.out.println("Committing: " + entity);
              } catch (Exception e) {
                   e.printStackTrace();
              } finally {
                   em.close();
                   emf.close();
    Use a persistence.xml like the following
    <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
    <persistence-unit name="JPAServletPU" transaction-type="JTA">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
         <!--https://cloud.oracle.com/mycloud/f?p=5300:1000:259334829915901-->
    <jta-data-source>database</jta-data-source>
    <class>com.vision.cloud.jpa.Visitor</class>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties>
         <property name="eclipselink.target-database" value="Oracle10g" />
    <property name="eclipselink.ddl-generation" value="create-tables"/>
    <!-- property name="eclipselink.ddl-generation" value="drop-and-create-tables"/-->
    </properties>
    </persistence-unit>
    </persistence>
    Check out a tutorial on WebLogic JPA ORM usage here to get started as well.
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial

  • SQL - Database access using Oracle.connect(getCLass(), "connect.properties")..IM LOST

    Hi,
    I use Oracle.connect(getClass(),"connect.properties") before all of my #sql statements. If there are a bunch of methods with #sql statements, I use the connection method. I think this is my problem and Id like some feedback from other people.
    1) Should i be using an Oracle.connect statement before every #sql?
    2) If so, does it create new connections all the time or does it just know there is a current connection so it doesnt keep adding new connections?
    3) Is there a way to get one connection and then test to see if there is a connection so that i dont keep getting new connections?
    4) Do I have to close the connections? I tried Oracle.close(); but got some wierd errors. I read somewhere that If autocommit is true, you dont have to close jdbc connections.
    Thanks for your time and I appreciate any feedback that anyone has to offer.

    Hi Adam,
    Please find the answers inline.
    I use Oracle.connect(getClass(),"connect.properties") before all of my #sql statements. If there are a bunch of methods with #sql statements, I use the connection method. I think this is my problem and Id like some feedback from other people.
    1) Should i be using an Oracle.connect statement before every #sql?No, you don't have to call this each time, just call this once to intialize your DefaultContext and from then on, whenever
    #sql is used, it would fetch the connection from the DefaultContext.
    2) If so, does it create new connections all the time or does it just know there is a current connection so it doesnt keep adding new connections?No, it doesn't create connections each time.
    3) Is there a way to get one connection and then test to see if there is a connection so that i dont keep getting new connections?There would be only one connection
    4) Do I have to close the connections? I tried Oracle.close(); but got some wierd errors. I read somewhere that If autocommit is true, you dont have to close jdbc connections.The connection has to be closed explicitly using Oracle.close();
    For samples on using connect.properties refer to,
    http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/9i_sqlj/9i_sqlj.html#BatchingAndREFCursorSample
    Regards
    Elango.

  • DATA IMPORT from MS.ACCESS TO ORACLE DATABASE

    I have an MS ACCESS MDB file , I to import all the Tables and Data into ORACLE DATABASE through FORMS.Because this file is on Client side, and maintain on daily basis ,so it is very hard to import manually daily through traditional ODBC method,for that our one team member busy all day with that issue.
    Is it possible in our forms to import data from MS.ACCESS to ORACLE. I tried HOST command but it doesn't work.
    Data structure and Table Name are same both is MS Access and Oracle.
    We are Oracle 8i and Developer 6i

    Like i said in my previous post, the same steps that you used to do manually, you need to do it through forms, it's not that straight forward, you need to do lots of coding.
    connect form to MS Access db read the data, and insert them into oracle tables.
    Search the forum, there are solutions previously posted, and keep checking the online help .
    Tony

  • Can Forms Builder access non-Oracle Database?

    Does any one know whether Pracle Forms can access othe non-Oracle database via ODBC or JDBC to MS Access or MySQL?

    12282,
    In general, HTML DB gives you access to Oracle database facilities. These include heterogeneous services. Please search this forum for keyword "heterogeneous" and you can follow the threads that interest you.
    As for the comparison with brain surgery, I'd rank them about the same in terms of raw thrill.
    Scott

  • Export table access to oracle with Database ODBC()

    Hi,
    I export a table, access 2003, ent_tab whit  'DataBase ODBC()' to oracle.
    I open Oracle SQL Developer and i can show table ent_tab, but i go worksheet and execute:
    select * from ent_tab
    and display error: ORA-00942...
    Why??!!
    Regards
    Jomar

    Because ODBC created the table with "" which allowed lower case table name, but Oracle uses upper case table name by default. Suggest you recreate the table with upper-case name to avoid having to use "" in select statements.
    Edited by: rgeier on Oct 27, 2009 5:34 PM

  • Can you access non-Oracle database with HTML DB?

    Can you access non-Oracle database with HTML DB? If not, will this be possible in the future?
    I realize HTML DB is not an open-source product. However, it is necessary sometimes to get non-Oracle database info. JDeveloper supports this. It does not appear to me that HTML DB does. This is a major drawback to it being a product for more potential applications that rely on other database technology such as MySQL, etc.
    If it is possible, is this brain surgery to do it. HTML DB offers fast simplified development and it would be good if it was built in. Does anyone know of an example of accessing non-Oracle database that is available?

    12282,
    In general, HTML DB gives you access to Oracle database facilities. These include heterogeneous services. Please search this forum for keyword "heterogeneous" and you can follow the threads that interest you.
    As for the comparison with brain surgery, I'd rank them about the same in terms of raw thrill.
    Scott

  • Problem with Oracle 9i client to access multiple oracle databases

    I am having problem setting up oracle client 9i to access multiple oracle db. When I finish installing Oracle 8.x client, I simply replace the tnsnames.ora that the installation created with the ones that I have. I can access three different databases. I only need to add three diffrent entries in the tnsnames.ora file. I cannot be able to do this with Oracle 9i client. I follow the instruction from the CD installation to use local naming method. It appears that Oracle client try to create multiple entries on my tnsnames.ora file but I can only be able to access one db.
    Any help is appreciated.
    Thanks! HD

    the old tnsnames.ora is working with Oracle 8 client. The new tnsnames.ora (if I use the Oracle Net config) have two entries, one is dev and the other is prod.
    Thanks!

  • Accessing non-oracle databases from oracle

    Is there any way to access from oracle to non-oracle databases and copy the data using COPY command?

    Hi Nitin!
    You can access these legacy applications as so-called external applications. Check out the Application Server Single Sign On guide.
    cu
    Andreas

  • Oracle Discoverer Database access

    When I install Discoverer, it creates an Oracle database as part of the installation process. Is this the only database that this installation can access? Does this mean that all my reporting data should be migrated to this new database?
    What would I need to do in-order to get this instance of Discoverer extract reports from an Oracle Data Warehouse?
    Thanks in advance.

    A few clarifications are in order:
    Firstly, Discoverer does not install any Oracle database. The database that you see is the infrastructure database and Discoverer uses that to store Discoverer portlets and other connection information.
    Secondly, this database installation itself is an optional part. If you install Oracle Business Intelligence standalone then you do not need to have this database.
    Thirdly, Discoverer can access any Oracle or non-Oracle database (via the HDS option), not just the infrastructure database.
    Also, I would strongly urge you to take a look at the Discoverer documentation library, available online at http://download-uk.oracle.com/docs/cd/B14099_18/bi.htm.
    In particular, take a look at the Oracle Business Intelligence Concepts Guide (http://download-uk.oracle.com/docs/cd/B14099_18/bi.1012/b16378/toc.htm) and the Discoverer Configuration Guide (http://download-uk.oracle.com/docs/cd/B14099_18/bi.1012/b13918/toc.htm)
    Thanks
    Abhinav
    Oracle Business Intelligence Product Management
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    Documentation: http://docs.oracle.com/
    Discoverer: http://www.oracle.com/technology/products/discoverer/
    BI Software: http://www.oracle.com/technology/software/products/ias/devuse.html
    BI Samples: http://www.oracle.com/technology/products/bi/samples/
    BI Blog: http://oraclebi.blogspot.com/
    Blogs: http://blogs.oracle.com/

  • Direct Oracle Database Access restriction

    Hello All,
    How do I find out whether direct Oracle database access has been restricted to defined nodes?
    Thank you.

    You can try some of these:
    1. check if any non-SAP ids are created in the database, in oracle for example in dba_users
    2. check if any dummy default ids that come with database are unlocked and being used
    3. if you are setup to use external identification such as ops$sidadm in oracle (in places they are), check who can su or sudo to sidadm
    4. obviously anyone with password for system and sap ids can login using number of tools; you can investigate options to tighten using SQL*Net listener
    Hope this gives some preliminary pointers...

  • Which are the ip are accessing  the oracle user in oracle database

    Hi,
    How to check which are the ip are accessing the oracle user in oracle database

    Ivan Kartik wrote:
    There is error in first query it should be user machine instead of terminal in utl_inaddr.get_host_address(terminal) IP_ADDRESS.
    Anyway both queries might produce an error if OS system is not configured to resolve the short names (in case FQDN is not used)."user machine"... Can you please elaborate more. The above both queries are running fine at my end using 11.2.0.1 and windows xp.
    Regards
    Girish Sharma

  • How do I view Migrate Data errors - Access 2003 - Oracle 10g

    I'm trying to use the SQL Developer to migrate data from an Access 2003 database to an Oracle 10g database. I followed the instructions found here:
    http://www.oracle.com/technology/tech/migration/workbench/files/omwb_getstarted.html
    I was able to complete every step except the actual data move. I exported the xml for the Access database, I captured the export and then ran the generation scripts on my target Oracle database (I'm using the same schema for the migration repository and the actual data). It created the tables with only one or two errors which I resolved.
    Now, when I select Migration->Migrate Data, I get the dialog that appears to start 4 or 5 threads and attempts to migrate each table. They all error and do not transfer any rows. I can see that there's one error per table, but I can't see the error text. I just know that an error occurred. Is there a log somewhere or is the error displayed somewhere else? How do I know what's gone wrong?
    Thanks.

    I too receive unexplained error counts using the Migrate Data menu selection and unexplained failures using the Generate Data Move Scripts menu selection. Permissions granted by role or direct grants should not be a problem, but a Migrate Data error appears in the Migration Log panel at the bottom of the SQL Developer window, "Failed to disable constraints: ORA-00942 ... ". No further details available on what constraints or why the error. No other errors were detected while following the instructions found in the Oracle SQL Developer Migration Workbench Getting Started guide. SQL Developer never migrates the data from the existing Access 2000 mdb file to the newly created schema objects in Oracle 10g using either method. The following roles and privileges have been granted to both the repository owner and the target schema owner:
    GRANT RESOURCE TO MIGRATE_USER WITH ADMIN OPTION;
    GRANT CONNECT TO MIGRATE_USER WITH ADMIN OPTION;
    ALTER USER MIGRATE_USER DEFAULT ROLE ALL;
    -- 25 System Privileges for MIGRATE_USER
    GRANT CREATE ROLE TO MIGRATE_USER;
    GRANT ALTER TABLESPACE TO MIGRATE_USER;
    GRANT ALTER ANY SEQUENCE TO MIGRATE_USER;
    GRANT INSERT ANY TABLE TO MIGRATE_USER;
    GRANT SELECT ANY TABLE TO MIGRATE_USER;
    GRANT CREATE ANY TABLE TO MIGRATE_USER;
    GRANT UNLIMITED TABLESPACE TO MIGRATE_USER WITH ADMIN OPTION;
    GRANT DROP TABLESPACE TO MIGRATE_USER;
    GRANT CREATE ANY TRIGGER TO MIGRATE_USER;
    GRANT ALTER ANY ROLE TO MIGRATE_USER;
    GRANT CREATE VIEW TO MIGRATE_USER WITH ADMIN OPTION;
    GRANT DROP USER TO MIGRATE_USER;
    GRANT CREATE TABLESPACE TO MIGRATE_USER;
    GRANT GRANT ANY ROLE TO MIGRATE_USER;
    GRANT CREATE ANY SEQUENCE TO MIGRATE_USER;
    GRANT ALTER ANY TABLE TO MIGRATE_USER;
    GRANT DROP ANY TRIGGER TO MIGRATE_USER;
    GRANT DROP ANY ROLE TO MIGRATE_USER;
    GRANT DROP ANY SEQUENCE TO MIGRATE_USER;
    GRANT UPDATE ANY TABLE TO MIGRATE_USER;
    GRANT ALTER ANY TRIGGER TO MIGRATE_USER;
    GRANT COMMENT ANY TABLE TO MIGRATE_USER;
    GRANT DROP ANY TABLE TO MIGRATE_USER;
    GRANT CREATE PUBLIC SYNONYM TO MIGRATE_USER WITH ADMIN OPTION;
    GRANT CREATE USER TO MIGRATE_USER WITH ADMIN OPTION;
    -- 1 Tablespace Quota for MIGRATE_USER
    ALTER USER MIGRATE_USER QUOTA UNLIMITED ON USERS;
    Operating system for both Access 2000 and Oracle 10g is Windows XP PRO SP2.
    Oracle SQL Developer is version 1.1.2.25 build MAIN-25.79 on Windows XP PRO SP2. All three are on the same PC.
    Since only the last step failed, I created a User DSN with the ODBC administrator. Then, linked the newly created Oracle table to Access via ODBC using the DSN created. Next, I created an append query with the source being the Access table and the target being the Oracle table. I moved the data by pressing the red exclamation mark.

  • Data Migration from Microsoft Access to Oracle 9i

    Dear All
    This is my first request in your forum,My problem is that I have installed SQL developer but unable to migrate my MDB (Microsoft access file) into Oracle 9i,I have done the following activities in order to migrate data.
    open sql developer
    under migration,click quick migration
    quick migration wizard diaglog box appear,click new,
    in the oracle tab, input the following information
    input connection name 'zuhair',give user name and password (sys/s),check save password option,give role "sysdba" ,give connection type "basic",didnt check any any check box like os authorization and others,give host name 'zkhan-dfml',port '1521',sid 'dba' and then push the test button and then status show "success"
    in the access tab, input the following information
    input connection name ,input mdb file name by using browse button,after this step click test button then the following message display 'test fail odbc microsoft access driver not a valid password
    I have tried to create odbc link but i think i have done some thing wrong,kindly help
    Regards
    Zuhair

    Hi Zuhair,
    If you give details of the problems you are still having then we should be able to get SQL*Developer to work.
    However, if you don't want to use SQL*Developer then the following options are taken from note 393760.1 available in Metalink if you have access to that -
    1. Use a gateway that supports the non-Oracle database or generic connectivity if a third party ODBC driver is available to do a -
    'create Oracle_table as select from non_oracle_table@database_link'
    for each table. You would then have to manually create all the other objects (views, indexes, stored procedurs etc) and permissions etc that existed in the non-Oracle database.
    2. Use the SQL*Plus COPY command to copy data from the non-Oracle database to the
    Oracle database using a gateway or generic connectivity. The syntax is as follows:
    COPY FROM username/password@oracle_sid -
    INSERT destination_oracle_table -
    USING query;
    The following example selects all rows from the EMP table in the non-Oracle database and
    inserts them into the local Oracle EMP table:
    COPY FROM SCOTT/TIGER@ora10 -
    INSERT EMP -
    USING SELECT * FROM SCOTT.EMP@gateway;
    where "gateway" is the database link created for the gateway.
    3. Load the non-Oracle data into flat files and use SQL*Loader to put the data into Oracle tables. Again manual
    work is required for the other objects.
    4. Contact the Oracle Product Technology Services (PTS) group for assistance. See the webpage -
    http://www.oracle.com/technology/tech/migration//workbench/index_sqldev_omwb.html
    5. Use a third party migration tool. See -
    http://www.oracle.com/technology/tech/migration/isv/third_party.html
    6. Use JDBC to connect to the non-Oracle database and Java in the Oracle database. This method will work but it is not suppported by the JDBC team.
    =========
    The amount of work involved will depend on the number and size of Access tables that you want to migrate.
    Regards,
    Mike

  • Very difficult migration from MS Access to Oracle with SQL Developer

    Dear Developers
    I have tried to used for one Project Oracle Sql Developer Migration from Access to Oracle (Application Express). Was about an evaluation if Oracle Express (with Application Express) or Mysql (with PHP) as target database.
    I am working with Oracle for 14 years and i earn my money in projects related with Oracle. Of course i am sentimental and i push every time when an opportunity comes to have as an option Oracle.
    This time beside my sentimental approach the decision was different.
    I will tell you why and i hope that someone there will listen and make something for a better Product.
    I was trying yesterday the whole day to migrate an Microsoft Access database. A nightmare....
    1. Microsoft Access Exporter 2000 was too slow. For a 25 MB Access database, running time was 15 Minutes. And 15 minutes to obtain an undocumented error. I followed your instruction and eliminate all references etc... as you described in HELP. a lot of time necessary to read and do..... After that i obtained an Error #..16. Sorry that i don't provide you with an exact number error. i don't have it right know and personally i am not interested anymore. For this error i don't find nothing in forums about it.... Search again and again..... Every time after waiting 15 Minutes in which you don't know exactly what application does or if really does something. I decided to delete sequentially macros, modules, forms, querys from Access database and see where Exporter stops... Time and time lost for trying and searching.... Finally i obtained my XML file only by keeping my Access tables. The file was produced even if i obtained at the end Error #5:..... Because was an error i am not really sure if the file was completly consistent with my database.
    2. I followed the next steps and with some errors (enabling, disabling constraints, objects couldn't be created because of different reasons) i had my Model and Oracle Schema. I have tried to export the data from Access and import it in Oracle. data exported was in UTF8 and SQL Loader Control file doesn't have
    LOAD DATA
    character set utf8
    So i tried to add the string "character set utf8" in my dozens of CTL files - with a freeware of course.....
    Maybe you can say that if i knew that from the beginning i would have set my character set in SQL Developer. I don't know and i will not ever try with this product!
    So finally after hours of working and trying and playing with my nerves, reading a lot of forums and documentation, i had an Oracle schema, maybe incomplete because of different errors at so much migration stages.
    And now i have tried for the first time in my life MySQL Migration Toolkit. I read that for migration to MYSQL this tool is what i needed.
    I recommend you to try the product and see something about the quality required for a piece of software. Is not enough if your product runs OK with Nortwind DEMO Access database. It should run OK with all ACCESS databases.
    With the tool i have done the job in 5 MINUTES. Simple, efficiently and without errors. At the end i had the SQL Scripts and the DATA imported in the database.
    Difficult to say something now. I am sentimental but i asked mysef if you can do something to improve the quality of the product.
    What arguments can we provide for a client in Migration from Access to Oracle ???? Can you honestly answer at that?
    Please try this MYSQL Migration Toolkit.....Maybe this give you some ideas about simple tasks and about what we really need...
    Best regards
    Adrian

    Dear Barry and Kgronau
    Thank you very much for your response. My Post was after a long day of trying to import an MDB file.
    Maybe you can understand why i was so angry...
    Yes i understand that your tool try to do more than other even if actually you don't really convert too much.
    From Modules to make some procedures where the whole code is commented! .....
    For other MDB which i tried to import in APEX the forms where really not usable. Queries are full of errors requires most of the time manual corrections.
    I am sorry that i can not provide you with this MDB which cause these problems.
    Data and software doesn't belong to me and the company which own it can not provide to you.
    What i hope from your product is, even when errors come, to show a better error explanation. At what object in Access error ocures ? This is very important because i can correct my MDB or just delete the module,form,query in cause if SQL Developer doesn't like it....
    Just showing an error Error #.... doesn't help me too much. And if an error occurs i don't know if program continues to work or is dead. No information about this. Maybe you can show that your application is alive and does something (working status etc...) ! Anyway we wait long minutes in front of dead screen....
    Again, thank you very much for your attention
    Adrian

Maybe you are looking for

  • FCP HDSR Online Workflow

    I'm editing a 35mm (2 Perf) feature in FCP using a DVCam offline standard workflow. We will eventually online to HDSR which will then be used to conform the film for film-out. My question... It is very expensive to have the post place to the HDSR onl

  • Need for Nokia 808 reinstall stock camera.

    I install the app  'camerapro for N8 and 808' and set as default camera. But the stock apps show blank black screen while still can take photo. I'm unsure whats going on. I turn off Camerapro apps as default, but the problem still presist. I tried re

  • Smartforms Currency format wrongly printing

    Hi All,   I'm facing a problem with printing the amount field on Smartform. I also tried it display in Document currency format eg., In the document amount displayed like 1,234.56 (in a standard transaction) When printing on the form it displayed lik

  • UD Issue in new plant - Urgent

    Hi all, I have created a new plant, business area and sales organization 5500. I am executing a test run. while performing a Usage decision in qa32, when i click to select the UD code, system says that : Selected set code does not exist, or data ente

  • Different backgrounds for menubar Spry UI 1.7

    All the q/a I've found refer to previous versions of MenuBar, not the newest 2.0 MenuBar that's in Spry UI 1.7 / DW CS5. I want to use different background images for each of the top level MenuBars. I've found the place in the CSS, #MenuBar .MenuItem