Getting the Connection String to an Azure SQL Database using Visual Studio

To get the connection to an Azure SQL Database using Visual Studio, do the following. Log into Visual Studio and select Server Explorer: Choose SQL Server and click Continue: Enter your connection information and click OK: The database will appear under Data Connections. Click Properties: Then, under Properties, you will see the Connection String:  

How to Install SQL Server Management Studio from Download

To install SQL Server Management Studio (SSMS) without installing the full version of SQL Server database, go to https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017 and click the Download link: Open the downloaded file: Click Install: Click Close: SSMS is now installed. Search for it in Windows to open it: The application will load: From here, you can connect to a SQL Server:  

SQL Server Deadlock Troubleshooting with SQL Profiler

One method to troubleshoot SQL Server Deadlocks is to use the SQL Profiler. In SQL Profiler, in a new trace, select the Events Selection tab and expand Locks: Select the Deadlock graph: Run the code that causes a deadlock. In profiler, you will now see a line for the Deadlock graph. Selecting it will show the graph with the process that succeeded and did not succeed: Hovering over the graph … Continue reading SQL Server Deadlock Troubleshooting with SQL Profiler

SQL Server Deadlock Troubleshooting with TRACEON

There are a few ways to troubleshoot errors from deadlocks in SQL Server. One of these ways is to use tracing. First, turn on tracing using the command (a Database Console Command): DBCC TRACEON (1222, -1) You should see: Now, wait for a deadlock in SQL Server to occur. Once it occurs, you can run the following command to read the error log: exec sp_readerrorlog Scroll to look for the … Continue reading SQL Server Deadlock Troubleshooting with TRACEON

SQL Server Deadlocks

In this post we will take a look at how deadlocks occur in SQL Server. Deadlocks are when two or more tasks are trying to lock the same resource. For example, if you have a stored procedure that locks a table, and another stored procedure is also trying to access that table, you may end up with a permanent deadlock situation. SQL Server has a process that detects if there … Continue reading SQL Server Deadlocks

SQL 2016 Azure Virtual Machine

In Azure, there is a SQL Server 2016 virtual machine to get you up and running quickly. To install it, go to portal.azure.com and select Databases->SQL Server 2016 SP1 Enterprise on Windows Server 2016: Enter the basic information: Choose the VM size: Choose settings: SQL Server Settings: Confirm the summary: Connect to the VM: An RDP session will open. You will see SQL 2016 installed:

Install SQL 2016 Sample Databases

The AdventureWorks sample databases that had been used for a long time for SQL Server have been replaced with the SQL Server 2016 version. This new database contains many new features. To install the database, go to: https://github.com/Microsoft/sql-server-samples/releases/tag/wide-world-importers-v1.0 We will restore a local database and local data warehouse. Database is installed: Restore the data warehouse, place the file in a directory run the command replacing the source directory below: RESTORE FILELISTONLY FROM DISK … Continue reading Install SQL 2016 Sample Databases

Create Tabular Model in SSAS 2016

We will go through an example of how to create a new tabular model in SQL Server Analysis Services 2016 (SSAS). Open SQL Server Data Tools (SSDT) and create a new Analysis Services Tabular project:   A new project will be created: Model.bim contains the following properties: Add data source connection: Connect to SQL data warehouse: To add tables to the model, click Model->Existing Connections: Open: Mark the date table as … Continue reading Create Tabular Model in SSAS 2016

Creating Dynamics CRM Reports with SSRS and Fetch XML

Dynamics CRM comes with pre-packaged reports. You can also create your own reports using SSRS. Here we will go through examples of doing this. Open Visual Studio. Ensure SQL Server Data Tools are installed and the Report Authoring Extensions are installed. Create a new report project: This will create a blank project: Right click Reports and add a new report: This will open the Report Wizard. Click Next: Enter the CRM connection … Continue reading Creating Dynamics CRM Reports with SSRS and Fetch XML

Installing SQL Server 2016

To install SQL Server 2016 go through the following steps. Download SQL Server and run the executable. In this case we will install SQL Server 2016. Select the components to install: