[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Two SQL servers, 1 Database

Posted on 2012-09-21
7
Medium Priority
?
256 Views
Last Modified: 2012-11-08
Hello,

is it possible to have 2 SQL servers , but 1 DB file on a NAS location ?
I want to write a web application, but it needs to run on 2 pc's , but I want it to be possible that the pc's don't need to be powered on all the time.
0
Comment
Question by:troosters
7 Comments
 
LVL 5

Expert Comment

by:sameer_goyal
ID: 38422652
No its not possible. Every DB on each server needs an exclusive access to the DB file.
0
 

Author Comment

by:troosters
ID: 38422657
Better work with some kind of textfile then ?
0
 
LVL 5

Expert Comment

by:sameer_goyal
ID: 38422665
Can you discuss your requirement in a little bit of detail here? May be i can suggest an approach
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:troosters
ID: 38422711
Well it's for a client who has 2 pc's and he wants to add appointments in some kind of calendar application. Most of the time he does it on the pc in his office, but sometimes also on the pc in another room. Now he has some old program and for this both pc's need to be powered on plus the old program won't run on Windows 7.
So I need to add the appointments in some file that is located on an external disk . My knowledge of xml is nothing, so I thought to use a db on a nas, but as that does not work, maybe use a txt file ? or xml file
0
 
LVL 5

Expert Comment

by:sameer_goyal
ID: 38422785
And you are creating a web application using ASP.NET?

I think Text files can work. Or you can use WCF services.

Have you worked with WCF before?

That way, you can actually create a service on the primary PC to provide the database access, you know. So you can from the other PC, through the service, access the DB and do what you want.

That way, there will be a centralized DB.

Alternatively, do you think you can connect these 2 PC in a network of some kind?
0
 
LVL 14

Expert Comment

by:mds-cos
ID: 38422816
I am giong to write a dissenting opinion.  Yes, it is *possible* -- but only in very limited and controled circumstances.

For example, if one of the PC's will be a cold spare, configured exactly the same as the first -- never powered on when the first PC is running -- you could do it.  Or if you can guarantee that when computer 1 is being used computer 2 will be off, and vice-versa.

I am certainly not recommending that you do this -- and in fact strongly recommend against it.  But your question being "is it possible"...yes it is.  But you are more likely to end up with destroyed databases than happy results.



Better approach, if you really can't have a dedicated SQL server that is always on, would be to synchronize the two databases.  There are several database sync software packages that will handle this.
0
 
LVL 7

Accepted Solution

by:
MrAli earned 1500 total points
ID: 38423365
You can use SQL Server 2012 "Always On" to create an availability group

You can use Windows Server 2008 R2/2012 Clustering which will be expensive but will work

You can use a "SQL Fire" type solution for a quick load balancer solution, this works in VM Ware from what I've seen.


Seems like you need a different solution for your appointment app.  This sounds like way too much in licensing and server overhead, but I could be wrong.
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question