Q&A archive

Stack Exchange Answers

Questions and answers Andy Mallon contributed across the Stack Exchange network.

DBA Stack Exchange

Users in SQL Server cluster

Question I have created a 2012 WFC and SQL Server 2014 is clustered on it. The cluster works as expected but have a question on Users: I added a windows domain group to the cluster as sysadmin. When the user tries to log into SQL on the active server the …

Read answer

DBA Stack Exchange

ReportServerTempDB in AlwaysOn Availability group

Question ReportserverTempdb logfile is 6TB in size and growing and I need help. I am supporting a huge reporting server farm and the client wants reporting services to be in AlawysON Availability group(AAG) and we configured reportserver and …

Read answer

DBA Stack Exchange

Exclude All Matching Rows

Question I have a table that has a unique ID, name, email, and some other fields. I want to match this table against another table on email, but sometimes emails are shared. The unique ID is not shared among tables, but I will input the ID into the other …

Read answer

DBA Stack Exchange

SQL Server: How to export database with linked servers

Question I'm a web developer and I want to export a database to work on it in my local machine. I'm using generate script with data. the script is generated but without the linked servers used by some Views. Is their a way to generate a full script with …

Read answer

DBA Stack Exchange

Reduce MDF file size

Question I am working with a 500 GB SQL Server database. I need to reduce the size of the database data file after removing a large amount (50%) of the data. I tried re indexing, it's good the database has de-fragmented. But the DB size is not reduced.

Read answer

DBA Stack Exchange

Using DateTime Variable In Where Clause

Question I am trying to pull all data where a sale date is >= to a certain datetime. When I execute my query I get an error of: Msg 241, Level 16, State 1, Line 15 Conversion failed when converting date and/or time from character string.

Read answer

DBA Stack Exchange

How to configure SSIS in SQL Server AlwaysOn

Question I have AlwaysOn Availability Group setup for my SQL Server. Now I would like to configure SSIS. How do I do it? Below link provides some information but since I am not DBA it's difficult to understand this article:

Read answer

DBA Stack Exchange

Why is the MSDB database TRUSTWORTHY?

Question The TRUSTWORTHY setting can be rather dangerous if you aren't careful and except for specific circumstances the recommendation is to keep it turned off. However by default the MSDB database has TRUSTWORHTY set ON by default. I'm curious why?

Read answer

DBA Stack Exchange

Windows cluster failed over, but SQL instances didn't move

Question I recently inherited a SQL Cluster (2008R2) which for the most part behaves itself impeccably. The windows cluster is made up of two nodes running Active/Passive, Node1 and Node2 are dedicated blades in two different data centers. There are 3 SQL …

Read answer

DBA Stack Exchange

How to pass SSRS params into a URL

Question I have Native SSRS configured on a 2012 instance (11.0.2100). I have two reports with images that act as buttons to toggle between the chart report and the detail report. I want to configure the action URLs to dynamically pass in parameters when …

Read answer

DBA Stack Exchange

Error 3203 restoring SQL Server backup: The data is invalid

Question I am trying to restore a .bak file (backup taken on SQL Server 2008 R2, compatibility level 100). I am restoring the backup on SQL Server 2012 edition. I get the below error. Unfortunately the original DB from where the DB was backed up is no longer …

Read answer

Stack Overflow

Restoring a SQL Server 2012 database in high availability

Question I have a database which is in always-on high availability mode synchronized with another database on a different instance. How can I restore from a .bak file into the primary database using T-SQL? I’m new to high availability and I’ve been advised …

Read answer

DBA Stack Exchange

SQL Server 2012 always-on backup, full vs copy-only

Question I need a quick clarification on copy-only backup vs full backup as it pertains to transaction log numbering and restore if required. I have SQL Server 2012 setup with always on for multiple databases. The availability groups are setup with preferred …

Read answer

DBA Stack Exchange

some SQL Server MSX targets show as Normal, Blocked

Question I've centralized my farm's jobs in MSX, covering about 70 instances of SQL Server. Seemingly randomly, at least once a week, several instances will stop accepting instructions. Within the MSX window Manage Target Servers, instead of all instances …

Read answer