SQL Alias PowerShell script

Hello everyone, this time I am going to show the "Server Alias". I have been asked by one of my customers to write down a PowerShell script to add an SQL Alias as part of an automatic installation. The Alias is stored in the registry at this path:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo The alias is configured via the configuration…

2

Sys.Configuration

A while ago, I was asked by customer how to tell if an instance parameter is dynamic or rather static (which requires me to restart the instance service). Parameters like fill factor (%) or max degree of parallelism. Does this parameter exist in the short list or do I need the show advance option? So…

0

The scenario of a missing SA password:

You are the senior DBA of your organization, responsible for all the databases that hold the critical info. In order to secure the environment and the databases, you performed the next recommended steps: 1) Remove all built-in admin account from SQL Server logins. 2) Remove all users from SYSADMIN server role except SA (assuming you…

1

Did you know , Dead locks can be track from the System Health in SQL 2012

  Before using SQL server 2008, in order to capture a deadlock, we had to create a server side/profiler trace or use trace flags 1204, 1222. If you were lucky enough to work with SQL 2008/2008R2 you could have tried using XEvents (which were introduced in SQL 2008). SQL Server 2012 added a new feature,…

2

Where is the Help in SQL 2012? F1

In SQL 2012 the BOL (Books Online) are only located on the internet. When you press F1, you are redirected to the web, so what can we do in a closed environment, where my production server is not connected to the internet and I need the F1? Checking for help regarding the sys.dm_exec_cursors system table…

0

Check your SQL – default Trace

Every installation of SQL has a default trace. The default trace was introduced in SQL 2005, It is the same trace that we know from the profiler or server but it is a preconfigured trace that is enabled as default. The default trace create five *.TRC file that are been recycle when they arrive to…

5

Target Recovery Time - new database option in SQL Server 2012

  Recently I’ve created a new database on my SQL Server 2012 instance. I reviewed the new database options before creating. One of the options that I’d like to share today is “Target Recovery Time” in seconds or TARGET_RECOVERY_TIME. Target Recovery Time is new in SQL Server 2012. This option helps us to control checkpoints…


Startup parameters in SQL 2012.

SQL 2012 brings us new options and cool features, one of these features is the startup parameters.On previous versions; when we needed to update a startup parameter for the database, we needed to go to the configuration manager and then in under the SQL server service we were able to add in a line with…

0

Recovery models

Recovery model is our way to instruct SQL Server how to maintain the log file. We have 3 recovery models in SQL Server – SIMPLE, BULK_LOGGED and FULL. We’ll review them and describe the differences between them. SIMPLE recovery model When the database recovery model is set to SIMPLE, every DML and DDL statement is…


Four Tips for SQL tuning for SharePoint Part 2 - Shrink DB

SharePoint DB’s – To shrink or not to shrink the data file,this is the question: SQL Server provides you the ability to shrink the DB orshrink the files [MDF, NDF & LDF]. Shrinking the log file/LDF is quite different from shrinkingthe data file/MDF, NDF. Usually we do not have to shrink the log file (as…

5