Author |
Topic |
manju3606
Yak Posting Veteran
78 Posts |
Posted - 2011-12-28 : 05:28:47
|
Hi to all ,i am storing query's witch are used in ssms through application. I want to know which are tables used in those queries through application. My problem is i can't see those queries but i want to know which tables are used in those queries.thanksManju |
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2011-12-28 : 06:32:23
|
storing queries? PLEASE say you mean as a stored procedure and not a varchar(max) column.http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspxHow to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
|
|
manju3606
Yak Posting Veteran
78 Posts |
Posted - 2011-12-28 : 06:58:51
|
Hi Donatwork,yes i am storing queris in a table, not a stored procedure and please dont tell me about profiler i dont want to use that.ThanksManju |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-28 : 07:21:16
|
why do you need to store queries themselves as values in a table. thats certainly not a good approach.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
manju3606
Yak Posting Veteran
78 Posts |
Posted - 2011-12-28 : 07:29:47
|
Hi Visakh,client want to see witch query's are useing or used in ssms.so for that purpose i am storing those query's witch are used in ssms.ThanksManju |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2011-12-28 : 10:15:03
|
quote: Originally posted by manju3606 Hi Donatwork,yes i am storing queris in a table, not a stored procedure and please dont tell me about profiler i dont want to use that.ThanksManju
If you do not want to use the correct tool for the job, then i cannot help you.http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspxHow to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-28 : 11:39:57
|
quote: Originally posted by manju3606 Hi Visakh,client want to see witch query's are useing or used in ssms.so for that purpose i am storing those query's witch are used in ssms.ThanksManju
why should you store it in table?FOr that you can make use of dmvs or profiler traces------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
X002548
Not Just a Number
15586 Posts |
|
manju3606
Yak Posting Veteran
78 Posts |
Posted - 2011-12-29 : 00:38:25
|
quote: Originally posted by visakh16
quote: Originally posted by manju3606 Hi Visakh,client want to see witch query's are useing or used in ssms.so for that purpose i am storing those query's witch are used in ssms.ThanksManju
why should you store it in table?FOr that you can make use of dmvs or profiler traces------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
client don't want to use profiler,and from Dmvs i cant get all data, in some case like dmvs have some time of pired to store data and if server restart then i cat get old data from dmvs and etc.Thanks Manju |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-29 : 00:48:44
|
hmm...okwhat will these queries be used for? just analysing or they'll try executing it too?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
manju3606
Yak Posting Veteran
78 Posts |
Posted - 2011-12-29 : 01:07:56
|
They want to analys these queries and now they want most used data in the database so for that they want to cxecut these query and i told them thats not a good idea but they are not listening me could you please tell me any way to get most used data and not used data from database ThanksManju |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2011-12-29 : 06:42:40
|
quote: Originally posted by manju3606client don't want to use profiler,and from Dmvs i cant get all data, in some case like dmvs have some time of pired to store data and if server restart then i cat get old data from dmvs and etc.Thanks Manju
Then the client does not understand what they want.http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspxHow to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
|
|
X002548
Not Just a Number
15586 Posts |
|
|