Backup using linked server [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
i am working on project in which we need to take backup of our database(schedule backup at Every 5 min SQL SERVER 2012) to remote server(SQL SERVER 2012) . now if server crashed for some reason then our website should automatically be connected with other server. can we use linked server for that of something else we can do

I would suggest to follow the standard solution for simple redundancy scenarios which is database mirroring. Automatic failover works with having a witness machine which handles the database communication and in case a database server fails, the traffic is redirected to its mirror automatically.
However, note that this architecture leaves you with a single point of failure, the witness. If the witness fails, you have to use redundancy strategy for it. The advantage is that this new recovery process, will not include the database recovery process itself.
Hope I helped!

Related

Is there a usefull way to monitor SQL Server connections activity? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm developing a C# application which will monitor SQL Server connections activity.
The kind of information I would like to monitor:
Process id which established a connection
queries and actions performed by the connected process
Is there a programmable way?
Asaf.
SQL Server already offers this, via Extended Events. Just follow the tutorial Monitor System Activity Using Extended Events. The fact that you want to do this from C# is completely irrelevant.
You can use SQL Server Profiler
SQL Server Profiler is an interface to create and manage traces and analyze and replay trace results. Events are saved in a trace file that can later be analyzed or used to replay a specific series of steps when trying to diagnose a problem.
first you need to start SQL Server Profiler
Then make the following settings in the Events Selection section,then You can see the query that goes to sql
Then: Run SQL Server Profiler
Tutorial:here

Local Backup vSphere SDK [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I'm working on a desktop application that purpose is saving a backup of a Virtual Machine stored in an ESX without vCenter in local storage. I'm currently using the vSphere SDK for C# and I'm working on a WinForm. I have a box for selecting the machine and a button to make a backup of selected running Virtual Machine on my laptop. I can't find any method in the vSphere SDK to help me for backing up a running VM.
Any advice will be appreciated.
I had the same problem and i found this solution but through PowerCLI.
I made a power shell script that allowed me to export the VM as a .OVA file in a local storage.
You cannot perform the Export command when the VM is powered ON. The only way to perform a backup of a powered on VM ,is having a licence with the vCenter.
Hope it will help you.

SQL Databases on more than one computer [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I'm writing a desktop program that allows you to view customer information, as well as adding, removing, editing etc. It's to be installed onto a friends computer. The database will be stored locally on one computer. Only one user will be able to access the database via the desktop application.
If I were to publish it, and attempt to run it on another computer, would it work? Or would that computer also need SQL Server on it?
I assume you are talking about a desktop application. If this is so, you can provide your application to someone else and have them use it. However, there are different points that you need to consider:
Where will the your code reside?
Where will the database reside? Is there 1 shared copy or will each user has his own? This has a major effect on the ease of installation and the cost of your application.
If the database is shared, do you have a Server to host the database where all users will logon to?
Does the database have a max. number of users (limit/meter)?
Will the database be behind a firewall?
How many copies of the database need to be purchased?
It depends.
If you just use the most basic database connection options then either the other machine will need to have sql installed, or the other machine will need to have network access to the database running on your server.
If your application is intended for a corporate intranet having a single DB server running on the network is probably an acceptable solution. For anything else it probably isn't.
If your users need to share data I'd recommend hosting the data on a server yourself and exposing it to the end user as a web service instead of a raw database connection.
If your users don't need to share data, look into compact databases intended to be embedded in applications. Since you're using C# I'd recommend SQL Server Compact because it speaks the same flavor of SQL as Microsoft's larger database products. The other major player in this space is SQLite; which is dominant outside of the Microsoft stack.

Backend or database system for small business application [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'm coding a program for a small business. The application's going to be used for store-keeping and the ordering of parts for a mechanical shop. I need some type of backend to store orders, article numbers & prices, customers and so on (obviously). Right now I'm using a local MySQL server and running queries directly from the code. This is not ideal because of the risk of a system meltdown or similar. I've thought about running a local MySQL server - with a scheduled backup on a remote host, but I'm hoping there's a better solution. For previous applications I've written a PHP wrapper, and used a web hotel to host the MySQL server - Which isn't ideal either for security reasons. I suppose I should mention the application's written with windows forms in the VS .net environment(in C#). My question's this: How do I set up a MySQL server (or other type of database system) on a remote host - that I can run queries on and then return the result back to the application? Preferably I wouldn't want to handle the MySQL server myself but outsource it. I don't mind renting a server from some host - if it will spare me the hassle of setting up a local server machine to run separately. Are there any solutions that you can rent for this purpose? I'm sure there must be tons of information about this on the interwebs but I can't find anything. I would be very thankful if anyone could give me some pointers!
One way you could do this is rent a cheap VPS and host mysql in there. I have been using DigitalOcean, and it is pretty good. For your needs a $5 per month VPS would be enough.
Or you could use Azure. http://www.windowsazure.com/en-us/services/data-management/

How to Windows Service insert data to SQL Server [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I'm beginner to windows service. I want to build a windows service that insert data to sql server scheduled. Anyone could help me how to program this task.
Here is a:
step-by-step procedure for creating a Windows service in C#
Accessing SQL Database from windows service has the same code that is used for normal applications.
You may also want to think about a sql agent job. SQL Agent is a service that comes bundled with MS SQL server and allows you to perform a mirad of tasks on a scheduled basis. It is much easier than crafting your own windows service and it doesn't require a formal installer to get it going.

Categories