Click here to Skip to main content
15,895,799 members
Home / Discussions / Database
   

Database

 
AnswerRe: Return Results of a Join Using Stored Proc Pin
Mycroft Holmes27-Jul-13 22:38
professionalMycroft Holmes27-Jul-13 22:38 
AnswerRe: Return Results of a Join Using Stored Proc Pin
jschell28-Jul-13 10:31
jschell28-Jul-13 10:31 
QuestionRight outer join with no ON Pin
vkEE26-Jul-13 7:11
vkEE26-Jul-13 7:11 
GeneralRe: Right outer join with no ON Pin
PIEBALDconsult26-Jul-13 16:18
mvePIEBALDconsult26-Jul-13 16:18 
AnswerRe: Right outer join with no ON Pin
Mycroft Holmes26-Jul-13 17:33
professionalMycroft Holmes26-Jul-13 17:33 
GeneralRe: Right outer join with no ON Pin
PIEBALDconsult26-Jul-13 19:01
mvePIEBALDconsult26-Jul-13 19:01 
QuestionChanging Server names Dynamically in Stored Procedure Pin
indian14325-Jul-13 6:42
indian14325-Jul-13 6:42 
AnswerRe: Changing Server names Dynamically in Stored Procedure PinPopular
Richard Deeming25-Jul-13 7:26
mveRichard Deeming25-Jul-13 7:26 
  1. Using the SQL Server Configuration Manager, create an alias[^] pointing to the correct Server2 for the current environment. The alias name should be the same in all environments.
  2. In SQL Server Management Studio, create a linked server[^] pointing to the alias you just set up.
  3. In your stored procedure, load the data from the linked server.

With this approach, your code doesn't need to change. It will always be querying a linked server with a fixed name, which is pointing to an alias with a fixed name. The only thing that changes between environments is where the alias is pointing.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Changing Server names Dynamically in Stored Procedure Pin
indian14325-Jul-13 8:59
indian14325-Jul-13 8:59 
GeneralRe: Changing Server names Dynamically in Stored Procedure Pin
Richard Deeming25-Jul-13 9:07
mveRichard Deeming25-Jul-13 9:07 
GeneralRe: Changing Server names Dynamically in Stored Procedure Pin
indian14325-Jul-13 9:20
indian14325-Jul-13 9:20 
GeneralRe: Changing Server names Dynamically in Stored Procedure Pin
GuyThiebaut26-Jul-13 2:03
professionalGuyThiebaut26-Jul-13 2:03 
QuestionSSIS package question Pin
vkEE24-Jul-13 9:48
vkEE24-Jul-13 9:48 
AnswerRe: SSIS package question Pin
PIEBALDconsult25-Jul-13 3:42
mvePIEBALDconsult25-Jul-13 3:42 
GeneralRe: SSIS package question Pin
vkEE25-Jul-13 3:46
vkEE25-Jul-13 3:46 
QuestionUpdate trigger. Pin
Septimus Hedgehog24-Jul-13 4:57
Septimus Hedgehog24-Jul-13 4:57 
AnswerRe: Update trigger. Pin
Richard Deeming24-Jul-13 8:05
mveRichard Deeming24-Jul-13 8:05 
GeneralRe: Update trigger. Pin
Septimus Hedgehog24-Jul-13 11:33
Septimus Hedgehog24-Jul-13 11:33 
GeneralRe: Update trigger. Pin
Mycroft Holmes24-Jul-13 12:47
professionalMycroft Holmes24-Jul-13 12:47 
GeneralRe: Update trigger. Pin
Septimus Hedgehog24-Jul-13 20:15
Septimus Hedgehog24-Jul-13 20:15 
GeneralRe: Update trigger. Pin
Mycroft Holmes24-Jul-13 20:22
professionalMycroft Holmes24-Jul-13 20:22 
GeneralRe: Update trigger. Pin
Shameel25-Jul-13 5:08
professionalShameel25-Jul-13 5:08 
GeneralRe: Update trigger. Pin
Richard Deeming25-Jul-13 6:25
mveRichard Deeming25-Jul-13 6:25 
QuestionHow to identify identical master-detail records. Pin
David Mujica23-Jul-13 10:44
David Mujica23-Jul-13 10:44 
AnswerRe: How to identify identical master-detail records. Pin
Richard Deeming23-Jul-13 12:03
mveRichard Deeming23-Jul-13 12:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.