Powershell scripting to update 300,000 SQL database instance (db) Property Simultaneously.
Budget: $30 – $250 USD
I have to Create Powershell script to update 300,000 SQL server database instance (db) Property. I have ServerName, DB name and Comments Information. One server has multiple databases and I have multiple servers. I want to create a process which triggers at the same time at different servers and update the database property.
For Ex:(Please see attached documents)
Below table has first three servers (Test1, Test56 and Test200) and multiple databases. So the process should start at the same for all servers and update the multiple databases.
Id ServerId ServerName DBName Comments
1 1 Test1 DB1 DB1 Comments
2 1 Test1 DB2 DB2 Comments
3 2 Test56 DB56 DB56 Comments
4 2 Test56 DB62 DB62 Comments
5 2 Test56 DB67 DB67 Comments
6 2 Test56 DB1 DB1 Comments
7 6 Test200 DB101 DB101 Comments
8 6 Test200 DB102 DB102 Comments
. . . . .
. . . . .
. . . . .
300K 300 Test300000 DB1 DB1 Comments
SQL server Command to see all properties of database:
Executing on Server = Test1 and Database = DB1
select * from sys.extended_properties
To Add Comments in database:
exec sys.sp_addextendedproperty @name=N'App_Info', @value=N' DB1 Comments’
(@Value = Comments)
For Ex:(Please see attached documents)
Below table has first three servers (Test1, Test56 and Test200) and multiple databases. So the process should start at the same for all servers and update the multiple databases.
Id ServerId ServerName DBName Comments
1 1 Test1 DB1 DB1 Comments
2 1 Test1 DB2 DB2 Comments
3 2 Test56 DB56 DB56 Comments
4 2 Test56 DB62 DB62 Comments
5 2 Test56 DB67 DB67 Comments
6 2 Test56 DB1 DB1 Comments
7 6 Test200 DB101 DB101 Comments
8 6 Test200 DB102 DB102 Comments
. . . . .
. . . . .
. . . . .
300K 300 Test300000 DB1 DB1 Comments
SQL server Command to see all properties of database:
Executing on Server = Test1 and Database = DB1
select * from sys.extended_properties
To Add Comments in database:
exec sys.sp_addextendedproperty @name=N'App_Info', @value=N' DB1 Comments’
(@Value = Comments)