5 Replies - 1898 Views - Last Post: 07 March 2012 - 05:07 PM Rate Topic: -----

#1 StuckInJava   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 143
  • Joined: 11-November 10

Remote Access SQL Server 2005

Posted 07 March 2012 - 04:17 PM

Hi there I currently have my MS-SQL db running on SQL Server 2005 on my laptop. The one database needs to be accessed for a limited number of time by a few number of people, whats the best and cheapest way to go about this?
Is This A Good Question/Topic? 0
  • +

Replies To: Remote Access SQL Server 2005

#2 blackcompe   User is offline

  • D.I.C Lover
  • member icon

Reputation: 1159
  • View blog
  • Posts: 2,547
  • Joined: 05-May 05

Re: Remote Access SQL Server 2005

Posted 07 March 2012 - 04:26 PM

What's wrong with going about it the same way you'd go about building a db that's accessed by many people many times? When you say limited number of times, do you mean throughout the db's lifetime or throughout a typical user session? If I'm not mistaken there are only but so many configurations the MSSQL wizard provide at set up. I'd just pick the default.
Was This Post Helpful? 0
  • +
  • -

#3 StuckInJava   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 143
  • Joined: 11-November 10

Re: Remote Access SQL Server 2005

Posted 07 March 2012 - 04:35 PM

Sorry I am new to databases and have maybe worded my question wrong.

I have SQL Server and my database on my laptop along with my Java program that needs to access it.

I need to be able to distribute my Java program to anyone that wishes and they need to be able to connect to the database when the wish. How do i go about this as I doubt they can access the database on the server when its on my laptop and not everyone has SQL Server installed.
Was This Post Helpful? 0
  • +
  • -

#4 blackcompe   User is offline

  • D.I.C Lover
  • member icon

Reputation: 1159
  • View blog
  • Posts: 2,547
  • Joined: 05-May 05

Re: Remote Access SQL Server 2005

Posted 07 March 2012 - 04:50 PM

Well, unless your willing to have a distributed program access your db, I think that's out of the question. If you do, it's not necessarily hard to set up, but it isn't a trivial process for a novice.

  • Run the db and allow you machine to accept requests on the db port.

  • Enable traffic and port forwarding on your router.

  • If you've got a dynamic IP, you'll likely to need a dynamic DNS service at some point, so that if your ISP gives your router a new public IP, the program can just use a domain name (instead the IP of your router) to access your network.


Your other choice to bundle a database with the distributed program or require the user to download and set up the db (and possibly require them to feed the access information to the program). The former is easiest from the user POV, but your distro will be bigger, and obviously that's more for you to implement. The latter actually is a pretty good as long as users don't mess up the file structure. You should be able to have your program find the db installation and pretty much configure everything. But this too is a lot of work that you'll have to implement. A lot of software does it this way. Think about all the installers you've used.

As a last resort, you could create your own database class and persist it to a flat file or XML on shut down. This is relatively trivial, especially if the schema is trivial, but you forfeit the power of using SQL and any other DBMS features.

This post has been edited by blackcompe: 07 March 2012 - 04:50 PM

Was This Post Helpful? 0
  • +
  • -

#5 StuckInJava   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 143
  • Joined: 11-November 10

Re: Remote Access SQL Server 2005

Posted 07 March 2012 - 04:58 PM

I take it there is an option to pay for hosting of the database allowing the Java program to connect to the db remotely?
Was This Post Helpful? 0
  • +
  • -

#6 blackcompe   User is offline

  • D.I.C Lover
  • member icon

Reputation: 1159
  • View blog
  • Posts: 2,547
  • Joined: 05-May 05

Re: Remote Access SQL Server 2005

Posted 07 March 2012 - 05:07 PM

Quote

I take it there is an option to pay for hosting of the database allowing the Java program to connect to the db remotely?


I'm sure you could do that, although I don't know much about that. I've only ever considered a web system with back end. You're talking straight access to the database. I'd imagine you'd need some kind of administrative privileges to set up the configuration. Can't help you there.

This post has been edited by blackcompe: 07 March 2012 - 05:10 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1