PASS / Modern Migration Tour 2019 – Auckland, New Zealand

PASS / Modern Migration Tour 2019 – Auckland, New Zealand
Modern Migration Tour 2019 – AUCKLAND, NEW ZEALANDhttps://www.eventbrite.ca/e/modern-migration-tour-2019-auckland-new-zealand-tickets-62011870173# LocationMicrosoft New ZealandL5 Microsoft House22 Viaduct Harbour AveAuckland 1010 Date And TimeMon, 27 May 201912:00 PM – 1:30 PM NZST Description: End of support for SQL Server 2008 is almost here (ends in July!), which means it’s time to take flight on your migration strategy. But, do you have a plan in place? What approach should you take to ensure a smooth transition? To guide you...
read more

Auckland SQL User Group Meetup Event / Kevin Kline, Microsoft MVP / Push Your App to Enterprise Scale with Advanced SQL Server Features

Auckland SQL User Group Meetup Event / Kevin Kline, Microsoft MVP / Push Your App to Enterprise Scale with Advanced SQL Server Features
SentryOne Principal Program Manager, renowned database expert, founder and former president of PASS, and Microsoft SQL Server MVP, Kevin Kline, will share his deep SQL knowledge and best practices at a series of SQL Saturdays and SQL Server User Group meetings all around the world. As a part New Zealand Down Under Tour, in association with SQLMasters Consulting, Kevin Kline is coming to Auckland on June 4th to deliver a session! Push Your App to Enterprise Scale with Advanced SQL Server Features Tuesday, Jun 4, 2019, 12:00 PM Microsoft22...
read more

PowerShell / SQL Server / Generate SQL Script to Restore Multiple Transaction Logs

PowerShell / SQL Server / Generate SQL Script to Restore Multiple Transaction Logs
Restore multiple TRN logs using PowerShell. In this example I will show you really simple way how you can use PowerShell to restore multiple logs at once. After restoring full backup WITH NORECOVERY you need to figure it out last log sequence number of the last transaction in the backup set. TRN Log backups must be restored in the order in which they were created. Log backups contain log sequence numbers (LSN), and they must be restored in that particular order. There are few ways to find last LSN. USE msdb GO SELECT TOP 10 bck.database_name...
read more

Azure / PowerShell / Deploy Azure SQL database DR environment (PaaS) using PowerShell

Azure / PowerShell / Deploy Azure SQL database DR environment (PaaS) using PowerShell
Script Download: The script with usage example is available for download from https://gallery.technet.microsoft.com/Deploy-Azure-SQL-DR-47dfa7f7 Summary: Use PowerShell to create cloud DR environment using Azure SQL Databases (PaaS) and send Email Report with the connection string details   Description: Use PowerShell to deploy cloud service with Azure SQL Database (PaaS) with good resilience to outages (GEO Replications, Failover Groups) PowerShell: Connect to Azure Account, Use existing or create new Resource Group, Create primary...
read more

Azure / SQL Server / Azure SQL Database Disaster Recovery / Orphaned Users / Different SIDs

Azure / SQL Server / Azure SQL Database Disaster Recovery / Orphaned Users / Different SIDs
If you are using Azure SQL Database with geo-replication or auto failover group and if you are using logins and users rather than contained users you can end up with the following error when you try to connect to the secondary/failover database after failover occured.   If you already created a login on the failover server using SQL command -- ====================================================================================== -- Create SQL Login template for Azure SQL Database and Azure SQL Data Warehouse Database --...
read more

Azure / SQL Server / Rename an Azure SQL database

Azure / SQL Server / Rename an Azure SQL database
We had one customer who was moving his Azure SQL Database from Elastic Pool to Standalone Database. At the same time, he wanted to change database name as well. Azure database was part of an existing failover group (two elastic pools) and geo-replicated to the new future Azure SQL Server. Changing the database name is not allowed if the database is part of the replication   If the database is not part of replication we can use two different approaches to rename it, using: SQL Server Management Studio or Transact-SQL Note: This refers...
read more

Azure / SQL Server / This location is not available for subscription

Azure / SQL Server / This location is not available for subscription
During deployment of Azure SQL Server in Canada East location (new Azure Subscription) I got the following error: Using Azure Portal   Using Powershell   At the same time if I list all available azure location for the current subscription I can see that Canada East is there Get-AzureRmLocation | select displayname   The reason is that Canada East region is not activated for my new Azure Subscription. To resolve this issue just contact the Azure support to have this enabled for you. You can do this for free using support page on...
read more

SQL Server / ALTER INDEX / CREATE INDEX Progress

SQL Server / ALTER INDEX / CREATE INDEX Progress
Creating a new and altering existing indexes on the big tables can be time-consuming. There is a simple way to see the progress of the CREATE / ALTER INDEX command. Since SQL Server 2014 we can use sys.dm_exec_query_profiles DMV to monitor real-time query progress. sys.dm_exec_query_profiles (SQL SERVER 2014 and above) “Monitors real-time query progress while the query is in execution. For example, use this DMV to determine which part of the query is running slow. Join this DMV with other system DMVs using the columns identified in the...
read more

PowerShell / SQL Server / ConnectionContext.StatementTimeout

PowerShell / SQL Server / ConnectionContext.StatementTimeout
Recently I had an issue with a database backup PowerShell script one of our customer using. The script was working fine until trying to do a backup of the large database. During backup attempts script starts failing with the following error: Exception calling "SqlBackup" with "1" argument(s): "Backup failed for Server 'ServerName'. " At line:67 char:1 + $dbBackup.SqlBackup($s) + ~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : FailedOperationException Exception calling...
read more

Microsoft SQL Server 2019 / BETA (15.0.1000.34)

Microsoft SQL Server 2019 / BETA (15.0.1000.34)
SQL SERVER 2019 Update Version: MSSQL 2019 BETA (CTP2.3), Build: 15.0.1300.359, Release Date: March 2019, Download: https://docs.microsoft.com/en-us/sql/sql-server/sql-server-ver15-release-notes?view=sqlallproducts-allversions; Update Version: MSSQL 2019 BETA (CTP2.2), Build: 15.0.1200.24, Release Date: December 2018, Download: https://docs.microsoft.com/en-us/sql/sql-server/sql-server-ver15-release-notes?view=sqlallproducts-allversions; Update Version: MSSQL 2019 BETA (CTP2.1), Build: 15.0.1100.94, Release Date: November 2018, Download:...
read more

« Previous Entries