Luis Cazares (10/19/2016)
Brandie Tarvin (10/19/2016)
Have you tried renaming the folders to use underlines instead of hyphens?I think the hyphens are the problem. That powershell might see them literally as a switch "notifier" kind of thing. Alternatively, see if you can escape the hyphen.
EDIT: Or better yet, create a share with no hyphens in it. See if that works.
I tried to escape the hyphens using the grave accent(`) without luck. I tried using single quotes, double quotes and combinations of both without luck.
I don't want to create a new path because I might need to ask that the git repositories are created again or renamed. I believe that this might be too complex.
And a share won't work for that?
Let us know if Magoo's suggestion works. The only thing I found with hyphenated folders on Google had to do with issues at the server, not with the names.
Oh Magoo, you've done it again!
That worked perfectly. Now I wonder what would they prefer, if the Powershell option or the bat file option.
Here's the ps1 final script .
param($dtsx = '', $RallyID = '', $MainScriptFolder = '')
function GetDtExecPath {
$DtsPath = (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\120\DTS\Setup').SQLPath;
$DtExecPath = (Resolve-Path "$DtsPath\Binn\DTExec.exe");
$DtExecPath;
}
function GetDtExecPropertyPathValue() {
param(
$PropertyPath = '',
$Value = ''
);
$outPropPath = "\Package.Variables[User::" + $PropertyPath + "].Properties[Value]"
"$outPropPath;" + '"' + $Value + '"';
}
function RunPackage {
param(
$DtExecPath = (GetDtExecPath),
$File = 'test.dtsx'
);
$Params = "/FILE " + [CHAR]34 + $File + [CHAR]34;
for($i = 0; $i -lt $Args.Length; $i += 2) {
$PropertyPath = $Args[$i].SubString(1);
$Value = $Args[$i+1];
$PropertyPathValue = GetDtExecPropertyPathValue -PropertyPath $PropertyPath -Value $Value;
$Params += " /SET $PropertyPathValue";
}
$FullCommand = '& "' + $DtExecPath + '" --% ' + $Params;
Invoke-Expression $FullCommand
}
RunPackage -File $dtsx -prmMainScriptFolder $MainScriptFolder -prmRallyID $RallyID
Thank you for all your help.
Luis Cazares (10/20/2016)
Oh Magoo, you've done it again!
Heh... glad I'm not the only one that says that.
--Jeff Moden
Change is inevitable... Change for the better is not.
I was wondering whether all this complexity is worth it...just to run a dtsx? But I'm not a DBA, so I assume this is a small part of a bigger development...
MM
select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);
mister.magoo (10/20/2016)
I was wondering whether all this complexity is worth it...just to run a dtsx? But I'm not a DBA, so I assume this is a small part of a bigger development...
I'm not sure it's worth it either, but it wasn't my decision. We just need a command line option to run the package from a third party tool and they thought that using PowerShell was the way to go. The whole time, I believed that using the basic command shell was enough and it was.
Luis Cazares (10/20/2016)
mister.magoo (10/20/2016)
I was wondering whether all this complexity is worth it...just to run a dtsx? But I'm not a DBA, so I assume this is a small part of a bigger development...I'm not sure it's worth it either, but it wasn't my decision.
GAH. I hate it when that happens.
Brandie Tarvin (10/20/2016)
Luis Cazares (10/20/2016)
mister.magoo (10/20/2016)
I was wondering whether all this complexity is worth it...just to run a dtsx? But I'm not a DBA, so I assume this is a small part of a bigger development...I'm not sure it's worth it either, but it wasn't my decision.
GAH. I hate it when that happens.
That's half the fun (or the learning).
what do you mean????? "The code below clears the Local Servers Group completely (be aware of this),"???
can I run it without this clearing of the LSG????
'dir -Recurse | Remove-Item -force; #clean up everything' + CHAR(13) + CHAR(10)
Local Servers Group??? that's on AD as a GPO, or Group or Container right???
Thanks
trangen1 (10/25/2016)
what do you mean????? "The code below clears the Local Servers Group completely (be aware of this),"???can I run it without this clearing of the LSG????
'dir -Recurse | Remove-Item -force; #clean up everything' + CHAR(13) + CHAR(10)
Local Servers Group??? that's on AD as a GPO, or Group or Container right???
Thanks
Did you post this in the wrong thread?
Brandie Tarvin (10/25/2016)
trangen1 (10/25/2016)
what do you mean????? "The code below clears the Local Servers Group completely (be aware of this),"???can I run it without this clearing of the LSG????
'dir -Recurse | Remove-Item -force; #clean up everything' + CHAR(13) + CHAR(10)
Local Servers Group??? that's on AD as a GPO, or Group or Container right???
Thanks
Did you post this in the wrong thread?
That might be the case, the quote belongs to the article posted today and the thread for the article can be found here: http://www.sqlservercentral.com/Forums/Topic1828919-3838-1.aspx
Viewing 15 posts - 1 through 15 (of 15 total)
You must be logged in to reply to this topic. Login to reply