October 10, 2019 at 9:13 am
$LDS = "Data Source="
$RDS = ";Initial Catalog="
$OldString = "AAAAAAAAAA"
$NewString = "ZZZZZZZZZZ"
$MyFolder = "C:\SSIS"
$files = get-childitem "$MyFolder" *.dtsx | Where-Object {!($_.PSIsContainer)}
foreach ($file in $files)
{
(Get-Content $file.FullName) | % {$_ -replace "($LDS) ($OldString)($RDS)",
"'$1$NewString'$3"} | Set-Content $file.FullName;
}
I have many SSIS packages where the source server name needs to be changed
from AAAAAAAAAA to ZZZZZZZZZZ.
How can I do that?
I have all the SSIS packages in a single folder.
The above piece is throwing error - bad numeric constant.
Assistance is appreciated.
October 10, 2019 at 6:27 pm
Not sure I understand what you are trying to do - but it shouldn't be necessary. If you are using Project Deployment to an Integration Services Catalog you can modify the data source(s) in the catalog or the agent job.
You can (and probably should) create shared data sources in your project so all packages reference the shared data source - this way you only have to make the change one time and all packages in the project will use the new source.
If you are still using package deployment to a file location or package store - I would highly recommend moving everything into projects and using project deployment.
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply