One of my coworkers needs to programmatically ask a bunch of different SQL
Servers for the default location of where they are configured to put .BAK
files.
Peace & happy computing,
Mike Labosh, MCSD
"When you kill a man, you're a murderer.
Kill many, and you're a conqueror.
Kill them all and you're a god." -- Dave MustaneMike,
Use the BackupDirectory key.
HTH
Jerry
"Mike Labosh" <mlabosh@.hotmail.com> wrote in message
news:ebE3t010FHA.404@.TK2MSFTNGP09.phx.gbl...
> One of my coworkers needs to programmatically ask a bunch of different SQL
> Servers for the default location of where they are configured to put .BAK
> files.
> --
> Peace & happy computing,
> Mike Labosh, MCSD
> "When you kill a man, you're a murderer.
> Kill many, and you're a conqueror.
> Kill them all and you're a god." -- Dave Mustane
>|||> Use the BackupDirectory key.
I'm not too sure what you mean, but if you mean a Windows Registry Key,
that's no good in this example. He's writing an automated backup utility
that will tell many different SQL Servers via ODBC to backup their
databases. Since his application does not run on the actual SQL servers, he
doesn't have access to their registries.
Peace & happy computing,
Mike Labosh, MCSD
"When you kill a man, you're a murderer.
Kill many, and you're a conqueror.
Kill them all and you're a god." -- Dave Mustane|||Mike,
Ok...try the SQL-DMO Backup Directory Property (in SQL BOL).
HTH
Jerry
"Mike Labosh" <mlabosh@.hotmail.com> wrote in message
news:OeYlsB20FHA.2888@.TK2MSFTNGP10.phx.gbl...
> I'm not too sure what you mean, but if you mean a Windows Registry Key,
> that's no good in this example. He's writing an automated backup utility
> that will tell many different SQL Servers via ODBC to backup their
> databases. Since his application does not run on the actual SQL servers,
> he doesn't have access to their registries.
> --
> Peace & happy computing,
> Mike Labosh, MCSD
> "When you kill a man, you're a murderer.
> Kill many, and you're a conqueror.
> Kill them all and you're a god." -- Dave Mustane
>|||I agree that using DMO is the way to go. In case you absolutely can't do tha
t, you can use the
*unsupported and undocumented* xp_instance_regread extended proc. All usual
warnings apply:
http://www.sqldev.net/misc/SQLLocationFunctions.htm
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
news:%23aVzyR20FHA.2964@.TK2MSFTNGP10.phx.gbl...
> Mike,
> Ok...try the SQL-DMO Backup Directory Property (in SQL BOL).
> HTH
> Jerry
> "Mike Labosh" <mlabosh@.hotmail.com> wrote in message news:OeYlsB20FHA.2888
@.TK2MSFTNGP10.phx.gbl...
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment