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
private void SaveCsvAsUTF8(string path) | |
{ | |
try | |
{ | |
string fileContent = File.ReadAllText(path); | |
File.WriteAllText(path, fileContent, System.Text.Encoding.UTF8); | |
} | |
catch (IOException ioexception) | |
{ | |
logger.Log(LogLevel.Error, ioexception); |
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
$ServerName='svr-ehr233'# the server it is on | |
$Database='scc_test' # the name of the database you want to script as objects | |
$DirectoryToSaveTo='C:\temp\scriptout\' # the directory where you want to store them | |
# Load SMO assembly, and if we're running SQL 2008 DLLs load the SMOExtended and SQLWMIManagement libraries | |
$v = [System.Reflection.Assembly]::LoadWithPartialName( 'Microsoft.SqlServer.SMO') | |
if ((($v.FullName.Split(','))[1].Split('='))[1].Split('.')[0] -ne '9') { | |
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SMOExtended') | out-null | |
} | |
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SmoEnum') | out-null | |
set-psdebug -strict # catch a few extra bugs |
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
Function Get-IniContent { | |
<# | |
.Synopsis | |
Gets the content of an INI file | |
.Description | |
Gets the content of an INI file and returns it as a hashtable | |
.Notes | |
Author : Oliver Lipkau <oliver@lipkau.net> |
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 version="1.0"?> | |
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> | |
<xs:element name="bomgar"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element minOccurs="0" maxOccurs="unbounded" name="session"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element minOccurs="0" name="u_session_id" type="xs:string" /> | |
<xs:element minOccurs="0" name="u_session_type" type="xs:string" /> |
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
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output method="xml" version="1.0" encoding="iso-8859-1" indent="yes"/> | |
<xsl:template match="/"> | |
<bomgar> | |
<xsl:for-each select="exit_survey_list/exit_survey"> | |
<session> | |
<u_session_id> | |
<xsl:value-of select="@lsid"/> | |
</u_session_id> | |
<u_session_type> |
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
################ | |
## VARIABLES ## | |
################ | |
$projects = @("Project1", "Project2", "Project3") | |
$dbs = @("Staging", "Warehouse") | |
$dir = $PSScriptRoot | |
################ | |
## LOGIC ## |
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
@[User::Disable] == 0 ? (DT_BOOL)true : (DT_BOOL)false |
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
A[A]1[1] 1AA |
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 | |
* | |
INTO cms_infoobjects7_temp | |
FROM | |
boxicms.cms_infoobjects7 | |
WHERE | |
schedulestatus != 3 | |
OR schedulestatus IS NULL |
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
Adno | UDF | |
---|---|---|
004329 | A1 | |
004441 | A2 | |
003855 | A3 | |
004074 | A4 | |
003856 | A5 | |
004075 | A6 | |
004330 | A7 | |
003969 | A8 | |
003857 | A9 |