/ SQL Msg 952 Level 16, State 1, Line 1

SQL Msg 952 Level 16, State 1, Line 1

Issue :-
Msg 952, Level 16, State 1, Line 1
Database 'LANTest' is in transition. Try the statement later.

Solution :

Today I have migrated LANTest database from old server to new server .


I was taking LANTest database to offline .I ran the below alter command aginst the LANTest database

alter database LANTest set offline

But it was not completed .still it is running .after sometime  when i was try to open the database .it was not accessible for anyone . I got following error msg .


Msg 952, Level 16, State 1, Line 1
Database 'LANTest' is in transition. Try the statement later.


I got on google read some questions where people had faced similar issue and they recommended to close the SSMS and open it again, 

I have closed SSMS and open it , now the database is online and accessible for me .now i ran the below command to taking database offline .

Use Master
go
alter database LANTest set offline WITH ROLLBACK IMMEDIATE
go

This query got executed successfully .Now the database LANTest is in Offline .state.