milosev.com
  • Home
    • List all categories
    • Sitemap
  • Downloads
    • WebSphere
    • Hitachi902
    • Hospital
    • Kryptonite
    • OCR
    • APK
  • About me
    • Gallery
      • Italy2022
    • Curriculum vitae
      • Resume
      • Lebenslauf
    • Social networks
      • Facebook
      • Twitter
      • LinkedIn
      • Xing
      • GitHub
      • Google Maps
      • Sports tracker
    • Adventures planning
  1. You are here:  
  2. Home
  3. Azure
  4. SQL

Check locks

Details
Written by: Stanko Milosev
Category: SQL
Published: 25 February 2013
Last Updated: 30 November -0001
Hits: 4583

How to check locks in Azure SQL?

 

 
SELECT * FROM sys.dm_db_wait_stats
ORDER BY wait_time_ms desc

WadLogsTable

Details
Written by: Stanko Milosev
Category: SQL
Published: 26 December 2012
Last Updated: 30 November -0001
Hits: 4585

Table where we can see logs from Windows Azure.

Copy database

Details
Written by: Stanko Milosev
Category: SQL
Published: 16 December 2012
Last Updated: 16 December 2012
Hits: 4650

Use "CREATE DATABASE destination_database_name AS COPY OF [source_server_name.] source_database_name" to make a copy of database on the Azure SQL.

There is also possibility to check progress of DB copy, but at this moment I don't have that code. 

Import BACPAC files (restore backup from windows Azure)

Details
Written by: Stanko Milosev
Category: SQL
Published: 12 November 2012
Last Updated: 12 November 2012
Hits: 6448

Install SSMS 2012 (not DB engine, only Management Studio) from:

 

http://download.microsoft.com/download/8/D/D/8DD7BDBA-CEF7-4D8E-8C16-D9F69527F909/ENU/x64/SQLManagementStudio_x64_ENU.exe

 

Download BACPAC, it can be done using Visual Studio (View->Server explorer,…)

 

If you receive the error like:

Error SQL72014: .Net SqlClient Data Provider: Msg 468, Level 16, State 9, Procedure MyProc, Line "some number" Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation.

 (Microsoft.SqlServer.Dac)

Then unzip BacPac (bacpac is actually zip file), find file which has SQL_Latin1_General_CP1_CI_AS, then, best is just to rename bacpac to zip, and search and replace file directly from zip, or install new instance of MS SQL, because I couldn’t find a way to change collation of the server…

  1. How to get row count of every table in a SQL Azure Database
  2. Add firewall rule

Page 1 of 2

  • 1
  • 2