Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Create a Stored Proc DB's On server

$
0
0

HI

I have 20 sql servers each server will have near about 50 database , I want to create a Stored proc on each databases can some one help to write a loop and create sample proc on db's

 @proc = 'CREATE PROC TEST111dddssww as begin  print ''1'' end '

I want @proc to be Exec (@proc) on all databases..

I can.t use SP_MSforeachDB because I have some other validations before I execute . please help me . Thanks

Regards,

Ram


ramakrishna


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>