none
Disconnect File-Session Idle script RRS feed

  • Question

  • Hello,

    My work place host one of our small database on a Windows 7 workstation and link the shared database via mapped drive.
    There are only 1-5 users accessing this data at any given time, but the issue that we are having is that there is a limit of 20 users that can access a Windows 7 box.   The mapped drive on other workstations are keeping an active link open with our database.  Even when the user exit out of the database, they are still connect, because of the mapped drive.  I can manually delete the session, but would like to automate this process.

    I have found a script from here by Boe Prox and decided to use that since it has been confirmed to work on Windows 7.
    When I ran the script, it goes through without any error message, but nothing happens. I am not sure if I am missing a few steps or two.  I have tried running this script with PowerShell 2.0 to 4.0 and the outcome seems to be the same.

    Here is the script that I am using https://gallery.technet.microsoft.com/scriptcenter/b3d5b48c-42f3-4e5a-a8ac-d1410de9404d.

    Is there something that I am not doing or is there an error with the script?

    Thanks,

    Toya

    Monday, October 13, 2014 3:16 PM

Answers

  • We do not use a MSSQLServer, the database we are running is part of an application that the users uses.  The database is put into a Win7 box to be shared so there are no duplicates. 

    The application requires each user to have the mapped drive and it will automatically put one there if it doesn't detect one.  This keeps an active file session on our Win7 box and with a limit of 20 users/sessions, it is locking users that actually need to use the database out.

    With a small base of users accessing this database at any given time, it would be over kill to switch to a full fledged server.  

    You will have to either put it on a server or contact vendor for correct instructions on how to use this type of database with their application.  In many cases there is nothing you can do about it.

    The drive mapping is persistent and will just reconnect if you disconnect it at the service end so that will not really help you.  Boe's and my disconnect methods are designed to be used to release hung files and not mapped shares.  The users are the ones that have to disconnect the drive after using it.

    Unfortunately this is an admin scripting forum for Windows admins and developers.  It is not a support forum for third party issues so we cannot really be of any help.


    ¯\_(ツ)_/¯

    Monday, October 13, 2014 7:06 PM

All replies

  • Why would you use a mapped drive with a database.  With MSSQLServer we only need access to the file when the database is being mounted by the users.  In your setting this is not needed or possible.

    If you need to authenticate you will have to use Mixed mode or be in a domain.  There is no limit to the number of users on a database on WIn7.  There is a limit to the datyabase size and there is a query governor which prevents large numbers of users from working efficiently.  The user limit is for full logons like drive mappings and constant attachments.

    In an application you want to be sure you close the connections after returning data.  Use disconnected recordsets. Use on-the-fly updates via stored procedures.

    Post issues with database deployment in the database forums.


    ¯\_(ツ)_/¯

    Monday, October 13, 2014 3:57 PM
  • We do not use a MSSQLServer, the database we are running is part of an application that the users uses.  The database is put into a Win7 box to be shared so there are no duplicates. 

    The application requires each user to have the mapped drive and it will automatically put one there if it doesn't detect one.  This keeps an active file session on our Win7 box and with a limit of 20 users/sessions, it is locking users that actually need to use the database out.

    With a small base of users accessing this database at any given time, it would be over kill to switch to a full fledged server.  

    Monday, October 13, 2014 5:51 PM
  • We do not use a MSSQLServer, the database we are running is part of an application that the users uses.  The database is put into a Win7 box to be shared so there are no duplicates. 

    The application requires each user to have the mapped drive and it will automatically put one there if it doesn't detect one.  This keeps an active file session on our Win7 box and with a limit of 20 users/sessions, it is locking users that actually need to use the database out.

    With a small base of users accessing this database at any given time, it would be over kill to switch to a full fledged server.  

    You will have to either put it on a server or contact vendor for correct instructions on how to use this type of database with their application.  In many cases there is nothing you can do about it.

    The drive mapping is persistent and will just reconnect if you disconnect it at the service end so that will not really help you.  Boe's and my disconnect methods are designed to be used to release hung files and not mapped shares.  The users are the ones that have to disconnect the drive after using it.

    Unfortunately this is an admin scripting forum for Windows admins and developers.  It is not a support forum for third party issues so we cannot really be of any help.


    ¯\_(ツ)_/¯

    Monday, October 13, 2014 7:06 PM
  • I agree with jrv and would add that disconnecting sessions to some file-based databases may introduce data corruption and should be avoided.


    -- Bill Stewart [Bill_Stewart]

    Monday, October 13, 2014 9:48 PM
    Moderator
  • Thanks for all your help.  I will contact the vendor to see if they have a fix for this.
    Wednesday, October 15, 2014 5:07 PM
  • I have used many of these databases over the years.  One reason for doing this is to allow the user to obtain permissions on the system.  Most vendors have an alternate setup that allows for a client/server interface with no mapped drive.  Other using MSAccess or FoxPro are using an older, more primitive shared files system.  Those are limited by the Windows connection limit. 

    This same limit is true of QuickBooks if the workstation hosts multiple files.

    If you are in a domain use a file server share for the file.  If you are in a workgroup you will have to purchase a server and licenses.

    Get a real database and give up on this old stuff.


    ¯\_(ツ)_/¯

    Wednesday, October 15, 2014 5:20 PM