Default Schema in connection URL

I'd like to set default database schema in Connection URL
jdbc:oracle:thin:@<server>:<port1521>:<sid>
I need to query database without schema prefix
*select monkey_name from animals.monkey*
ie. When I run
select monkey_name from monkey
it will use animals schema by default.
Anyone with solution?
Thanks

Hi,
aftre reading the response of tarpaw and castorp I build a simple test case that demonstrates the DBCP feature:
package org.jpadbf.jdbc;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
import javax.sql.DataSource;
import org.apache.commons.dbcp.BasicDataSource;
public class TestDBCPConnection {
     private static final String THIN_DRIVER="jdbc:oracle:thin:@";
     private static String databaseUrl="localhost:1521:ORCL";
     private static String username="test1";
     private static String password="test1";     
create table TEST_INSERT(ID NUMBER not null, DESCRIPTION VARCHAR2(100));
grant select on test_insert to test1;
     * @param args
     * @throws SQLException
     public static void main(String[] args) throws SQLException {
          DataSource dataSource = getDBCPDataSource(databaseUrl, username, password,1,20);
          Connection conn=dataSource.getConnection();
          try {
               testQuery(conn);
          } finally {
               conn.close();
     public static void testQuery(Connection conn) throws SQLException {
          Statement statement =conn.createStatement();
          try {
               ResultSet resultSet=statement.executeQuery("select 1 from test_insert");
               try {
                    if (resultSet.next()) {
                         if (resultSet.getInt(1)!=1) {
                              throw new RuntimeException ("Invalid query result");
               } finally {
                    resultSet.close();
          } finally {
               statement.close();
     public static DataSource getDBCPDataSource(String jdbcUrl, String username, String password, int minConncetions, int maxConnections) throws SQLException {
          BasicDataSource dataSource= new BasicDataSource();
          dataSource.setDriverClassName("oracle.jdbc.driver.OracleDriver");
          dataSource.setUrl(THIN_DRIVER + jdbcUrl);
          dataSource.setUsername(username);
          dataSource.setPassword(password);
          dataSource.setInitialSize(minConncetions);
          dataSource.setMaxActive(maxConnections);
          dataSource.setMaxWait(1000);
          List<String> sqls=new ArrayList<String>();
          sqls.add("ALTER SESSION SET CURRENT_SCHEMA = TEST");
          dataSource.setConnectionInitSqls(sqls);
          return dataSource;
And it seems work nicely.
the initSQLS property is added in version 1.3 (On my pc, before running this test case I had version 1.2).
Runnign the test case showed that I give you a wrong sql the correct is:
ALTER SESSION SET CURRENT_SCHEMA = ANIMALS
note the _ before CURRENT and SCHEMA
ciao,
Giovanni

Similar Messages

  • Specify Default Schema Name in HANA Connection string

    Hi,
    I have connection string like this.
    DRIVER={HDBODBC32};UID=uid;PWD=pwd; SERVERNODE=x.com:30015;
    I want to include default schema name in the connection string.
    Please help me

    Hi S V
    there is no option for that available.
    To change the current schema it's required to run SET SCHEMA <schema_name> after you logged on.
    - Lars

  • RemoteApp and Desktop Connection - Default Connection URL - Windows Server 2012 R2

    Hi,
    I'm building an Remote Desktop envoirement for our organisation wich includes the following servers:
    2 Domain controllers with Remote Desktop Gateway, Licensing and Broker (1 broker functional, no HA, still in progress of building), RDWeb installed.
    2 Remote Desktop Host Servers for the user logins (no applications just the desktop).
    2 Remote Desktop Application Servers (RemoteApp) with all of our applications installed.
    2 File Servers using DFS replication.
    All of those servers are Windows 2012 r2.
    Our purpose is to deploy RemoteApp's to the Remote Desktop Host servers using the GPO Default Connection URL.
    The problem is that it won't apply to the users who log on to the Remote Desktop Host servers. I'm struggling with this issue for a while now and tried different possible solutions. Such as the delegation credential GPO, making the users local admin, making
    the users domain admin etc etc.
    My guess is that the GPO hangs on the fact that when i try to manually run the wizard to connect to the RemoteApp and Desktop connections, my credentials are asked. Which i think is odd because i'm already logged in as an domain user. I'm having the exact same
    problem with the domain administrator account.
    When i'm connecting manually by entering the credentials in the connection wizard everything is working as it should, it just won't connect automatically
    Does someone has an solution for this?
    Kind Regards,
    Geoffrey van Meurs

    so am I correct to assume that your issue is really with RemoteApps single sign-on (SSO)?
    You have users which RDP to RDSH and again you're attempting to publish RemoteApps in that same environment?
    I haven't done SSO but there is a lot of info about it on the web:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/ed4447b5-2958-404b-883c-9aefa038ad61/single-sign-on-remoteapp-and-desktop-connection?forum=winserverTS
    Secondly, you may need to look at your GPO loopback settings to ensure the policies are being properly applied.  Use RSOP as well.  Try using a local GPO to see if it makes a difference with a non-admin test user.  Check event logs for GPO
    processing errors/conflicts.  Use gpresults, etc.
    Something else worth noting here is that RemoteApp publishing is really not meant to be done inside RDSH, it's usually done on the user's workstation, therefore eliminating the need for them to even login to RDSH, reducing the number of hops and complexity. 
    For what you're doing, you're better off using RDWeb to publish the applications to them or using the old school method of just having app. shortcuts on the Desktop/Start menu in RDSH since they're already getting a published desktop anyway.  Or just
    use RemoteApps on their workstations via GPO.  Just some thought if I'm understanding your goals here, but it sounds like you would need to read up on RemoteApp SSO.

  • How to register the same schema with same URL

    I'm getting ORA-31085 error when try to register the same schema with same URl.
    My requirement is that I should be able to reregister the same schema with the same URL .
    I'm using the following function :
    PROCEDURE validateXmlSchema(inp_xmlMsg IN VARCHAR2,
    out_isValidDoc IN OUT NUMBER,
    inp_xmlSchema IN OUT VARCHAR2,
    out_varchar_notused OUT VARCHAR2)IS
    xmldoc XMLType;
    res number;
    BEGIN
    xmldoc := XMLtype(inp_xmlMsg);
    res := xmldoc.isSchemaValid(inp_xmlSchema);
    IF (xmldoc.isSchemaValid = 1) THEN
    out_isValidDoc := 1;
    ELSE
    out_isValidDoc := 0;
    END IF;
    END validateXmlSchema;
    This is used recursively.Until the schema is not validated for a given URL this function should keep on throwing error and once the schema is validated the data should be inserted in the DB.
    But its not happening as of now instead the ORA-31085 is thrown second time.
    Plz provide pointers to solve the issue.

    "mjs" <[email protected]> wrote in message
    news:g7kjk5$o6$[email protected]..
    > "mjs" <[email protected]> wrote in message
    > news:g7gl2g$i3d$[email protected]..
    >> "Zorrrro" <[email protected]> wrote
    in message
    >> news:g7gcjv$a6n$[email protected]..
    >>> I'm completely nuckered trying to find an answer
    for this...
    >>>
    >>> Does anyone know how to keep the same width an
    position of the submenus
    >>> of a
    >>> horizontal dropdown menu?
    >>> Thank you in advance.
    >>>
    >>> Cheers.
    >>
    >> Doesn't a simple style="width:200px" in the input
    tag work?
    >
    > I'll asume the answer is "yes", then. ;) You're welcome.
    I believe the OP is talking about a dropdown menu like this
    one
    http://www.tjkdesign.com/articles/keyboard_friendly_dropdown_menu/default.asp
    not about a "select menu".
    I could be wrong though...
    Thierry
    Articles and Tutorials:
    http://www.TJKDesign.com/go/?0
    http://developer.yahoo.com/
    helps you build applications and mashups

  • Default schema names in multi-tier landscape

    Hi folks,
    We have an interesting problem due to having different named default schemas in each of our 3 hana systems.  For example lets say these are our default schemas in our development, staging, and production HANA systems;
    DEV_SCHEMA
    QA_SCHEMA
    PROD_SCHEMA
    Each of these replicating data from their corresponding SAP source systems.
    Now, we have a view that is developed on DEV hana box and uses DEV_SCHEMA.  When this view content is imported to QA or PROD we handle easily with schema mapping.  All is well and good although we are not really a fan of this different naming and us developers did not choose this naming (self defense plea here for us brilliant developers whom never make such mistakes... PS: HI LARS! - Go Germany!)
    Now we are setting up a connection from BW into HANA using system connection and inside this is a parameter called 'db user'.  Although it's called db user it's actually looking for a SCHEMA name.  If BW DEV is querying from HANA DEV this schema name would be DEV_SCHEMA.  However if BW_QA is querying from HANA_QA then the name would need to be QA_SCHEMA but in our BW landscape we are locked in QA and PROD and normally can not and/or do not want to edit objects in non-native systems.  Ideally what we need is our default schemas in HANA to have the same exact name throughout the HANA landscape.
    All this said, I can see that it would be great to re-name our entire HANA landscape however that would be a HUGE monumental undertaking as all systems would need to be re-replicated again (at least I think).
    Just curious if anybody else has named their schemas differently on each tier?  What are most people doing?  Naming the default schemas the same consistently or are you using schema mapping?
    Thanks,
    -Patrick

    Hi Luke,
    I am new to the project and there seems to be no original version.  At some point a bunch of the destination field names were changed on the admin console and errors resulted from it both due to mismatched joins and the use of two word field names.  I have documentation of the names for the set of tables in the function area but am having trouble with how everything matches up in the bottom half..  I'll keep working on it
    Z

  • Help Needed-Connection Url String for Oracle8i

    DriverManager.getConnection(Url , username ,password);
    In the above , I need the connection url for Oracle8i Database.
    Thanks..

    This works for me:
    jdbc:oracle:thin:@HOST:1521:INSTANCE
    Where HOST and INSTANCE represent the machine running oracle and DB instance. 1521 is the default port but may be changed.
    Mike

  • "cannot create jbcd driver of class " for connect URL 'null'" error

    I am trying to get an application that is currently working fine on a Windows platform to work in a Linux environment.
    One thing that is different from my setup in Windows, and also one that I have no experience with, is the Linux-Ubuntu default install of Apache uses Virtual Hosts and Tomcat's equivalent multiple sessions.
    I'm running the app out of the usr/share/tomcat6/webapps/msgboard instance of Tomcat vs var/lib/tomcat6.
    I am calling the application from Apache Virtual Host port 80 using mod_jk. The application cannot run under native Tomcat because of the extensive use of PHP. Everything else in the application is working correctly including a DWR (Ajax) servlet. However I also tried a simple test app from native Tomcat and got the same results.
    I also tried connecting with jdbc:mysql://localhost:3306/msgboard?autoreconnect=true&user=root&password=password at the terminal prompt and got
    bash: jdbc:mysql://localhost/msgboard?autoreconnect=true: No such file or directory
    [1]7074
    [2] 7048
    [1] Exit 127 jdbc:mysql://localhost/msgboard?autoreconnect=true
    [2]+ Donesyslog error is
    Feb 23, 2009 3:01:51 PM org.directwebremoting.util.CommonsLoggingOutput info INFO: Exec: Online.getPosts()
    Feb 23 15:01:51 ubuntu jsvc.exec[6779]: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Feb 23 15:01:51 ubuntu jsvc.exec[6779]: Caused by: java.sql.SQLException: No suitable driverFollowing is all the pertinent setup info for reference and critique. Any suggestions would be greatly appreciated.
    Apache2.2
    Tomcat6
    JDBC
    mod_jk
    Java (not sure what ver, it's the default Ubuntu install ver.)
    PHP
    Currently I am pointing to mysql-connector-java.jar in my CLASSPATH at /usr/share/java/mysql-connector-java.jar added symlinks commons-dbcp.jar, commons-logging.jar to usr/share/tomcat6/lib
    Application is deployed from usr/share/tomcat6/webapps/msgboard
    The basic code snippet in class calling the jdbc
    WEB-INF/classes/dbLink.class
    Context ctx = new InitialContext();
    DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/msgboardDB");
    WEB-INF/web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app id="msgboard">
    <display-name>Message Board</display-name>
    <resource-ref>
    <description>DB Connection</description>
    <res-ref-name>jdbc/msgboardDB</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    META-INF/context.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <Context path="/msgboard" docBase="msgboard"
    debug="5" reloadable="true" crossContext="true">
    <Resource name="jdbc/msgboardDB"
    auth="Container"
    type="javax.sql.DataSource"
    maxActive="100"
    maxIdle="30"
    maxWait="10000"
    username="root"
    password="thePassword"
    driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost:3306/msgboard?autoReconnect=true"/>
    </Context>
    I also included a symlink to this in var/lib/tomcat6/config named msgboard.xml
    per instruction at http://ubuntuforums.org/showthread.php?t=430133 and have since removed it.
    my.cnf
    [client]
    port = 3306
    bind-address = 127.0.0.1
    permissions set in /etc/tomcat6/policy.d/04webapps.policy
    permission java.net.SocketPermission "127.0.0.1:3306", "connect,resolve,listen,accept";
    per instruction at http://ubuntuforums.org/showthread.php?t=430133
    other permiissions set /etc/tomcat6/policy.d/50local.policy
    grant codeBase "file:/usr/share/tomcat6/webapps/msgboard/-" {
    permission java.net.SocketPermission "127.0.0.1:3306", "connect,resolve,listen,accept";
    grant codeBase "file:/usr/share/tomcat6/webapps/msgboard/WEB-INF/classes/-" {
    permission java.io.FilePermission "/usr/share/tomcat6/webapps/msgboard/WEB-INF/classes/logging.properties", "read";
    grant codeBase "jar:file:/usr/share/tomcat6/webapps/msgboard/WEB-INF/lib/mysql-connector-java-5.1.6.jar!/-" {
    permission java.net.SocketPermission "127.0.0.1:3306", "connect,resolve,listen,accept";
    I even tried setting Tomcat Security to "no" per instruction at
    http://webui.sourcelabs.com/ubuntu/mail/user/threads/Tomcat_connecting_to_MySQL_-Ubuntu8.10_Server.meta
    http://ubuntuforums.org/showthread.php?t=1034957&highlight=apache+tomcat+jdbc
    http://ubuntuforums.org/showthread.php?t=66615
    http://ubuntuforums.org/showthread.php?t=33601&highlight=java+mysql
    http://ubuntuforums.org/showthread.php?t=430133
    http://programminglinuxblog.blogspot.com/2008/03/connection-pooling-with-java-all.html
    http://webui.sourcelabs.com/ubuntu/mail/user/threads/Tomcat_connecting_to_MySQL_-Ubuntu8.10_Server.meta

    SOLUTION
    I had to add
    <Resource name="jdbc/webappDB"
         auth="Container"
         type="javax.sql.DataSource"
            maxActive="100"
         maxIdle="30"
         maxWait="10000"
            username="root"
         password="password"
         driverClassName="com.mysql.jdbc.Driver"
            url="jdbc:mysql://localhost:3306/webapp?autoReconnect=true"/>into /var/lib/tomcat6/conf/Catalina/localhost/ webapp.xml
    Note: the above context file was created automatically after deploying the webapp. I had to add the <resource> to it.
    The context I created in usr/share/tomcat_home/webapp/META_INF/context.xml is still there and has the same <resource>.defined in it. I did not verify whether or not it still needs to be there.
    After that I had to add two policies
    /var/lib/tomcat6/conf/policy.d/03catalina.policy
    grant {
    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.dbcp.*";
    and 04webapps.policy
    permission java.net.SocketPermission "127.0.0.1:3306", "connect,resolve,listen,accept";
    That did the trick!
    Other things that were done but have not been verified as to have any bearing on this issue.
    I changed the active java from openjdk to java-sun
    I added $tomcat_home/lib:$tomcat_home/lib/mysql-connector.jar:$tomcat_home/lib/commons-dbcp.jar to PATH
    Changed CLASSPATH=usr/share/classpath:usr/share/java/commons-dbcp.jar:usr/share/java/mysql-connector.jar
    Edited by: wlbragg on Feb 25, 2009 12:58 AM
    Edited by: wlbragg on Feb 25, 2009 12:59 AM
    Edited by: wlbragg on Feb 25, 2009 1:11 AM

  • Change default schema

    HI All,
    We are in process of deploying "SAP Business Intelligence Adoption rapid-deployment solution" and we have a schema which is already created and didn't use the option "Allow multiple usage" during the time of creation, once we import modules provided by SAP there are some models which are named by SAP predefined schema,
    I need to know what is the role I need to grant to out BW developers to change the default schema of these models.
    Thanks in advance,
    Shanaka.

    All of the application data is in one schema. e.g. APPDATA. however I don't have the password for the APPDATA user, it is controlled by the DBAs. As a developer, I have a DEVUSER account and password. And the DEVUSER is configured with the appropriate access to the APPDATA schema by the DBAs.
    The way I work right now, I connect to the database using the DEVUSER username/password, and I can navigate to the APPDATA schema through the "Other Schemas". I would like an option in the Connection properties that I can specify that APPDATA is my default schema, and the DEVUSER schema would be accessible from "Other Schemas".
    I see this field as optional. If it is not entered, then the user's schema is used.
    I hope that better explains things.
    Randy

  • Cloudscape & Java Studio Creator - Need Connection URL for toursDB

    Has anyone been able to create a data source and connect to the bundled demo databases in the default Cloudscape installation (sample or toursDB) with Java Studio Creator on MacOS X.
    I have Cloudscape running ok and I have Java Studio Creator running and I added the "derby.jar" and "derbytools.jar" files to the jar list in Java Studio creator but I'm not sure what the connection URL should be to connect to the example databases.

    Well, I think I now to having everything working!! I was able to connect to one of the sample Clouldscape databases (bundled with the Cloudscape 10.0 distribution in SJCS) - I had to do the following
    --- 1 --- After downloading a Java tool called DbVisualizer Free 4.1.1 and reviewing its documentation I was able to discover how to set an essential Java System Property for it as well as Sun Java Studio Creator on MacOS X. The property was derby.storage.fileSyncTransactionLog=true. This was needed to work around an Apple Java VM problem by bypassing code that uses write sync (rws) mode. The info for this is on the Apache site at: http://www.ibm.com/Search?q=Cloudscape+failures+on+Mac&v=14?=en&cc=zz&Search.x=47&Search.y=10 and the info for setting system properties on "double clickable Java Apps" on MacOS X can be found at: http://www.dbvis.com/products/dbvis/doc/4.1.1/doc/ug/admin/admin.html
    --- 2 --- Using the tool in *1* above I then actually got it to connect to an existing sample bundled Cloudscape database using the following connection URL jdbc:derby:/pathToTheDatabaseDirectory (needed to add the path to the URL) and the userID and Password as user1,user1 for reasons stated in the following forum link http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?forum=370&thread=66046. I also used the driver class org.apache.derby.jdbc.EmbeddedDriver.
    --- 3 --- Finally, using the config info I used in *2* above I then used the following settings in Sun Java Studio Creator
    DataSource Settings Panel Fields set as follows (for Cloudscape 10.0 installation)
    DisplayName ---> Cloudscape
    JDBC Driver Jar Files ---> derby.jar
    Driver Class Name ---> org.apache.derby.jdbc.EmbeddedDriver
    URL Template ---> jdbc:derby:
    And then......Add Data Source panel fields set as follows
    ---DataSourceName --> datasource1
    ---ServerType____ Cloudscape
    ---HostName ---> left this blank
    UserID -> user1
    ---Password ---> user1
    ---DatabaseURL ---> jdbc:derby:/Applications/IBM/Cloudscape_10.0/derbyDB
    ---DriverClass ---> org.apache.derby.jdbc.EmbeddedDriver
    thanks for your help. I had been able to connect to Cloudscape programmatically (which your blog documents well), but getting the Sun Java Studio Creator (SJSC) IDE configured for Cloudscape wasn't obvious. Hopefully the above info in *1* and *3* will help anyone using the SJSC IDE on MacOS X. The DbVisualizer Free 4.1.1 is a slick tool I discovered along the way as well.

  • Cloudscae & Java Studio Creator - Need Connection URL for toursDB

    Has anyone been able to create a data source and connect to the bundled demo databases in the default Cloudscape installation (sample or toursDB) with Java Studio Creator on MacOS X.
    I have Cloudscape running ok and I have Java Studio Creator running and I added the "derby.jar" and "derbytools.jar" files to the jar list in Java Studio creator but I'm not sure what the connection URL should be to connect to the example databases.

    1. load up the embedded driver.
    2. use jdbc:derby:toursDB as the database URL.

  • How to re-create dropped default schemas

    Can any one please tell how to re-create schemas that are by default created when database is installed.
    All the default schemas other then SYSTEM, SYS, PUBLIC, DBSNMP were dropped.
    Now it is required to re-create them. where can I find the script to re-create them.
    Thanks in adv.

    Not the demo schemas but the ones that are used by oracle server (system) for activities like - taking export, supporting sql plus, or user connect, etc. etc.
    Schemas like DMSYS, OUTLN, etc. etc.

  • Setting default schema with Schema Select extension

    Has anyone tried to do this? The web site says to put the default schema name in square brackets at the end of the connection name. When I try to do that, SQL Developer says that square brackets are illegal characters for a conneciton name.
    In essence I want to have users log in with their own individual accounts, but have their schema context automatically set to a different schema.

    You'll need to contact the extension provider directly for support.
    You could achieve the same result with a trigger - and you'd have more control over when this happened, what applications, etc.
    If you want bracketed connection names, you'll need to run an older version of SQL Developer or manually edit the connections.xml file to add the brackets to the name.
    Edited by: Jeff Smith SQLDev PM on Apr 24, 2013 10:43 AM

  • Accessing tables in other than default schema.

    Hi Experts,
    I am using an Enterprise Bean (Stateless) that uses Common JDBC
    to connect to the Java Schema of the WAS. I have created a
    DataSource alias (created on Default Datasource) and using it for connection.
    My requirement is to <b>get a list of all tables created in the Default schema</b>.
    But when I use DatabaseMetadta.getTables() method, for this type of connection
    it throws out the following exception:
    <b>java.lang.UnsupportedOperationException: Method getTables() not supported by Common JDBC</b>
    I have even tried using the query "Select * from USER_TABLES", but with this one,
    an SQL Exception is thrown saying:
    <b>com.sap.sql.log.OpenSQLException: The SQL statement "SELECT "TABLE_NAME" FROM "USER_TABLES"" contains
    the semantics error[s]: table "USER_TABLES" unknown</b>
    Please tell my how can I use tables in other than the default schema.
    Regards,
    Alka.

    Hi Alka,
    from your post, it is not entirely clear to me what you are atempting to do.
    1) Do you need help with accessing tables in a non-default schema?
    2) Do you want to determine all tables in the default schema?
    If 1), please follow the hints given by Vladimir Pavlov.
    If 2), currently, the method DatabaseMetaData.getTables() is unfortunately not supported in Open SQL/JDBC. We are currently preparing a new download of the NetWeaver Java EE 5 edition. In this version, the getTables() method will be supported.
    Or do you just want to check for the existence of a specific database table in the default schema?
    I hope this helps,
    Best regards,
    Adrian

  • "could not connect URL/defaul​t Content. msg when responding to printer software update

    when responding to printer software update message, the attempt fails and provides the following reponse"could not connect URL/default Content. msg 

    Hello jfgodfrey,
    Welcome to the HP Support Forums!
    It seems that your printer will not allow an update to be installed. In order to look into this for you / see if the update is available any other way, I have a few questions.
    What is the Operating System of computer you use, Windows or Mac?
    What is the model of printer?
    How is the printer connected to the computer, USB, Ethernet or Wireless?
    Cheers,
    JERENDS
    I work on behalf of HP
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to the left of the reply button to say “Thanks” for helping!

  • Confused about the default schema

    Hi,
    I am a little bit confused about the schema concept.
    I want to create a new schema called APP and then create several users and roles based on the schema APP. The default schema for the users should be APP achema.
    How can I make the schema APP the default schema for the new users that I am creating?
    I feel that there are some schema design concepts that I have to learn. Is there any resource on the internet that I can read and learn more about oracle schema design best practices?
    Any help would be appreciated,
    Ali

    A schema holds object definitions, and in the case of table & index objects the schema also holds the data.
    A user owns the schema.
    Therefore the user 'owns the definitions (including any functions, procedures, sequences, tabels, etc.)
    Other users may be granted access to some, or all, of the objects in a schema. This is done through the 'GRANT ...' command. For example, consider the following steps:
    1) create user app_owner
    2) create table object test owned by the app_owwner
    3) create user app_user
    4) grant select, update, insert and delete on app_owner's test table to app_user
    5) add synonyms to avoid needing to qualify the table's schema name.
    done as follows:
    oracle@fuzzy:~> sqlplus system
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Apr 3 20:07:32 2006
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Enter password:
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    Create the app owner userid. Note there is no need to ever log in to that user, even to create tables.
    SQL> create user app_owner
      2  identified by xyz
      3  account lock
      4  quota unlimited on users
      5  default tablespace users
      6  temporary tablespace temp;
    User created.
    Creating objects in a schema can be done by providing the schema name, or by switching schema in newer versions of Oracle
    SQL> create table app_owner.test ( t number );
    Table created.
    Create a userid that will access the table. Set that userid up to access the database and (for future) give it the capability to create it's own synonyms
    SQL> create user app_user
      2  identified by xyz
      3  temporary tablespace temp;
    User created.
    SQL> grant create session to app_user;
    Grant succeeded.
    SQL> grant create synonym to app_user;
    Grant succeeded.
    Now give the user access to the objects
    SQL> grant select, update, insert, delete on app_owner.test to app_user;
    Grant succeeded.
    Let's test it out. Insert by qualifying the schema name on the object, then create a synonym to avoid using schema, and try it all using the synonym
    SQL> connect app_user/xyz
    Connected.
    SQL> insert into app_owner.test values (4);
    1 row created.
    SQL> create synonym test for app_owner.test;
    Synonym created.
    SQL> insert into test values (3);
    1 row created.
    SQL> select * from test;
             T
             4
             3
    SQL>  Note that some people want to use PUBLIC grants and PUBLIC synonyms. This is a real bad idea if you want to ensure long term security of the data and want to host several different applications in the same Oracle instance.
    This, and a whole lot more, is in the 'Concepts' manual for your version of the database at http://docs.oracle.com

Maybe you are looking for