HI ,
Can some one help me on below requirement
I want to execute a powershell script from my desktop which reads all other 5sql servers data and dump to a table.
my desktop has sql server ( sql instance name: insta1, database name: testdb, table name: filesize)
5 sql server instances in text file( C:\servers.txt) -- 2000 and 2008 servers are exists
we need to run the below query and get the file size details on
if it is sql 2000 then query will be "select name,filename,size,maxsizefrommaster..sysaltfileswheredbid notin(1,2,3,4)
else: query will be "select name,physical_name,size,max_sizefrommaster.sys.master_files
so the above results needs to be loaded into insta1.testdb.filesize table.
Please help me on above requirement.
Thanks in advance.
From there I can send the results by dbsendmail .( I can work from this part)
-