1

I have an application that accesses a sql server 2008 database. The server and database is stored on my local harddrive and I would like to learn to scale this up to having multiple users in our office access the application which I will i deploy on a server. For now the database will stay on my pc until I am ready to put it on a dedicated server for myself but for now how do I allow the application still to access my database. Here is my current connection string:

 <add key="ConnectionString" value="Data Source=.;Initial Catalog=SearchEngine;User ID=sa;Password=pss;Trusted_Connection=False;" />

Now I know how to deploy a general vb.net application but what I dont know is what to do with the database.

Please help with any advice

3
  • 1
    Two things, never allow a user to connect as sa, that is sysadmin and no user should ever under any circumstances have those rights. Create a login with limited rights for the users. Second it is a very poor idea to leave a production database on your personal pc. Your machine will slow down to be unusable very quickly as mulitple users access. SQL server will grab all the avaiable memory to opreate. Never go to prod without a separate server for SQL server. Commented Mar 20, 2010 at 18:03
  • Also the database probably has a limited number of user connections. Commented Mar 20, 2010 at 19:31
  • Thanks. I will create login profiles for the users. My senior just wanted to check my application and have it be able to be run from any machine in our office. The database will be deployed to a server once I get that priviledge. Could I perhaps create an instance or copy of the database and deploy it on the same server as the application. the application is on a shared drive right now. Commented Mar 22, 2010 at 14:07

1 Answer 1

1

What is your problem`?

  • Deploy the application
  • Change the connection string to point to your server. Note the "Data Source=." in the Connection string? That "." is the server name - it points to the local machine. Put in the db server name there.
  • Make sure your database is reachable (i.e. no local firewall, tcp enabled on network). Especially the last point is important - new SQL Servers per default are not rachable externally, you need to change that with the configuration tools.
Sign up to request clarification or add additional context in comments.

2 Comments

Thank you for your reponse. Before I deploy the application, I wanted to know the connection string. I changed the data source to test it with my local machine name and server name. This did not work.Will only "." work to point to local machine? I have TCP/IP enabled, I have a firewall (zonealarm)...do you suggest disabling it or just addind sql server to the accepted list?
Well, frankly, I have never seen "." to indicate local workstation - I only know localhost. I wont tell you how to handle your firewall (and take responsibility for anything) but at MINIMUM you must make sure the port assigned to SQL for it's communication is open (which normally is 1433 unless you change it).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.