- Details
- Written by: Stanko Milosev
- Category: SQL
- Hits: 5987
Table where we can see logs from Windows Azure.
- Details
- Written by: Stanko Milosev
- Category: SQL
- Hits: 6040
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.
- Details
- Written by: Stanko Milosev
- Category: SQL
- Hits: 8059
Install SSMS 2012 (not DB engine, only Management Studio) from:
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…
- Details
- Written by: Stanko Milosev
- Category: SQL
- Hits: 5740
SELECT so.name as TableName, ddps.row_count as [RowCount]
FROM sys.objects so
JOIN sys.indexes si ON si.OBJECT_ID = so.OBJECT_ID
JOIN sys.dm_db_partition_stats AS ddps
ON si.OBJECT_ID = ddps.OBJECT_ID AND si.index_id = ddps.index_id
WHERE si.index_id < 2 AND so.is_ms_shipped = 0
ORDER BY ddps.row_count DESC
Taken from here