Monday, March 12, 2012

Multiple databases

Hi
I need to run a masive script on multiple databases (about 20)
I only want to execute the script once to then loop and run on all databases
one by one. Is there a clean way of doing so?
Thankscreate a third party application with dot net
put the server name in array of connection string
with in a for-next loop
call each connection string and then
call the execute method
thanks,
Jose de Jesus Jr. Mcp,Mcdba
Data Architect
Sykes Asia (Manila philippines)
MCP #2324787
"Jaco" wrote:

> Hi
> I need to run a masive script on multiple databases (about 20)
> I only want to execute the script once to then loop and run on all databas
es
> one by one. Is there a clean way of doing so?
> Thanks|||Yup
use undocumented sp_MSforeachdb. Google for that
Regards
R.D
"Jose G. de Jesus Jr MCP, MCDBA" wrote:
> create a third party application with dot net
> put the server name in array of connection string
> with in a for-next loop
> call each connection string and then
> call the execute method
> --
> thanks,
> --
> Jose de Jesus Jr. Mcp,Mcdba
> Data Architect
> Sykes Asia (Manila philippines)
> MCP #2324787
>
> "Jaco" wrote:
>|||Thanks.
"R.D" wrote:
> Yup
> use undocumented sp_MSforeachdb. Google for that
> Regards
> R.D
> "Jose G. de Jesus Jr MCP, MCDBA" wrote:
>|||thats
--
thanks,
Jose de Jesus Jr. Mcp,Mcdba
Data Architect
Sykes Asia (Manila philippines)
MCP #2324787
"R.D" wrote:
> Yup
> use undocumented sp_MSforeachdb. Google for that
> Regards
> R.D
> "Jose G. de Jesus Jr MCP, MCDBA" wrote:
>

No comments:

Post a Comment