https://support.microsoft.com/en-us/help/918992/how-to-transfer-logins-and-passwords-between-instances-of-sql-server
Read moreCategory Archives: SQL Server
SSRS Find Reports using a Stored Procedure
Find SSRS report designs that reference a specific stored procedure: SELECT CAST(CAST(content AS VARBINARY(MAX)) AS XML), Path, Name, CreationDate, ModifiedDate FROM dbo.Catalog where cast(CAST(CAST(content AS VARBINARY(MAX)) AS XML) as varchar(max)) like ‘%spRptPMWIP6%’
Read moreCreate views for all the tables in a Database with Column Names not *
SELECT ‘IF EXISTS(SELECT 1 FROM sys.objects WHERE name = ”vw’ + t.name + ”’ AND type = ”V”) BEGIN DROP VIEW [v_’ + t.name + ‘] END CREATE VIEW [vw’ + t.name + N] AS SELECT ‘ + STUFF( (SELECT N’,[‘ + c.name+’]’ FROM sys.columns AS c WHERE c.OBJECT_ID = t.OBJECT_ID ORDER BY column_id FOR […]
Read moreSSRS Logs
Need to know the stats of what is going on in SSRS. Query ExecutionLog, ExecutionLog2, or ExecutionLog3 and get the time for data retrieval, processing, and time rendering.
Read moreFix User permissions on Restore Databases
When a the User at the database level has no login, but there is one in the database. exec sp_change_users_login “auto_fix”, “cw_reports”;
Read moreSQL Server Backup and Maintenance Scripts
https://ola.hallengren.com/sql-server-backup.html
Read moreSQL Management Studio – Windows Authentication – different domain
Sometimes you need to use windows authentication to SQL using SQL Management Studio, but the your domain and or username is different than who you are currently logged into you machine as. In that case run the following command from a Command Prompt. runas /netonly /user:domainusername “C:Program Files (x86)Microsoft SQL Server100ToolsBinnVSShellCommon7IDESsms.exe”
Read more