SQL server root Directory -


How do I delete the root directory in the root server by using SQL query ???

Thank you.

have been back for the last SQL client, which is not exactly what you need. The following works in SQL 2005, 2008 and 2008 R2.

  declared in @ Skyueldetatrut varchar (256) exec master..xp_instance_regread @ rootkey = 'HKEY_LOCAL_MACHINE', @ key = 'software Microsoft' MSSQLServer \ Setup ', @ value_name =' SQLDataRoot ', @ value = @ SQLDataRoot output  

undocumented xp_instance_regread to query SQLDataRoot variable for the SQL document correctly looks in the registry - see you way above question he found in the registry Not the right path. MXQLServer changes with XP version and example name. For example, in the key

  Software \ Microsoft \ Microsoft SQL Server \ MSSQL10_50.Inst2 \ Setup  

This situation is my example, I SQL 2008 R2 is running (MSSULL turns into 10_50) with the instance name of Instase 2.


Comments