Script SQL Server
SSRS - Log of SSRS - Reporting Services
SELECT TOP 1000 [Name] ,[InstanceName] ,[ReportID] ,[UserName] ,[RequestType] ,[Format] ...
PROFILE - Manual SQL Server profile script trace
-- sys.traces shows the existing sql traces on the serverselect * from sys.tracesgo --create a new trace, make sure the @tracefile must NOT exist on the disk yetdeclare @tracefile nvarchar(500) set @tracefile=N'M:\path_sp_Trace'declare @trace_id intdeclare @maxsize bigintdeclare @stoptime...
Export the package to new server - SSIS Migration
use msdb DECLARE @ServerSource varchar(255) = 'source_server_name'DECLARE @ServerDest varchar(255) = 'destination_server_name';WITH CTE_Recursiv (Package,FolderID)AS(SELECT CAST(name as sysname) Package, folderid FROM...
Create the Structure Folders for SSIS Packages - Export
use msdb DECLARE @ServerDest varchar(100) = 'Source_server_name' ;WITH CTE_Recursiv (parentfolder,foldername,folderid,Level) as ...
List the folder SSIS - Packages
Select SP.name, SP.folderid, SPF.parentfolderid, SPF.foldernameFrom dbo.sysssispackages SPLeft Join dbo.sysssispackagefolders SPF On SP.folderid = SPF.folderid
Windows Host File
Windows 8, Windows 7 and Windows Vista use User Account Control (UAC), so Notepad must be run as Administrator.For Windows 81.Press the Windows key.2.Type Notepad in the search field.3.In the search right click Notepad and select Run as administrator.4.In Notepad, open the following...
Function to Separe the Words by Quote
CREATE FUNCTION [dbo].[fnStringQuote] ( @string NVARCHAR(MAX), @delimiter CHAR(1) ) RETURNS NVARCHAR(MAX) BEGIN DECLARE @strPart VARCHAR(255) SET @strPart = char(39)+','+ char(39) SET @string = replace(@string,@delimiter,@strPart) SET...
Split Function to create table separated by comma
CREATE FUNCTION [dbo].[fnSplitString] ( @string NVARCHAR(MAX), @delimiter CHAR(1) ) RETURNS @output TABLE(splitdata NVARCHAR(MAX) ) BEGIN DECLARE @start INT, @end INT SELECT @start = 1, @end = CHARINDEX(@delimiter, @string)...
SSRS - Setting BackgroundColor of Report elements in SSRS - Multiple color
=iif(RowNumber(Nothing) Mod 2, "#EFF2F4", "Transparent")
Habilita uso de leitura sujas - dirty read
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;