Home Forums SQL Server 2008 T-SQL (SS2K8) is it possible to change an instance server properties with T-SQL ? RE: is it possible to change an instance server properties with T-SQL ?

  • WolfgangE (12/31/2012)


    of course you can. Depends on what property or configuration you actually want to change.

    Just to name an example, have a look at "sp_configure".

    Changing the name of a sqlserver can be done using sp_dropserver and sp_addserver. Just google for it.

    Have you learned about the Script button in SSMS? It will help you to review what will actually be run against your instance to ensure you know what is happening as well as help you save the change for later use in production after you have tested the change in a non-produciton environment

    Personally I never apply changes using the GUI's OK button. I may make the configuration change in the GUI but then I will always script it to a query window using the Script button and then Cancel the GUI dialog. Then, after revieing the script generated by the GUI, if I agree with the code and want to make the change I will run the script.

    Get script for every action in SQL Server Management Studio By Atif Shehzad

    Thank you ... very very much

    can i use this to restart SQL service ...like that i Right click on Server name and Choose Restart.i want do this in T-SQL.