Referencing Objects When Migrating from Oracle

Qualifying Objects

When referencing an object that exists in your Oracle user account, the object can be referenced by its unqualified name (for example, SELECT * FROM STUDENT). When referencing objects that exist in other schemas, the schema name must be prefixed to the object name with a single period (SELECT * FROM STUDENT_ADMIN.STUDENT).

For Microsoft® SQL Server™ tables, views, and stored procedures, the complete name of the object is comprised of four identifiers: server name, database name, owner name, and object name in the format:

[[[server.][database].][owner].]object

The server, database, and owner names are known as the qualifiers of the object name. When referencing a table, view, or stored procedure, you can specify any, all, or none of the qualifiers.

Case Sensitivity

When referring to objects in Oracle, the use of case is not important. In SQL Server, object names can be case-sensitive, depending on the character sort order that is installed. The sort order is chosen in SQL Server Setup during installation. The default sort order in SQL Server is dictionary order, case-insensitive.

If your SQL Server installation is case-sensitive, it is recommended that you capitalize all table and column names in both Oracle and SQL Server to avoid any problems.

Using Synonyms

In Oracle, a public or private synonym is often used to eliminate the need to specify a username when requesting a table in another schema. SQL Server does not provide public or private synonyms.

See Also
Object Visibility and Qualification Rules Sort Order
Using Identifiers as Object Names  

 

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.