MSSQL Tips: Tip #32 – Resolving SQL Server Master Data Services (MDS) Patching Errors

When you patch a server hosting the MDS Web Application with an SQL Server update and if you have not completed the upgrade sequence users may get this error in the MDS Web Application on client side.

Check out details in the following MSSQL Tip: “Resolving SQL Server Master Data Services (MDS) Patching Errors“.

Check out all of my tips here: http://www.mssqltips.com/sqlserverauthor/94/svetlana-golovko/.

Share

MSSQL Tips: Tip #31 – Install and configure multiple instances of Master Data Services MDS on the same server

Featured

Find out how to install and configure multiple instances of Master Data Services MDS on the same server in my latest MSSQL Tip.

Check out all of my tips here: http://www.mssqltips.com/sqlserverauthor/94/svetlana-golovko/.

Share

MSSQL Tips: Tip #30 – SQL Server 2014 Master Data Services Assigning Administrator Permissions

SQL Server 2014 MDS has a limitation. There could be only one MDS Administrator.

In this tip we have provided some tips and the best practices on granting permissions in MDS.

Please read my latest MSSQL Tip: “SQL Server 2014 Master Data Services Assigning Administrator Permissions“.

Check out all of my tips here: http://www.mssqltips.com/sqlserverauthor/94/svetlana-golovko/.

Share

MSSQL Tips: Tip #29 – SQL Server Database Decommissioning Check List

Featured

Different companies have various requirements and processes for database or database server decommissioning. In this tip we have provided steps that will help you decommission a database and make sure you have a good back-out plan (for example, in case there is a need to bring the database back online). We have also provided scripts that will help you identify dependencies in case there is a need to migrate the database instead of decommissioning.

You may already have a process documented, but this list will help you review most of the dependencies and make sure you are prepared for either a migration or decommissioning.

Please read my latest MSSQL Tip: “SQL Server Database Decommissioning Check List“.

Check out all of my tips here: http://www.mssqltips.com/sqlserverauthor/94/svetlana-golovko/.

Share

MSSQL Tips: Tip #28 – SQL Server Master Data Services (MDS) Versions

SQL Server Master Data Services (MDS) provides versioning for the MDS models, but what are they used for and what can we do with the versions?

Please read my latest MSSQL Tip: “SQL Server Master Data Services (MDS) Versions“.

Check out all of my tips here: http://www.mssqltips.com/sqlserverauthor/94/svetlana-golovko/.

Share

MSSQL Tips: Tip #27 – SQL Server Master Data Services (MDS) Database Restore Steps

Featured

In some cases when you try to restore a Master Dats Services database you can get errors. To complete the restore you may need to perform additional steps.

Please read my latest MSSQL Tip: “SQL Server Master Data Services (MDS) Database Restore Steps“.

Check out all of my tips here: http://www.mssqltips.com/sqlserverauthor/94/svetlana-golovko/.

Share

Q&A: Script for the Job that will shrink the log files for all databases

There was a user question on how to shrink the log files with dynamic SQL (without hard coding databases names). The script is provided below. But first – make sure that you size the log files properly (large enough to grow) and make sure that you backup regularly the log files (or use simple recovery mode). And do not truncate the logs, shrink them just to the size you need. So, if my log files do not usually grow larger than 4 GB I will use the following script:

SET NOCOUNT ON
CREATE table #tran_log_space_usage(
database_name sysname
, log_size_mb float
, log_space_used float
, status int
);
insert into #tran_log_space_usage
exec(‘DBCC SQLPERF ( LOGSPACE )’) ;

delete from #tran_log_space_usage where database_name = ‘Exclude_DB’

EXEC dbo.sp_msforeachdb ‘
DECLARE @log_file VARCHAR(150)
IF (SELECT DB_ID(”?”)) > 4 and (SELECT DATABASEPROPERTY(”?”, ”IsOffline”)) <>1
BEGIN
PRINT ”?”
IF (select log_size_mb as LogSizeMB
from #tran_log_space_usage
where database_name = ”?”) > 4048
BEGIN
select @log_file = name
from [?].sys.database_files where file_id = 2
USE [?]
DBCC SHRINKFILE (@log_file , 4048)
END
PRINT ”/*********************************/”
END’

DROP table #tran_log_space_usage

You can add exceptions for the databases as well (see ‘Exclude_DB’ in script).

Share