Your database domain will be different.ĭefining a Public Database Link: Example The following statement defines a shared public database link named remote that refers to the database specified by the service name remote: The examples use the Oracle Database domain. The examples that follow assume two databases, one with the database name local and the other with the database name remote. See Also: Oracle Database Administrator's Guide for information on specifying remote databases For example, if the privileged database link appears inside procedure scott.p (an invoker-rights procedure created by scott), and user Jane calls procedure scott.p, then CURRENT_USER is jane and the procedure executes with Jane's privileges. However, if the stored object is an invoker-rights function, procedure, or package, the invoker's authorization ID is used to connect as a remote user. For example, if the database link appears inside procedure scott.p (created by scott), and user jane calls procedure scott.p, the current user is scott. When executing a stored object (such as a procedure, view, or trigger) that initiates a database link, CURRENT_USER is the username that owns the stored object, and not the username that called the object. If the database link is used directly, that is, not from within a stored object, then the current user is the same as the connected user. The current user must be a global user with a valid account on the remote database. Specify CURRENT_USER to create a current user database link. You can specify this clause and the dblink_authentication clause only if you are creating a shared database link. The CONNECT TO clause lets you enable a connection to the remote database. "RENAME GLOBAL_NAME Clause" (an ALTER DATABASE clause) for information on changing the database global name Oracle Database Reference for information on the GLOBAL_NAMES, OPEN_LINKS, and OPEN_LINKS_PER_INSTANCE initialization parameters "Referring to Objects in Remote Databases" for guidelines for naming database links Periods are permitted in names of database links, so Oracle Database interprets the entire name, such as ralph.linktosales, as the name of a database link in your schema rather than as a database link named linktosales in the schema ralph.) Restriction on Creating Database Links You cannot create a database link in another user's schema, and you cannot qualify dblink with the name of a schema. The maximum number of database links that can be open in one session or one instance of a Real Application Clusters configuration depends on the value of the OPEN_LINKS and OPEN_LINKS_PER_INSTANCE initialization parameters. If the value of GLOBAL_NAMES is FALSE, and if you have changed the global name of the database, then you can specify the global name. If the value of the GLOBAL_NAMES initialization parameter is TRUE, then the database link must have the same name as the database to which it connects. If you specify the database name as a quoted identifier, then the quotation marks are silently ignored. The database link name is case insensitive and is stored in uppercase ASCII characters. If you specify only the database name, then Oracle Database implicitly appends the database domain of the local database. ![]() Specify the complete or partial name of the database link. See Also: "Defining a Public Database Link: Example" If you specify SHARED, you must also specify the dblink_authentication clause. Specify SHARED to use a single network connection to create a public database link that can be shared among multiple users. ![]() Oracle Net must be installed on both the local and remote Oracle databases.ĭescription of the illustration create_database_link.gifĭescription of the illustration dblink_authentication.gif Also, you must have the CREATE SESSION system privilege on the remote Oracle database. To create a public database link, you must have the CREATE PUBLIC DATABASE LINK system privilege. To create a private database link, you must have the CREATE DATABASE LINK system privilege. ![]() INSERT, UPDATE, DELETE, and LOCK TABLE for using links in DML operations Oracle Database Reference for descriptions of existing database links in the ALL_DB_LINKS, DBA_DB_LINKS, and USER_DB_LINKS data dictionary views and for information on monitoring the performance of existing links through the V$DBLINK dynamic performance viewĭROP DATABASE LINK for information on dropping existing database links Oracle Database Administrator's Guide for information on distributed database systems Oracle Database Application Developer's Guide - Fundamentals for information about accessing remote tables or views with PL/SQL functions, procedures, packages, and datatypes
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |