This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$dir = 'C:\svn\SQL' | |
$files = Get-ChildItem $dir -Filter *.sql | |
Foreach ($file in $files) { | |
$old = $file.FullName | |
$new = $old.Replace("_OldSchema_", "_NewSchema_") | |
Rename-Item -path $old -NewName $new | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
([xml](svn log -v --xml)).log.logentry | % { | |
$entry = $_; | |
$_.paths.path | foreach { | |
$obj = 1 | select -Property Revision,Author,Date,Message,Action,FilePath; | |
$obj.Revision = [int]$entry.Revision; | |
$obj.Author = $entry.Author; | |
$obj.Date = Get-Date $entry.Date; | |
$obj.Message = $entry.msg; | |
$obj.Action = $_.action; | |
$obj.FilePath = $_.InnerText; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$webserver = "localhost" | |
$environment = "dev" | |
$username = "user" | |
$password = "pass" | |
$url = 'http://' + $webserver + '/' + $enviroment + '_web/report/meta' | |
Function ClearCache($type) | |
{ | |
return Invoke-WebRequest -Uri $url/$type -Method GET -Headers @{"Authorization" = "Basic "+[System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($username+":"+$password ))} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$dir = "C:\SVN\SQL" | |
$files = Get-ChildItem $dir -Filter *.sql | |
Foreach ($file in $files) { | |
(Get-Content $file.FullName).replace('[ETL_Run_ID] [int]','[ETL_Run_ID] [smallint]') | Set-Content $file.FullName | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
names.NAME as 'ReportName' | |
,packageNames.NAME as 'PackageName' | |
,convert(nvarchar(512),reportpath.PATHS) as 'ReportPath' | |
from | |
CMOBJNAMES names | |
inner join cmrefnoord1 ref on | |
names.CMID = ref.CMID | |
inner join CMOBJNAMES packageNames on | |
packageNames.CMID = ref.REFCMID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
CASE | |
WHEN rr.[COGIPF_REPORTNAME] = 'null' THEN 'Unsaved report' | |
WHEN rr.[COGIPF_REPORTNAME] = '' THEN 'Unsaved report' | |
WHEN rr.[COGIPF_REPORTNAME] IS NULL THEN 'Unsaved report' | |
WHEN rr.COGIPF_REPORTNAME = 'adHocReport' THEN 'Ad-Hoc' | |
WHEN SUBSTRING(rr.[COGIPF_REPORTNAME], 1, 10) = 'reportView' then (SUBSTRING (rr.[COGIPF_REPORTNAME], 19, LEN (rr.[COGIPF_REPORTNAME]) - 20)) | |
WHEN SUBSTRING(rr.[COGIPF_REPORTNAME], 1, 6) = 'report' then (SUBSTRING (rr.[COGIPF_REPORTNAME], 15, LEN (rr.[COGIPF_REPORTNAME]) - 16)) | |
WHEN (SUBSTRING(rr.[COGIPF_REPORTNAME], 1, 5) = 'query') then (SUBSTRING (rr.[COGIPF_REPORTNAME], 14, LEN (rr.[COGIPF_REPORTNAME]) - 15 )) | |
ELSE 'Unsaved report' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
CASE | |
WHEN eq.[COGIPF_PACKAGE] = '' THEN ' ' | |
WHEN eq.[COGIPF_PACKAGE] = 'null' THEN ' ' | |
WHEN CHARINDEX('package', eq.[COGIPF_PACKAGE]) >0 THEN | |
(SUBSTRING (eq.[COGIPF_PACKAGE], (CHARINDEX('package', eq.[COGIPF_PACKAGE]) +15), (CHARINDEX(']', (SUBSTRING (eq.[COGIPF_PACKAGE], (CHARINDEX('package', eq.[COGIPF_PACKAGE]) +17), 500)))))) | |
ELSE (SUBSTRING (eq.[COGIPF_PACKAGE], 1, LEN(eq.[COGIPF_PACKAGE]))) | |
END AS [PACKAGE] | |
,eq.[COGIPF_TARGET_TYPE] | |
,ul.[COGIPF_USERID] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
namespace BulkRename | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string inputDir = Properties.Settings.Default.InputDirectory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exec sims.db_p_reset_sysman_password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'' | |
' Name: UpdateS3AgentDS.vbs | |
' | |
' Description: | |
' Updates your SOLUS3 Agent config with the new Deployment server | |
' | |
' Version: 1.1 | |
' | |
' Usage: UpdateS3AgentDS.vbs <oldservername> <newservername> | |
' |
OlderNewer