﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Discuss Content Posted by Brian Knight / Article Discussions / Article Discussions by Author  / Creating a Synonym for a Table - SQL School Video / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 18 May 2013 14:41:05 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Creating a Synonym for a Table - SQL School Video</title><link>http://www.sqlservercentral.com/Forums/Topic609424-31-1.aspx</link><description>If my kludge helps, great!I'd really like to be able to accomplish this trye of thing entirely inside SQL Server (like with a synonyn) instead of relying on having to go to the desktop and run the SQL Server Configuration Manager, etc.</description><pubDate>Wed, 21 Jan 2009 09:10:40 GMT</pubDate><dc:creator>ChrisMoix-87856</dc:creator></item><item><title>RE: Creating a Synonym for a Table - SQL School Video</title><link>http://www.sqlservercentral.com/Forums/Topic609424-31-1.aspx</link><description>Thanks for the illumination. I have run into this problem several times (dev/qa/prod) and now I think I have a glimmer of how to solve this. Thanks!Arthur</description><pubDate>Wed, 21 Jan 2009 09:01:45 GMT</pubDate><dc:creator>fuller.artful</dc:creator></item><item><title>RE: Creating a Synonym for a Table - SQL School Video</title><link>http://www.sqlservercentral.com/Forums/Topic609424-31-1.aspx</link><description>[quote]Not sure what you are referencing here, but you can easily create a synonym that accesses an object through a linked server.Create the linked server, then in the local database create the synonym as:CREATE SYNONYM MySchema.Object FOR linkedserver.remotedb.schema.object;[/quote]I basically want a synonym on a whole database, not an object at a time. Currently I have to use a combination of a Client Network Alias and a Linked Server to accomplish this; For example - Server 1 needs to query Northwind on Server 2. On server 1:Create a Client Network Alias named NorthwindAlias and point it to Server 2. Create a Linked Server named NorthwindAlias and map logins. Write a query referencing NorthwindAlias.dbo.xxxxx, etc.</description><pubDate>Wed, 21 Jan 2009 06:27:43 GMT</pubDate><dc:creator>ChrisMoix-87856</dc:creator></item><item><title>RE: Creating a Synonym for a Table - SQL School Video</title><link>http://www.sqlservercentral.com/Forums/Topic609424-31-1.aspx</link><description>[quote][b]fuller.artful (1/20/2009)[/b][hr]You described well the "how to" aspect of synonyms, but what I fail to grasp its the usefulness. Why would I want to create a synonym? What advantage is gained? By your example, I even have to type an extra keystroke ("1" or "2") when referring to the "Contact" table. Thanks,Arthur[/quote]This link can answer your query:http://www.mssqltips.com/tip.asp?tip=1076</description><pubDate>Wed, 21 Jan 2009 01:39:18 GMT</pubDate><dc:creator>Anipaul</dc:creator></item><item><title>RE: Creating a Synonym for a Table - SQL School Video</title><link>http://www.sqlservercentral.com/Forums/Topic609424-31-1.aspx</link><description>[quote][b]ChrisMoix (1/20/2009)[/b][hr]I really wish you could use synonyms for databases on remote servers. We use SQL Client Aliases to keep from having to change code going from development , to QA, to Production. The only problem is that those are set on a server level. With clusters, that's one more thing to manage. It would be nice to use synonyms to abstract the database call instead of having to resort to Client Aliases and Linked Servers.[/quote]Not sure what you are referencing here, but you can easily create a synonym that accesses an object through a linked server.Create the linked server, then in the local database create the synonym as:CREATE SYNONYM MySchema.Object FOR linkedserver.remotedb.schema.object;Now, when your code is moved from DEV to QA to PROD - it doesn't have to change.  The synonyms on each system are setup to access the appropriate server and objects.</description><pubDate>Tue, 20 Jan 2009 17:15:07 GMT</pubDate><dc:creator>Jeffrey Williams 3188</dc:creator></item><item><title>RE: Creating a Synonym for a Table - SQL School Video</title><link>http://www.sqlservercentral.com/Forums/Topic609424-31-1.aspx</link><description>I really wish you could use synonyms for databases on remote servers. We use SQL Client Aliases to keep from having to change code going from development , to QA, to Production. The only problem is that those are set on a server level. With clusters, that's one more thing to manage. It would be nice to use synonyms to abstract the database call instead of having to resort to Client Aliases and Linked Servers.</description><pubDate>Tue, 20 Jan 2009 08:13:07 GMT</pubDate><dc:creator>ChrisMoix-87856</dc:creator></item><item><title>RE: Creating a Synonym for a Table - SQL School Video</title><link>http://www.sqlservercentral.com/Forums/Topic609424-31-1.aspx</link><description>The usefulness of synonyms has do to with changing database object locations/names without changing application code. For instance if your application is coded to read from the Orders table and for some reason you have to point it at a copy of the Orders table on a different server you can create a synonym rather than changing your application code...or you can just change your app code. :)</description><pubDate>Tue, 20 Jan 2009 07:06:23 GMT</pubDate><dc:creator>chris.schau</dc:creator></item><item><title>RE: Creating a Synonym for a Table - SQL School Video</title><link>http://www.sqlservercentral.com/Forums/Topic609424-31-1.aspx</link><description>You described well the "how to" aspect of synonyms, but what I fail to grasp its the usefulness. Why would I want to create a synonym? What advantage is gained? By your example, I even have to type an extra keystroke ("1" or "2") when referring to the "Contact" table. Thanks,Arthur</description><pubDate>Tue, 20 Jan 2009 04:55:32 GMT</pubDate><dc:creator>fuller.artful</dc:creator></item><item><title>Creating a Synonym for a Table - SQL School Video</title><link>http://www.sqlservercentral.com/Forums/Topic609424-31-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/articles/Video/65079/"&gt;Creating a Synonym for a Table - SQL School Video&lt;/A&gt;[/B]</description><pubDate>Wed, 26 Nov 2008 13:52:18 GMT</pubDate><dc:creator>Brian Knight</dc:creator></item></channel></rss>