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 Name, Description FROM fn_helpcollations() |
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 Name, Description FROM fn_helpcollations() WHERE Name like '%bin2%' |
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
# Run Install-Module -Name SqlServer if module is not present on your system | |
Import-Module SqlServer | |
# Set up connection and database SMO objects | |
$password = "<replace with your password>" | |
$sqlConnectionString = "Data Source=70-473-sql-server.database.windows.net;Initial Catalog=AZ_DB_TEST_BASIC;User ID=Mikhail;Password=$password;MultipleActiveResultSets=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Packet Size=4096;Application Name=`"Microsoft SQL Server Management Studio`"" | |
$smoDatabase = Get-SqlDatabase -ConnectionString $sqlConnectionString | |
# If your encryption changes involve keys in Azure Key Vault, uncomment one of the lines below in order to authenticate: | |
# * Prompt for a username and 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
REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters\ /v AllowEncryptionOracle /t REG_DWORD /d 2 |
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
#Load SharePoint PS Module (if not already loaded) | |
$ver = $host | select version | |
if ($ver.Version.Major -gt 1) {$host.Runspace.ThreadOptions = "ReuseThread"} | |
if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) | |
{ | |
Add-PSSnapin "Microsoft.SharePoint.PowerShell" | |
} |
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
-- Get Process Name by Process Instance ID | |
USE K2 -- Adjust your K2 DB name if necessarry | |
DECLARE @PInstID INT | |
DECLARE @ProcID INT | |
SET @PInstID=1 -- Specify your Process Instance ID Here | |
SET @ProcID = (SELECT ProcID FROM Server.ProcInst WHERE ID=@PInstID) | |
SELECT [Name] FROM Server.[ProcSet] WHERE ID = (SELECT ProcSetID FROM Server.[Proc] WHERE ID=@ProcID) |
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
# ADDS Domain quick check | |
# v.1.0 | |
# Mikhail Rodionov - mikerodionov.com | |
Function ADDSCHK () | |
{ | |
$pc=hostname | |
$PC_OU=(Get-ADComputer $pc).DistinguishedName | |
#Get total number of users (enabled and disabled) | |
$TNU=(Get-ADUser -filter *).count |
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
USE K2 | |
DECLARE @SI_NAME varchar(128) | |
--Specify you Service Instance Display Name below | |
SET @SI_NAME='Oracle%' | |
SELECT ServiceTypeXML | |
FROM [K2].[SmartBroker].[ServiceType] | |
WHERE ServiceTypeXML.value('(servicetype/metadata/display/displayname)[1]', 'varchar(max)') | |
LIKE @SI_NAME; | |
GO |
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
UPDATE [K2].[SmartBroker].[ServiceType] | |
SET ServiceTypeXML = | |
' | |
<servicetype name="SourceCode.SmartObjects.Services.Oracle.OracleService" guid="c599f60f-7640-4d64-8103-38d60b7c6b61"> | |
<metadata> | |
<display> | |
<displayname>Oracle Service</displayname> | |
<description /> | |
</display> | |
</metadata> |
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 * | |
FROM [K2].[SmartBroker].[ServiceType] | |
WHERE ServiceTypeXML.value('(servicetype/config/assembly/@path)[1]', 'varchar(max)') | |
LIKE 'D:\%'; | |
GO |