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 | |
OPEN SYMMETRIC KEY [SCSSOKey] | |
DECRYPTION BY CERTIFICATE SCHostServerCert; | |
GO | |
DECLARE @ED varbinary(max) | |
SELECT @ED=encryptbykey(key_guid('SCSSOKey'), 'WeAreEncryptingThisText' ) | |
PRINT @ED | |
SELECT @ED | |
SELECT CONVERT(VARCHAR, DecryptByKey(@ED)) | |
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
# You first need to get PID of SQL Server process - sqlservr.exe with this command: | |
tasklist|find /I "sql" | |
# It will give you output similar to this one: | |
# sqlwriter.exe 2168 Services 0 7,804 K | |
# sqlceip.exe 2768 Services 0 57,876 K | |
# sqlservr.exe 4620 Services 0 298,496 K | |
# sqlbrowser.exe 3488 Services 0 4,752 K | |
# Take a note of PID for sqlservr.exe and use it to check ports which this process is listening | |
netstat -na | find "4620" |
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
$count=0 | |
$path="OU=Departments,DC=Denallix,DC=com" | |
$group_name_prefix="TestGroup" | |
while($count -ne 10){ | |
$count=$count+1 | |
New-ADGroup -Path $path -Name $group_name_prefix$count -GroupScope Global -GroupCategory Security | |
echo "Creating group: " $group_name_prefix$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
# Code sample for this can be found in K2 Developer Reference | |
# 4.7: | |
# https://help.k2.com/onlinehelp/k2blackpearl/devref/4.7/default.htm#using_the_windows_powershell_to_start_a_k2_process.html | |
# 5.2: | |
# https://help.k2.com/onlinehelp/k2five/devref/5.2/default.htm#runtime/wf-client/ps-startprocess.html | |
$i = 0 | |
$NumberOfInstancesToStart = 100000 | |
$ProjectName = 'K2Project' | |
$WorkflowName = 'Process' |
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 [TEST_DB] | |
--Example 1- Insert JPG file into FileStream column: | |
INSERT TestTable(DocumentNumber, DocumentBody) | |
VALUES | |
(1, (SELECT * FROM OPENROWSET (BULK 'C:\Images\Sample_Image.jpg', SINGLE_BLOB) document)); | |
--Example 2 - Convert text into binary format: | |
INSERT INTO TestTable(DocumentNumber, DocumentBody) | |
VALUES (2, CONVERT(VARBINARY(MAX), 'Hello World')) |
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
DECLARE @count int | |
SET @count = 1 | |
WHILE @count <= 200 | |
BEGIN | |
INSERT INTO [K2].[dbo].[StringSmO] values ('Subservice To Be Selected in Drop Down Long Name!') | |
SET @count = @count + 1 | |
END |
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 owner, object_name, object_type | |
from ALL_OBJECTS | |
where object_name = 'YOUR_OBJECT_NAME' |
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 segment_name, segment_type, bytes/1024/1024 MB | |
FROM user_segments | |
WHERE segment_type='TABLE' AND segment_name='YOUR_TABLE_NAME' |
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
#Open PS session to one of your domain controllers if necessary: | |
Enter-PSSession -ComputerName cndrm-dc01 -Credential DOMAIN\administrator | |
#Select IsGlobalCatalog propery for your DCs: | |
Get-ADDomainController -Filter * | Select-Object -Property Name,IsGlobalCatalog | Format-Table -AutoSize |