Current Server?

  • Is there a way in T-SQL of identifying the current server that you are on?

    Thanks,

    Helen

     

  • select @@servername - what you want ?!?!







    **ASCII stupid question, get a stupid ANSI !!!**

  • Check BOL for SERVERPROPERTY. It gives you some other useful properties as well.

    There is no "i" in team, but idiot has two.
  • Sorry for the stupid question.

    What I am really trying to do is to get my DTS packages to dynamically determine what server they are on when I migrate from 'Testing' to 'Live'.

    I tried using Activex scripting to populate a global variable with @@servername  but I have to define a server connection first ... ARGH!

    It's a 'nice to have' rather than a 'need to have' but it just keeps niggling at me!

    Thanks though for your help, I'll shuffle into the corner and hide again now!

  • Helen - don't know if you've had the chance to read some of the articles on this site on dts packages...here're links to a couple of them that may help guide you...

    Dynamic properties

    portable dts packages

    more portable dts packages







    **ASCII stupid question, get a stupid ANSI !!!**

  • Thank you

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply