SQL in Cloud

Category Archives: Uncategorized

Inconsistent database ids in SQL Azure V12

In SQL Server there a couple simple ways to obtain the database id. They are db_id() built in and database_id coulmn from sys.databases view. However there is no guarantee that these two matches in SQL DB. While the database_id filed in sys.databases is consistent and won’t change in the life time of the database, db_id() built in can potentially change after every failover depending on the SQL instance the database ends up on.
Dbid also can be inconsistent between the master and user database. We should not take sys.databases view into account if we want to query other views like sys.dm_exec_Requests, sys.dm_tran_locks or sys.sysprocesses as the dbid used in them is the one represented in db_id() built in.

Taking database offline SQL DB

Sql Azure db – database offline

Alter database – SQL Azure V12

SQL Azure V12 provides altering more database options and here is the link to the best practices of using alter database in Azure.

Pages

  • Alter database in SQL V12
  • Changing MAX_DOP setting in SQL Azure DB V12
  • Connection Pooling and Isolation level reset
  • Contained users in SQL Azure DB V12
  • Full-text search in SQL Azure
  • Large Index Rebuild in SQL Azure V12
  • Row versioning in SQL Database version (V12)
  • Sql Azure db – database offline

Archives

  • May 2016
  • December 2015
  • July 2015
  • May 2015
  • April 2015

Categories

  • SQL Azure (8)
  • Uncategorized (3)

WordPress

  • Log in
  • WordPress

Subscribe

  • Entries (RSS)
  • Comments (RSS)
  • Alter database in SQL V12
  • Changing MAX_DOP setting in SQL Azure DB V12
  • Connection Pooling and Isolation level reset
  • Contained users in SQL Azure DB V12
  • Full-text search in SQL Azure
  • Large Index Rebuild in SQL Azure V12
  • Row versioning in SQL Database version (V12)
  • Sql Azure db – database offline