![]() Oracle attempts to resolve references to objects at the schema level before resolving them at the PUBLIC synonym level. To create a PUBLIC synonym for the emp table in the schema scott on the remote SALES database, you could issue the following statement:įOR synonym may have the same name as the base table, provided the base table is contained in another schema. To define the synonym market for the table market_research in the schema scott, issue the following statement: CREATE DATABASE LINK for more information on creating database links."Referring to Objects in Remote Databases" for more information on referring to database links.Restriction: You cannot specify dblink for a Java class synonym. If you omit dblink, Oracle assumes the object is located on the local database. Oracle Corporation recommends that you specify the schema containing the object in the remote database. If you specify dblink and omit schema, the synonym refers to an object in the schema specified by the database link. You can use a complete or partial dblink to create a synonym for a schema object on a remote database where the object is located. You cannot create a synonym for an object type. The schema object cannot be contained in a package.The schema object need not currently exist and you need not have privileges to access the object. The schema object can be of the following types: If you do not qualify object with schema, Oracle assumes that the schema object is in your own schema. Specify the object for which the synonym is created. The actual encryption is not accessible, and you cannot use either your original specification or the data dictionary representation as the synonym name. ![]() If you specify a name longer than 30 bytes, Oracle encrypts the name and places a representation of the encryption in the data dictionary. Names longer than 30 bytes are permitted for Java functionality only. Specify the name of the synonym to be created.Ĭaution: The functional maximum length of the synonym name is 32 bytes. You cannot specify a schema for the synonym if you have specified PUBLIC. If you omit schema, Oracle creates the synonym in your own schema. Specify the schema to contain the synonym. A private synonym name must be unique in its schema. If you omit this clause, the synonym is private and is accessible only within its schema. Oracle uses a public synonym only when resolving references to an object if the object is not prefaced by a schema and the object is not followed by a database link. Public synonyms are accessible to all users. Specify PUBLIC to create a public synonym. To create a PUBLIC synonym, you must have CREATE PUBLIC SYNONYM system privilege. To create a private synonym in another user's schema, you must have CREATE ANY SYNONYM system privilege. To create a private synonym in your own schema, you must have CREATE SYNONYM system privilege. Oracle8i Concepts for general information on synonyms
0 Comments
Leave a Reply. |