Moving a database to a elastic pool after DB Copy or export from one Azure logical server to another Azure logical server.
Customer says you to copy/ export database from development Azure logical server to Stage Azure logical server.
you
Development databases is not in a elastic pool, however the stage database is in elastic pool.
After moving the database from Development to Stage, you realized that your database in not in a elastic pool.
so how will you move the database to specific elastic pool.
First execute below command to see your database is in which service objective and in which elastic pool name
SELECT d.name,
slo.*
FROM sys.databases d
JOIN sys.database_service_objectives slo
ON d.database_id = slo.database_id;
In above screenshot elastic_pool_name is NULL
Now we have to move this database to stage_pool
Elastic pool with the name stage_pool is already created..
and using T-SQL Commands we just have to move the database to that pool.
hence we have to execute below command.
Now we have to move this database to stage_pool
Elastic pool with the name stage_pool is already created..
and using T-SQL Commands we just have to move the database to that pool.
hence we have to execute below command.
ALTER DATABASE
[stage_TestDB]
MODIFY ( SERVICE_OBJECTIVE =
ELASTIC_POOL ( name =
[stage_pool] ) ) ;
For complete reference refer this blog
https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql?view=sql-server-2017&tabs=sqldbls
For complete reference refer this blog
https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql?view=sql-server-2017&tabs=sqldbls