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
$dbName="SAMPLE" | |
$server="not.my.localhost" | |
#Define connection string for the database | |
$cn = new-object system.data.OleDb.OleDbConnection("server=$($server);Provider=IBMDADB2;DSN=$($dbName);trusted_connection=true;"); | |
#Define data set for first query | |
$ds = new-object "System.Data.DataSet" "ds" | |
#Define query to run | |
$q = "select * from hello_world" | |
# Define data object given the specific query and connection 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
#Requires -Version 5.0 | |
#------------------------------------------------------------------------ | |
# Source File Information (DO NOT MODIFY) | |
# Source ID: 8967ce63-8512-4998-b597-b65331d6a9f6 | |
# Source File: subscriptionExporter.psf | |
#------------------------------------------------------------------------ | |
#region File Recovery Data (DO NOT MODIFY) | |
<#RecoveryData: | |
d00BAB+LCAAAAAAABACMu9eOs0CbLnreUt/Dr/+U0ZhosDQzEjlHk8/IGUwy4ep39QTtJe0tzfpa | |
beHPVLnqDU8A+t+cIpu+xXJxyZb8AxyszTT++z/Rf0X++R+/P//4x7+ZS1M1Y9ILTV8YyVD8x7qn |
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.Collections.Generic; | |
using System.Management.Automation.Language; | |
public class ScriptExtent : IScriptExtent | |
{ | |
private readonly IScriptPosition _start; | |
private readonly IScriptPosition _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
# SQLReporting.psm1 Version 0.9 | |
# Written by Trond Hindenes | |
#http://hindenes.com/powershell/SQLReporting.psm1 | |
#Import-Module Pester | |
#http://stackoverflow.com/questions/9178685/change-datasource-of-ssrs-report-with-powershell | |
<# | |
.SYNOPSIS | |
Gets SSRS instances on ComputerName | |
.DESCRIPTION |
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
param | |
( | |
[String] [Parameter(Mandatory)] | |
$SolutionFile, | |
#this is the evironment that is in the Solution config to read where things need to go (TEST/DEV/QA/Prodution) | |
#for example - C:\tfs2013\Test Automated Deployment Sharepoint.rptproj | |
[string] [Parameter(Mandatory)] $Environment, | |
#this is the name of the Datasource as it exists in Sharepoint without the .rsds extension | |
[string] [Parameter(Mandatory)] $DataSource, | |
#This is the connection string that will be set for the report data source. |
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
<# This is the code used to tell you | |
which databases are using up the RAM on | |
your SQL Server is great information to know | |
Queries are from https://www.mssqltips.com/sqlservertip/2393/determine-sql-server-memory-use-by-database-and-object/ #> | |
$SQLInstance = 'localhost\SQL2016' | |
Invoke-Sqlcmd -ServerInstance $SQLInstance -Database master -Query " | |
DECLARE @total_buffer INT; | |
SELECT @total_buffer = cntr_value |
NewerOlder