+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 24
MIS Systems Thread, DBAttach Issue in Technical; Does anyone know why when I try to use DBAttach to detach my SIMS DB I get the message that ...
  1. #1

    fiza's Avatar
    Join Date
    Dec 2008
    Location
    London
    Posts
    2,169
    Thank Post
    430
    Thanked 314 Times in 265 Posts
    Rep Power
    153

    DBAttach Issue

    Does anyone know why when I try to use DBAttach to detach my SIMS DB I get the message that "This Database is currently in use. You cannot detach this database until all users have logged out".

    No users are logged in (currently all user accounts are disabled to allow me to work in peace). I have rebooted the server.
    The Dialogue box has the title "FMS Database Installation". As far as I know we dont use FMS.

    Anyone have any ideas? I need to detach this DB so I can rebuild the server to 2008 R2.

    I have successfully used DBattach in the past.

  2. #2

    creese's Avatar
    Join Date
    Feb 2009
    Location
    -28° 31' 48.89", +28° 25' 37.42" ... if only.
    Posts
    3,256
    Thank Post
    182
    Thanked 375 Times in 304 Posts
    Rep Power
    174
    Which version have you got?

  3. #3

    fiza's Avatar
    Join Date
    Dec 2008
    Location
    London
    Posts
    2,169
    Thank Post
    430
    Thanked 314 Times in 265 Posts
    Rep Power
    153
    DBattach version 1.24.24.0

  4. #4

    creese's Avatar
    Join Date
    Feb 2009
    Location
    -28° 31' 48.89", +28° 25' 37.42" ... if only.
    Posts
    3,256
    Thank Post
    182
    Thanked 375 Times in 304 Posts
    Rep Power
    174
    Try upgrading. Mine is 1.25.23.0

    Are you on Summer 2011?

  5. #5

    fiza's Avatar
    Join Date
    Dec 2008
    Location
    London
    Posts
    2,169
    Thank Post
    430
    Thanked 314 Times in 265 Posts
    Rep Power
    153
    no still on Spring. I was hoping to migrate to 2008 R2 from 2003 before implementing the Summer release.
    Where can i get 1.25.23.0? I search on supportnet for dbattach but got nothing

  6. #6

    creese's Avatar
    Join Date
    Feb 2009
    Location
    -28° 31' 48.89", +28° 25' 37.42" ... if only.
    Posts
    3,256
    Thank Post
    182
    Thanked 375 Times in 304 Posts
    Rep Power
    174
    1.25.23.0 would have come with the summer update. So probably not the problem.

    Have you tried stopping and starting the SQL service?

  7. #7

    fiza's Avatar
    Join Date
    Dec 2008
    Location
    London
    Posts
    2,169
    Thank Post
    430
    Thanked 314 Times in 265 Posts
    Rep Power
    153
    Quote Originally Posted by creese View Post
    Have you tried stopping and starting the SQL service?
    Just tried that but no joy

    Will raise a call with Supportnet.

  8. #8

    Join Date
    Mar 2010
    Location
    UK
    Posts
    169
    Thank Post
    0
    Thanked 16 Times in 15 Posts
    Rep Power
    17
    Try running SQLApplication setup, from memory FMS has it's own dbattach, I think you may be using that one.

  9. #9

    jinnantonnixx's Avatar
    Join Date
    Mar 2011
    Location
    In the Calamatorium.
    Posts
    1,991
    Thank Post
    114
    Thanked 507 Times in 342 Posts
    Blog Entries
    2
    Rep Power
    286
    If you're OK with SQL queries, this will show the current logged-in users for your database.

    Code:
     declare @mySIMSdb as nvarchar(100)
     
    set @mySIMSdb = '<your SIMS database name>'
    
    
    
    -- drop table #sp_who2
    
    create table #sp_who2 
    (
    spid int,
    status varchar(100),
    loginname varchar(2000),
    hostname varchar(2000),
    blkby varchar(100),
    dbname varchar(200),
    cmd varchar(max),
    cputime int,
    diskio int,
    lastbatch varchar(100),
    pgmname varchar(500),
    parentspid int,
    request_id int
    )
    
    insert into #sp_who2
    EXEC sp_who2
    
    select loginname, hostname, dbname  from #sp_who2
    where dbname = @mySIMSdb
    
    
    drop table #sp_who2

  10. #10

    vikpaw's Avatar
    Join Date
    Sep 2006
    Location
    Saudi Arabia
    Posts
    6,011
    Thank Post
    683
    Thanked 1,398 Times in 1,158 Posts
    Rep Power
    353
    How are the accounts disabled? What if there is a rogue machine out there with SIMS open..?<br>Try going on the local console and then disabling tcp/ip access.<br>Also try a script in sql management studio to see who is logged in...<br><br>
    Code:
    use master;
    
    select distinct sysprocesses.loginame,
    /* sysprocesses.spid, */
    sysprocesses.hostname,
    sysdatabases.name,
    /* sysprocesses.nt_username, */
    /* sysprocesses.login_time, */
    sysprocesses.status,
    sysprocesses.memusage,
    sysprocesses.dbid
    from sysprocesses
    
    
    join sysdatabases on sysprocesses.dbid = sysdatabases.dbid
    
    
    where sysdatabases.name = 'sims' OR sysdatabases.name = 'fms'
    
    
    order by sysdatabases.name, sysprocesses.loginame
    Gah! he beat me to it. Maybe you can check my code is good @jinnantonnixx - though i probably got it from you anyway
    Last edited by vikpaw; 26th July 2011 at 12:18 PM. Reason: add

  11. Thanks to vikpaw from:

    fiza (27th July 2011)

  12. #11

    creese's Avatar
    Join Date
    Feb 2009
    Location
    -28° 31' 48.89", +28° 25' 37.42" ... if only.
    Posts
    3,256
    Thank Post
    182
    Thanked 375 Times in 304 Posts
    Rep Power
    174
    I think the clue is in the FSM error. We don't support FSM so can't really check.

    Are you using the shortcut on the start menu?

  13. #12

    jinnantonnixx's Avatar
    Join Date
    Mar 2011
    Location
    In the Calamatorium.
    Posts
    1,991
    Thank Post
    114
    Thanked 507 Times in 342 Posts
    Blog Entries
    2
    Rep Power
    286
    The other option is to run the detach manually from SQL manager.

    Be sure to copy the db users to the transfer table first. PM is you want the SQL code.

  14. #13

    jinnantonnixx's Avatar
    Join Date
    Mar 2011
    Location
    In the Calamatorium.
    Posts
    1,991
    Thank Post
    114
    Thanked 507 Times in 342 Posts
    Blog Entries
    2
    Rep Power
    286
    Does anyone know if SIMS are now flagging users as 'logged in' in the database?
    If this is new, it could explain the problem.

  15. #14

    vikpaw's Avatar
    Join Date
    Sep 2006
    Location
    Saudi Arabia
    Posts
    6,011
    Thank Post
    683
    Thanked 1,398 Times in 1,158 Posts
    Rep Power
    353
    Quote Originally Posted by Banjo View Post
    Try running SQLApplication setup, from memory FMS has it's own dbattach, I think you may be using that one.
    True.
    I have 1.24.24.0 too from Spring.

    The sims one and the fms one are the same though. Not sure it would make a difference. There was an explanation somewhere previously from Phil Neal about why there were two, but i didn't really get it. It came from a developer!

    It's a pain that they both have the same name.

    The SIMS one lives in the db binn folder :
    Code:
    Program Files\Microsoft SQL Server\MSSQL10_50.SIMS2008\MSSQL\Binn
    FMS as above but in the FMSSQL subfolder. Mine actually for FMS is 1.24.22.0 - So you can't be using that, plus you don't have FMS..

    I usually track them down and change the shortcut names so i can ID them. Also you can add parameters to save you typing in server / db name every time. Helps if you use it alot, mostly on test server.

  16. #15

    vikpaw's Avatar
    Join Date
    Sep 2006
    Location
    Saudi Arabia
    Posts
    6,011
    Thank Post
    683
    Thanked 1,398 Times in 1,158 Posts
    Rep Power
    353
    I know from bitter experience, that if a workstation has SIMS open it will be making a connection even if no-one is there, because of the stupid homepage graphs!
    Not sure about the 'logged in' flag, but that script i use does show both the user and the workstation, so a remote shutdown command does the trick. Or kill tcp/ip connections which is more reliable.

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Photoshop Elements Photo Browser issue.
    By mseaney in forum Educational Software
    Replies: 1
    Last Post: 17th January 2006, 12:02 PM
  2. Synchronise Files issue.....Mystery
    By tosca925 in forum Windows
    Replies: 3
    Last Post: 13th January 2006, 10:31 AM
  3. Linux Format, January Issue
    By kingswood in forum *nix
    Replies: 11
    Last Post: 5th December 2005, 11:02 AM
  4. Exchange 2003 and Server 2003 SP1 issue.
    By tosca925 in forum Windows
    Replies: 0
    Last Post: 21st August 2005, 10:32 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •