Shahara
Shahara

Reputation: 41

Creating a SQL Server database on a network in C# WAF

I have made a WFA. I need it to be able to install in 5 computers, one which will be the database server machine. I want to know how to create the database using SQL Server 2008 that can be used by all 5 machines.

How to create the database, create connection, and how to do relevant cording in WFA?

Please help. I know how to do this in local database, but I have no idea when it comes to networks.

Upvotes: 1

Views: 229

Answers (1)

marc_s
marc_s

Reputation: 755381

Couple of steps:

  1. Install SQL Server 2008 on your server machine
  2. Create your database using e.g. SQL Server Management Studio and .sql scripts
  3. Set up either SQL Server logins for each user that should connect to SQL Server, or e.g. define a Windows group that has access to SQL Server; give those logins the necessary permissions in your database

  4. Then set the connection string for your application to something like

    server=YourServerName;database=YourDatabase;Integrated Security=SSPI;
    

    if you want to use "integrated security" (e.g. user just accesses SQL Server using this Windows credentials), or set it to:

    server=YourServerName;database=YourDatabase;User Id=User;Password=password
    

    if you want to use explicit SQL Server logins for each computer/user

  5. make sure the client PC's are connected to the network where the SQL Server machine lives, and make sure no firewall is in the way (or if it's there - it allows TCP and UDP traffic on SQL Server's standard port 1433 to pass through)

Upvotes: 1

Related Questions