I have the following architecture: local C# desktop app with SQL Server Express and a central web app with SQL Server Enterprise, with db per local app.
I need to sync those two databases semi-automatically, but with some controls (and info) from an local desktop and web apps.
For example, I want for user to see when sync start, when it ended, etc. Also, if synced ok or there was an error.
What is the best solution for this problem ?
I see that there are two technologies: merge replication (works only on SQL Server level with no app interference), and discontinued Sync framework, with lots of problems. Should I create my app module for this?
Update: just to note, a web app will be fine without this, however, the reason for this sync is that as I need to have offline functionality, i.e., when network is offline app must work regulary.
Related
I developed a Winforms application with SQL Server 2008 R2 database for one my friends.
When I deployed & installed it on my friend's PC; software clearly shows database file. If he open that file in SQL Server, then he can able to watch my SQL queries, tbl structures etc.
I just want to hide all this from my clients.
How can I do this?
I search some of software on Internet. When I installed it on my PC; it not showing me any database file. How they do it?
Please help me.
If your application and database are both deployed on your friend's PC, there's almost nothing you can do to truly block him/her from getting to your database.
There is no feature in SQL Server that blocks schema view from an authorized user (e.g. admin) and if you own the machine, you can present yourself as admin to SQL Server in multiple ways even if you were not originally added to the admin role or given SA account access. You can setup hurdles like putting everything in stored procedures then encrypting the SP but it's just a small hurdle, not a wall.
This is not unique to SQL Server, the same issues apply to pretty much any RDBMS in the market. If you own the box, it's not hard to get to the DB contents. Software vendors have been trying do this for decades and most just give up and protect their IP legally instead. That's no consolation for you but it is reality.
If using a service like Azure is viable, you can host your app in Azure and the database can be Azure SQL DB or a regular SQL Server in a VM. I'd recommend the former if the feature set and surface area work for you; it's not identical to the SQL Server box product you're accustomed to. However, it is far less work for you to manage and secure. With the app also in Azure, your friend and clients will access via a browser and never have direct access to the database. Even if the app is installed locally on your friend's or clients' machines, it's easy to design the app such that they can only access data and nothing else.
I am planning in creating a student information system where multiple computers can access the same server through LAN connection. The server will have a database about the students information. I pretty much have a background in creating a program similar to this but i was only able to make it for 1 computer. I don't know how to connect that database to another computer. Like for instance:
Teacher A uses Computer 1 to access the Student Information System and
Teacher B uses Computer 2 to access it as well. Any modification done
by Teacher A will be updated to the database and it will be seen as
well for Teacher B.
And my other concern is whether I should make it web-based or not. I only have an experience with using WPF Application for this kind of system but someone told me that its easier if i used a web-based instead in this kind of networking idea. Can you tell me the advantages and disadvantages of using a web-based and its counterpart.
to summarize:
How can I connect multiple computers to access a single database system.
Which is better to use if its web-based application or desktop application.
Much appreciated.
Couple of points
Set up a machine for making it a server where your database will be residing. All the machines will be pointing to this server and database using LAN.
You can create both web based and desktop based application. I would prefer to go for web based application so that in future you can extend to access this system outside the college premises.
Both Web based and desktop based application can work for you in this case. For the database you can use SQlServer2008 and share this database over the LAN so that it can be accessed from all the computers in the network.
You must create one server machine for the database which will be accessed by other client machines on your LAN.
It is quite easy you just need to give the ipaddress of sql machine in connection string instead of "." And every thing else will be same .
You will have more than one solution to make the database be used in different locations.
1- Regarding the desktop application we can setup the application on a terminal server (considering the server configurations and how many users will access the server) and the user will access the sever through the terminal service (the application will access only one database for all users in different locations.
2- The desktop application can be run in a several locations accessing a database at the same location, By using the (Database Replication) we will have an updated data in all location.
3- The application that the users access over the internet is called a (web application), it is a software that is accessed through a web browser running on client’s machine called a web application, the application will access only one database for all users.
4- Adding a (web service) to the desktop application will allows different machines to interact with each other through a network.
The question is which is the best solution?
Option (1) is the easiest one because we don't need changing anything in the application but if the internet connection is disabled no one can access the application and if a bad internet connection then we will facing many complaints from the users.
Option(2) is good because we don't need changing anything in the application as well the database server will replicate the information with each other and update the information for all locations.
I prefer option(4) when designing a new application.
I prefer option(2) when the application is old and there is no ability to modify or it will take a lot of time to modify.
designing Client Server Application in C#
I'm developing an application for copying and creating files between local network shares in 1 GB connection. This application will run on a local machine with that connection.
Now I have to introduce a Client-Server connection in a way that the User can perform the same steps from his Home PC. For that reason I have to setup a Server on the local machine which has 1GB connection to the network shares and access that server application from Home to perform the same actions as the User is on his local workspace.
Once again I want to clarify that the application now is running well on a local PC with 1 GB connection. I want to reach as much as possible to that via with the Client-Server. And once again, I'm not copying files from the Client to the Server or anything like that. It is only interaction between the local shares. So I want to be able to perform a copy function from local/share1/folder1 to local/share1/folder2 from the Home PC.
I'm new to Client-Server applications. And I have no idea how to set up that. Any recommendations/suggestions are welcome. My current application is developed in C# Visual Studio, so I believe that I should better use .NET Remoting or some other already supported by Visual Studio. All I could find on the internet is how to set-up a client server application for chat, I see nothing similar to my case.
Any design decisions or code will be really helpful at this moment.
There is no need to attach snippets of my code (I guess), because the application is already running locally and I don't have to change it.
Thanks in advance!
I am tasked with creating a central Database for a small office to allow multiple computers to connect to a database using a C# program. I have already written the program and it currently connects with a database that is in the bin folder.
I am completely lost as to how to move on to creating a multi user environment. I searched all around SO and tried downloading Microsoft SQL Server, but I have no idea how I would set this up in the office and allow it to be accessed from multiple computers. Also, from the information I've gathered, Microsoft SQL Server needs to be running at all times to allow a connection -- this isn't a deal breaker, but is there any other methods that wouldn't need this? There isn't exactly a "main computer" in the office that is always running.
To run a centralized sql server database in your office you would at a minimum setup sql server on a "server". The server can be pretty simple unless you expect a heavy user load.
The server has to be on in order to allow connections.
Sql Server exists in a free version called Sql Server express, but it has limitations when it comes to scalability, so it's not meant for large systems.
You can download it and install it on your server in the office and connect to it through a connection string in your application.
You can also consider open source platforms like mySQl, but it would still require a central server.
Alternatively you can consider a hosted solution where you have a company host the database for you in their data center.
If you do not have the server computer in your office that will host the DBMS and allow others to connect to your DB using the web interface, try to use Windows Azure. This will cost you some money. Here you need to estimate what is cheaper for you: purchase a server or pay for the azure.
We have developed an iPhone application which communicates with SQL server database via asp.net hosted on a public server. We have completed all the development and we need to test this with live server data.
Now we understand that live server database is using dynamic ports and cannot be accessed from our asp.net script. Database administrator is against changing the dynamic ports as they are worried about the security threat. We tried asking them to change this by giving access to the server where we host the asp.net web service but they are not willing to do this.
The solution they are asking is to develop a windows service which would act as a middleware between their SQL server database and our web service. They are ready to open ports for running that windows service on their server. Our iphone app need to take values from database as well as insert values to the databse.
We need to know if this is feasible to develop a windows service and if yes, can someone can guide us how to develop this?
Their server is running windows 2003 and SQL server version is 2008
this are good reads on how to start creating a window service
http://msdn.microsoft.com/en-us/library/zt39148a(v=vs.80).aspx
http://tech.pro/tutorial/895/creating-a-simple-windows-service-in-csharp