• mick miller (6/14/2009)


    USE Server1.master

    USE statement only works for local databases. Try callin' like this:

    EXECUTE Server1.master.sys.sp_msforeachdb 'PRINT ''?'''

    This requires RPC to be enabled.

    Another option would be a hack by using OPENQUERY.

    Flo