SQL Server Management Studio v 17.6 is released


SQL Server Management Studio v 17.6 is released and available for download from below links

New Install – https://go.microsoft.com/fwlink/?linkid=870039

Upgrade from previous v 17.x – https://go.microsoft.com/fwlink/?linkid=870041

There are lot of fixes and changes in this release, for more information, Please visit

https://docs.microsoft.com/en-us/sql/ssms/sql-server-management-studio-changelog-ssms

The main highlight feature of this release is support for Azure SQL Database Managed Instance

Hope you find this information helpful !!!

Advertisement

Simple Guide to restore SQL Server Backup from Azure Blog Storage using Management Studio


In previous post, we saw

1. How to implement Off-site/Cloud backup in SQL Server 2017 using Azure Blob Storage

2. How to restore SQL Server Backup from Azure Blog Storage using queries

In this post we will see how to restore SQL Server Backup from Azure Blog Storage using SQL Server Management Studio

Step 1: Open SQL Server Management Studio 2017 and connect to SQL Server on which you would like restore the database and right click on “Databases” node and click on “Restore Database…

capture20171030134441904

Step 2: Select Backup media type as “URL” and click on “Add

capture20171030134506048

Step 3: Click “Add” to add the new Azure Storage container

capture20171030134514751

If you are not already signed in, sign in to Azure account and then select the Subscription, Storage account and blob container

Based on you requirement, set up the Expiration date for Shared Access policy, by default, its setup for 1 year from date of setup

Click on “Create Credential” to generate the Shared Access Signature (SAS), once SAS is generated successfully, click “Ok” to continue

capture20171030141847722

Step 4: Please review the selected Azure Storage Container and Shared Access Signature and click “Ok” to continue

capture20171030142950818

Please select the backup file, you wish to restore

capture20171030143011020

Please review the selected backup media and click “Ok” to continue

capture20171030143016568

Step 5: Based on requirement change other options in Files tab or Options tab and click “Ok” to start the restore process

capture20171030143029023

Once restore is completed, we should see this restored successfully message

capture20171030143049123

We should also be able to see the database restored in Object Explorer as well

capture20171031191639786

Hope you find this post helpful !!!

Simple guide to restore SQL Server Backup from Azure Blog Storage


In previous post, we saw How to implement Off-site/Cloud backup in SQL Server 2017 using Azure Blob Storage, in this post we will see how to restore SQL Server Backup from Azure Blog Storage

Step 1: Create Credential – Please use below query to create Credential to access Azure Blog Storage using Shared Access Signature, This step is optional if you already have created Credential to create backup

CREATE CREDENTIAL [https://XYZ.blob.core.windows.net/YourContainerName]
WITH IDENTITY = 'SHARED ACCESS SIGNATURE',
SECRET =
 'sv=Replace your SAS Key Here';
GO

Step 2: Restore Database from Cloud (Azure Blog Storage) – Please run below query to restore the database using SQL Server Backup stored in Azure Blog Storage, Please change the query to meet your needs

USE [master]

RESTORE DATABASE [SQL2017_DEMO]
FROM
     URL = N'https://XYZ.blob.core.windows.net/YourContainerName/BackupFile.bak'
WITH  FILE = 1,
MOVE N'SQL2017_DEMO' TO N'E:\SQLDATA\SQL2017_DEMO.mdf',
MOVE N'SQL2017_DEMO_log' TO N'E:\SQLDATA\SQL2017_DEMO_log.ldf',
NOUNLOAD,
STATS = 5

GO

Output:

capture20171031191608492

We can also see the database restored in Object Explorer

capture20171031191639786

Hope you find this post helpful !!!

Simple Guide to implement Off-Site/Cloud backup in SQL Server 2017 using Azure Blob Storage in 2 Steps


In this post we will see how to implement Off-Site/Cloud backup in SQL Server 2017 using Azure Blog Storage

Requirements

1. SQL Server 2017

2. Azure Account

3. Azure Blog Storage with Container provisioned and Shared Access Signature generated

4. SQL Server Management Studio (Optional, if you prefer to run using SQLCMD)

 

Step 1: Create Credential – Please use below query to create Credential to access Azure Blob Storage using Shared Access Signature

CREATE CREDENTIAL [https://sqlxpertise.blob.core.windows.net/sqlbackups]
	WITH IDENTITY = 'SHARED ACCESS SIGNATURE',
SECRET =
	'sv=INSERT YOUR SHARED ACCESS SIGNATURE';
GO

 

Step 2: Backup Database to Cloud – Run below query to backup the database to Azure Blob Storage, Please change the query to meet your needs

BACKUP DATABASE SQL2017_DEMO
    TO URL = 'https://XYZ.blob.core.windows.net/sqlbackups/BackupFileName.bak'
    WITH STATS = 10, SKIP, NOREWIND, NOUNLOAD

 

Output:

capture20171030101644076

If we login to Azure Portal and Navigate to the Storage account and sqlbackups container, we can see the backup file

capture20171030104711661

You can also use SQL Server Management studio 2017 to connect to Azure Storage as well to see the backup file

capture20171030104822250

Having an offsite backup is always important and helpful.

Hope you find this post helpful !!!

Monitoring Transaction Replication : Replicating On-Premise SQL Server databases to SQL Azure databases


In previous post, we saw How to setup Transactional Replication to replicate On-Premise SQL Server databases to SQL Azure databases, in this post we will how to monitor the Replication process and make changes to data in On-Premise and verify the changes in SQL Azure database

Replication Monitoring

Step 1: Right click on Replication –> Local Publications –> Launch Replication Monitor

capture20171025144517902

Step 2: We can see the summary of subscriptions, current average performance and current worst performance

capture20171026151048695

Step 3: Expand the Publication to see the list of subscribers, we can see the list of subscribers and each of their Performance, Latency and Last Synchronization time

capture20171026151138103

Step 4: If we need to review the status of each Agent status, we can use Agents tab and see their status

capture20171026151212465

The different types of Agents status available are as follows

capture20171026151221076

Step 5: To view the details of a particular publisher/subscriber, Please right click on the Publication/Subscription and click on “View Details

capture20171026151412435

In details view we can see the completed (Success and Failure) and current sessions, if we click on a particular session, we can also see the steps ran on that session

Details of the publication session

capture20171026151457561

Details of the Subscriber session

capture20171026151512972

On-Premise Data Update verification in SQL Azure database

We will make data changes using below query in On-Premise server

Query to insert a new record and update one record in On-Premise SQL Server database

INSERT INTO dbo.Customers 
( 
CustomerID, 
CustomerName, 
CustomerAddress, 
Comments, 
Value 
) 
VALUES 
( 80001, -- CustomerID - int 
'CustomerName80001', -- CustomerName - char(100) 
'CustomerAddress80001', -- CustomerAddress - char(100) 
'Comments80001', -- Comments - char(185) 
80001 -- Value - int 
);

UPDATE dbo.Customers 
SET Comments = 'Update Comments 80000' 
WHERE CustomerID = 80000; 

After 2 minutes, we ran the below query in SQL Azure database

Query to verify data changes in SQL Azure database

SELECT [CustomerID], 
[CustomerName], 
[CustomerAddress], 
[Comments], 
[Value] 
FROM [dbo].[Customers] 
WHERE CustomerID >= 80000; 

Output: We can see the changes made in On-Premise server is replicated to SQL Azure database

capture20171026151906330

Hope you find this post helpful !!!

%d bloggers like this: