Thursday, June 21, 2012

Sql Query to Take DB into offline

HI All,
         -> One of my friend told me i.e after  Moving Content t'Db  of SP 2007 to SP 2010 environment  he is getting error, when restoring Sql back up file of SP 2003 to SP 2010 sql  .
        ->I connected to his PC and seen the way he restores the backup file and i find him doing in right way.I goggled for i.e solution ,And finally I came to knew i.e before moving the content DB of SP 2003 we need to but the SP 2003 content db  into Offline mode ,But he doesn't have permissions to take backup
     ->When he tries to but the DB in offile line it shows error as "Don't have admin permission" I used the
below  query  and it it kept the DB in offline

           Syntax
                     alter database database-name  set offline with rollback immediate
         example
          alter database WSS_Content_18c0de26c5a14be08d9bc142c288c976 set offline with rollback immediate