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. opening a db on network path?[sql servr 05]

opening a db on network path?[sql servr 05]

Scheduled Pinned Locked Moved Database
databasesysadmincsharpasp-netsecurity
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.
  • G Offline
    G Offline
    giddy_guitarist
    wrote on last edited by
    #1

    hi , ok i thought it was as simple as putting the path to the db into AttahDbFileName , but it does'nt work. I get " is on a network path and this is not supported" I tried messing with the surface area cfg , no change. Could someone give me a pointer as to what i have to do to add a database that is on a network?? Also , The "server" computer that does have the database has SQLSERVER 05 exp. installed. But "client" computer that tries to connect to this "server" also has SQLSERVER 05 exp. installed , so maybe its using the wrong instance of the service? My connection string looks like this: "Data Source=.\SQLEXPRESS;AttachDbFilename=\\Gidlaptop\data (e)\Gid\My Creations\Hotel Management Studio\HotelManager.Core\bin\Debug \DataServices\HTLDATA.mdf;Integrated Security=True;User Instance=True"; [using C under .NET 2.0] Thanks so much! Gideon

    O 1 Reply Last reply
    0
    • G giddy_guitarist

      hi , ok i thought it was as simple as putting the path to the db into AttahDbFileName , but it does'nt work. I get " is on a network path and this is not supported" I tried messing with the surface area cfg , no change. Could someone give me a pointer as to what i have to do to add a database that is on a network?? Also , The "server" computer that does have the database has SQLSERVER 05 exp. installed. But "client" computer that tries to connect to this "server" also has SQLSERVER 05 exp. installed , so maybe its using the wrong instance of the service? My connection string looks like this: "Data Source=.\SQLEXPRESS;AttachDbFilename=\\Gidlaptop\data (e)\Gid\My Creations\Hotel Management Studio\HotelManager.Core\bin\Debug \DataServices\HTLDATA.mdf;Integrated Security=True;User Instance=True"; [using C under .NET 2.0] Thanks so much! Gideon

      O Offline
      O Offline
      originSH
      wrote on last edited by
      #2

      I'ts a very bad idea to have the files running over a network. Whilst being about Sql Server 7, this [^] article has a good summary of the pains it can cause. If you really want to do this then heres a link to the knowledge base article: Description of support for network database files in SQL Server[^]

      G 1 Reply Last reply
      0
      • O originSH

        I'ts a very bad idea to have the files running over a network. Whilst being about Sql Server 7, this [^] article has a good summary of the pains it can cause. If you really want to do this then heres a link to the knowledge base article: Description of support for network database files in SQL Server[^]

        G Offline
        G Offline
        giddy_guitarist
        wrote on last edited by
        #3

        Hi, Thank you! for the reply, but because of my ms access background i did'nt realize how i need to connect to a database that is on a locally connected computer. I did'nt want to use the DB from a UNC path , i just wanted to connect to it! :-D I thought , naively :sigh:, i could just use attachDbFile and specify the UNC location. But it seems i had to "Attach" the database on the "server" first[^] Then i was told to use either one of these connection strings: Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername; Password=myPassword; OR Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI; (Where myDataBase is the name i used when i "Attached" the database.) Also, i needed to allow remote connections.[^].(Dont forget to enable the sql browser service, its off by default) I hope this helps someone else , if they had the same mis understading i had! Gideon

        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