How to Windows Service insert data to SQL Server [closed] - c#

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.

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

Backup using linked server [closed]

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!

Can a C# WinForm app use a remote MySQL connection? [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
Is connecting to a remote MySql database through WinForms as simple as changing the connection string, or are there more steps required?
Is connecting to a remote MySql database through WinForms as simple as changing the connection string
Yes, It is.
or are there more steps required
And more steps are required such as allowing remote connections, getting through firewall if any. Proxy settings etc.

Why do i get results in the web client even though the server is off? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I am a web service applications beginner.
I wrote a web service application and a simple web client application in order to test the service.
It works fine, but i found out that even when the service application (that runs another application) is off, i can get the result at the client side.
Is it ok? If not, what could be the problem?
I can only think of two possible explanations -
Either pages are cached somewhere (client, proxy servers, web servers) or the client does find a server (as in - it isn't off, or it doesn't go to the server you think it is)

WCF client server Application [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 want to create 2 applications. i.e, 1 for client and another 1 for server. Client app will be installed in so many computers and service should be run automatically.
If i open the server app, i need the client computer details and select the computer and send some operation like shutdown. then the client computer should execute the shutdown code and it should be turned off.
Please can u tell what type of concepts i have to use in Windows communication service. I'm new to Windows communication service.
what you need is a duplex communication you can start with wsDualHttpBinding the link bellow provide a good example for starting, and in second time you can host your service in windows service on both client and server something like in this link
hope this help

Categories