Click here to Skip to main content
15,891,372 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,


I am about to start a window service which is used to track all the connection made to sql server from microsoft excel and when ever user opens a excel and connects to sql server to manipulate data using excel i should track all the things which is done in excel using sql for example connecting to sql server is given in the below link

http://helpdeskgeek.com/office-tips/excel-to-mysql/[^]

here i want to track the connection made to sql server database from excel in a windows service .

It will be helpfull for me to get a lead on how to start . Like if a user connects to database from excel my windows service should keep a track of it in a text file or anything.


Thanks & regards
Rakesh Kumar B
Posted
Updated 6-Sep-15 0:29am
v2
Comments
j snooze 4-Sep-15 17:43pm    
why would you use a windows service for this? why wouldn't you build something in sql server to trigger off a connection from excel and log it in a table? Then if you want to display it as a report in excel I could see that. Just asking, I don't know your requirements.
Member 11956113 7-Sep-15 2:47am    
Hi jsnooze ,

I choose windows service because as soon as computer starts this service will be started automatically if its not appropriate please let me know which one is suitable , And my requirement is like i have 4-5 production database and some of the developer will connect to the database of the production through excel my application should track all the things developer as done from connecting to the DB, Querying, and closing of the DB in excel . Thank you for your reply . It will be helpful if i get a lead in tracking those things

Thanks & Regards
Rakesh Kumar B
sreeyush sudhakaran 6-Sep-15 1:37am    
SQL have builtin function of Logging you can make use of that Refer : https://msdn.microsoft.com/en-us/library/ms141212.aspx[^]
Member 11956113 7-Sep-15 2:49am    
Hi Sreeyush,

I want to track only the connection opened through Excel, and it is a production database can we use the approach which u suggested on production database.
Thank you very much Sreeyush for the reply

Thanks & Regards
Rakesh Kumar B
sreeyush sudhakaran 9-Sep-15 2:17am    
One option is you can populate the data to a Log table and can access it remotely , and also as far as my knowledge I think there is no way to get connection opened by Excel to Database from DB Logs , try a work around excel interops sorry I am not sure about it provides such functionality for your requirement.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900