Copyright 2014 Oracle andor its affiliates All rights reserved You can create

Copyright 2014 oracle andor its affiliates all rights

This preview shows page 31 - 34 out of 224 pages.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. You can create and test connections for multiple databases and for multiple schemas. By default, the tnsnames.ora file is located in the $ORACLE_HOME/network/admin directory, but it can also be in the directory specified by the TNS_ADMIN environment variable or registry value. When you start SQL Developer and open the Database Connections dialog box, SQL Developer automatically imports any connections defined in the tnsnames.ora file on your system. Note: On Windows, if the tnsnames.ora file exists, but its connections are not being used by SQL Developer, define TNS_ADMIN as a system environment variable. You can export connections to an XML file so that you can reuse it. You can create additional connections as different users to the same database or to connect to the different databases. Oracle Database 12 c : : SQL SQL Worksh Workshop op II II B B - 7
Image of page 31
Creating a Database Connection 1 2 3 To create a database connection, perform the following steps: 1. On the Connections tabbed page, right-click Connections and select New Connection. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. . , . username and password of the schema that you want to connect to. a. From the Role drop-down list, you can select either default or SYSDBA . (You choose SYSDBA for the sys user or any user with database administrator privileges.) b. You can select the connection type as: Basic: Basic: In this t e enter host name and SID for the database that ou want to connect to. Port is already set to 1521. You can also choose to enter the Service name directly if you use a remote database connection. TNS: TNS: You can select any one of the database aliases imported from the tnsnames.ora file. LDAP: LDAP: You can look up database services in Oracle Internet Directory, which is a component of Oracle Identity Management. Advanced: Advanced: You can define a custom Java Database Connectivity (JDBC) URL to connect to the database. Oracle Database 12 c : : SQL SQL Worksh Workshop op II II B B - 8
Image of page 32
Local/Bequeath: If the client and database exist on the same computer, a client connection can be passed directly to a dedicated server process without going through the listener. c. Click Test to ensure that the connection has been set correctl . d. Click Connect. If you select the Save Password check box, the password is saved to an XML file. So, after you close the SQL Developer connection and open it again, you are not prompted for the password. 3. The connection gets added in the Connections Navigator. You can expand the connection to view the database objects and view object definitions (dependencies, details, statistics, and so on). Note: From the same New/Select Database Connection window, you can define connections to non-Oracle data sources using the Access, MySQL, and SQL Server tabs. However, these connections are read-only connections that enable you to browse objects and data in that data source.
Image of page 33
Image of page 34

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture