Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. SQL on a shared HDD via network

SQL on a shared HDD via network

Scheduled Pinned Locked Moved Database
helpdatabasesysadminquestioncsharp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Badboy22TR
    wrote on last edited by
    #1

    Hi, I have been used sql for my VC++. NET apps’ database. I want to make app that more than one user can use it from a shared hdd via network. E.g. let the app is on computer A, a hdd will be shared via network on computer A, and Computer B will use app via Computer A. After configuring .NET Framework settings with CasPol.exe, app is working. But whenever it try to reach database, this error occurs: “The file” \\....” Is on a network path that is not supported for database files. An attempt to attach auto-named database for file “\\...” failed. A database with the same name exists, or specified file cannot be opened, or its located on UNC share…”. Both of computers (A and B) have SQL Server 2005 Express Edition. At first i use Windows Auth. For login but after i had this error, i tried to make app use “Mix mode” and login as “sa 12345”. I changed Sys. Admin. Pass as “12345” and set “remote connections” settings to “TCP/IP”. How can i solve this problem? Or how do the apps which has same strategy as this app work? Can you help me ? Thanks… Erman

    M 1 Reply Last reply
    0
    • B Badboy22TR

      Hi, I have been used sql for my VC++. NET apps’ database. I want to make app that more than one user can use it from a shared hdd via network. E.g. let the app is on computer A, a hdd will be shared via network on computer A, and Computer B will use app via Computer A. After configuring .NET Framework settings with CasPol.exe, app is working. But whenever it try to reach database, this error occurs: “The file” \\....” Is on a network path that is not supported for database files. An attempt to attach auto-named database for file “\\...” failed. A database with the same name exists, or specified file cannot be opened, or its located on UNC share…”. Both of computers (A and B) have SQL Server 2005 Express Edition. At first i use Windows Auth. For login but after i had this error, i tried to make app use “Mix mode” and login as “sa 12345”. I changed Sys. Admin. Pass as “12345” and set “remote connections” settings to “TCP/IP”. How can i solve this problem? Or how do the apps which has same strategy as this app work? Can you help me ? Thanks… Erman

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #2

      SQL Server, even Express edition, expects to have complete control of the file. It doesn't expect changes to be made from under it - it aggressively caches portions of the file so it doesn't need to read from the disk file, and makes changes in RAM and lazily writes them back to disk, to consolidate write operations (and thereby reduce the amount of writing it has to do). It explicitly doesn't support data files on the network as the network redirector introduces additional performance issues. SQL Server does support opening files on a Storage Area Network, but the Logical Unit Number (virtual disk) that the files are on must be dedicated to that SQL Server, unless using SQL Server clustering. If you need multiple clients to share the same database, you need a database server.

      DoEvents: Generating unexpected recursion since 1991

      B 1 Reply Last reply
      0
      • M Mike Dimmick

        SQL Server, even Express edition, expects to have complete control of the file. It doesn't expect changes to be made from under it - it aggressively caches portions of the file so it doesn't need to read from the disk file, and makes changes in RAM and lazily writes them back to disk, to consolidate write operations (and thereby reduce the amount of writing it has to do). It explicitly doesn't support data files on the network as the network redirector introduces additional performance issues. SQL Server does support opening files on a Storage Area Network, but the Logical Unit Number (virtual disk) that the files are on must be dedicated to that SQL Server, unless using SQL Server clustering. If you need multiple clients to share the same database, you need a database server.

        DoEvents: Generating unexpected recursion since 1991

        B Offline
        B Offline
        Badboy22TR
        wrote on last edited by
        #3

        If i attach mdf to Computer A's SQL Server manually then i make a constr for it without "|DataDirectory|" and Computer B runs exe via Computer A, will it work ?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups