|
|
|
|
|
|
|
|
|
Using XP_Instance_RegRead To Get Default Database Path
SQL saves more than a few things to the registry and we can leverage that by reading those settings from TSQL using xp_instance_regread. Easy to use and only one minor quirk to learn, and you'll reading from the registry. Look for the follow up video that demonstrates how to write changes to the registry too.
|
|
|
|
Duration:
|
3
mins
33
secs
|
|
Skill Level:
|
100
|
|
Rating:
|
4.40
out of 5
|
|
Publish Date:
|
March 14, 2010
|
|
|
|
About the Author
|
|
Andy Warren is a software trainer focusing on SQL Server, a member of the PASS Board of Directors, and a principal in this site - SQLShare.com.
|
|
References
|
|
Comments
|
|
Very nice follow-up to previous video. Now it makes sense why the log folder name was not being used by SQL Server -- it was not being declared explicitly by default after installation.
|
|
|
It's amazing how obtuse SQL Server can be.
|
|
|
Very Informative. See this as a way to get the paths for my daily file size runs. So, I can track database sizes.
|
|
John Langston on
3/17/2010
Good way to pick up a quick tip. Could see using the code as part of a "tool box" for getting a quick server look in a new environment.
|
|
Martin Miller on
3/17/2010
Very interesting. Thanks Andy.
|
|
|
Interesting quirk. Thanks.
|
|
|
Question you did not answer: How much of the registry can you query with xp_instance_regread? Only SQL Server information? Please send answer to: DrDianaDee@verizon.net Thanks!
|
Must Be Logged In
|
|
|
|
|