Profile cover photo
Profile photo
Richard Armstrong-Finnerty
2 followers
2 followers
About
Richard's posts

Post has attachment
'Agent XPS' component is turned off
If you see a pop-up like this: Then you need to activate the SQL Agent. There are 2 ways to do this: 1. Run the SQL server Configuration Manager, right-click the SQL Server Agent, and click Start: 2. Use T-SQL:

Post has attachment
SSIS Variable Date with Month Name
(DT_WSTR, 4)DATEPART("YYYY", GETDATE()) +"-"+ (DT_WSTR,3) ( DATEPART("M", GETDATE()) ==  1 ? "JAN" : DATEPART("M", GETDATE()) ==  2 ? "FEB" : DATEPART("M", GETDATE()) ==  3 ? "MAR" : DATEPART("M", GETDATE()) ==  4 ? "APR" : DATEPART("M", GETDATE()) ==  5 ? ...

Post has attachment
Extract User, Role Membership & Object Permissions for All Users in All Databases
CREATE procedure [dbo].[gen_DropUsersWithDDL] AS BEGIN /********************************************************************************************* * Extract Create User, Role Membership and Object Permissions for all users in all databases. * * Set out...

Post has attachment
Powershell Search and Replace Text
# Search recursively for all files where name like "a*.txt", foreach replace text "aaa" with "ZZZ". gci -recurse | ?{$.name -like "a*.txt"} | %{(gc $) -replace 'aaa', 'ZZZZZ' | sc $_} # or $files = gci -Recurse "a*.txt" foreach ($filename in $files) { (gc...

Post has attachment
Richard Armstrong-Finnerty commented on a post on Blogger.
Excellent DMV guide.

Post has attachment
Availability Replica in Resolving State After Failover
Problem :
You failover an availability group, and the new Primary replica is in the Resolving state: In the SQL Server error log, you will also also see a dump file is created: Solution : Check that Filestream is either enabled or disabled in all replica in...

Post has attachment
Excellent Zappa Solo


Post has attachment
DMVs and DMFs Wallchart
Very detailed chart describing interrelationships of DMVs and DMFs here .

Post has attachment
Extent is marked allocated in the GAM, but no SGAM or IAM has allocated it.
Was seeing this on MSSQL 2012 SP2: Extent (1:47721) in database ID 8 is marked allocated in the GAM, but no SGAM or IAM has allocated it. To fix: Put database in single user mode, then: DBCC CHECKDB (mydb,REPAIR_ALLOW_DATA_LOSS)  Exact cause unknown, but ha...

Post has attachment
DBCC IND - No Output
DBCC IND will not produce any results, no matter how many times you run it, and no matter how many times you set/unset/set DBCC TRACEON 3604 if the table is empty ! e.g. use master; create database dummy; use dummy; create table table_1 (col1 int); dbcc tra...
Wait while more posts are being loaded