SEPARATION OF USERS AND SCHEMAS Synonyms SQL Server

SEPARATION OF USERS AND SCHEMAS Synonyms SQL Server 2005 introduces support for a database object known as a synonym. A synonym is just an alternate name for an existing database object that keeps a database user (more likely, a database programmer) from having to use a multipart name for an object. Synonyms can be defined on a two-part, three-part, or four-part SQL Server object name. A synonym can be defined by the following database objects: Table View Stored procedure User-defined function Extended stored procedure Replication filter procedure Although synonyms can be created on a multipart object name, they are scoped to the database that they are created in. Here are some examples of creating and using synonyms. USE pubs GO CREATE SYNONYM customers_east FOR eastserver.northwind.dbo.customers GO CREATE SYNONYM employees FOR payroll.employees GO these work SELECT * FROM customers_east SELECT * FROM employees GO USE northwind GO so does this SELECT * FROM pubs..customers_east

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost PHP Web Hosting services

Bookmark the permalink.

Comments are closed.