Database Connector in T-SQL?

  • Both VB and SSIS support the concept of a Database Connector. This allows a developer to prepare a prototype that manipulates data in a test database. Once the protoype has passed testing, the developer deploys the software to a live environment: part of this work is to reconfigure the Database Connector to point at a live database.

    I am struggling to find an equivalent concept in T-SQL. Am I being stupid, or is there no such thing?

    If there is no T-SQL equivalent, please can someone offer best practice tips for moving T-SQL code from a test environment to a live environment.

    Thanks in advance to all who reply.

    Mark Thornton

  • In T-SQL the connection is handled entirely by the Query window you open. Unless you specify a database name in the Query then you can run the query against either test or production based on the query window.

    In the case of TSQL it usually falls to the developer to manage the difference between TEST and PROD.

    As a matter of Habit I add a Comment line to all of my scripts to specify what mode it is in.

    --***************** IN TESTING ONLY********************

    When I move the script to production I will change the comment line to In Production.

    I also add comments for version control adding notes for when I change something and what I changed.

    It is kind of an old method of version control but it works for me.

    Dan

    If only I could snap my figures and have all the correct indexes apear and the buffer clean and.... Start day dream here.

Viewing 2 posts - 1 through 1 (of 1 total)

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