Find out the slow running stored procedure [duplicate] - sql

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to find slowest queries
In Sql Server 2008, is there any option to find out which stored procedure running slowly among all (When the no. of stored procedures is very large. Ex: 500)

Hey Kiran Please refer to this question may be it will answer you
How to find slowest queries

Related

How to develop a parser for sql statements? [duplicate]

This question already has answers here:
SQL parser library for Java [closed]
(7 answers)
Closed 7 years ago.
Is there an example available which can help me to develop a parser to check whether a SQL statement is syntactically correct or not.
Any source where I could learn to use parsing tools for the purpose?
Examples of SQL parsers are available in all the open source SQL databases.
MySQL
Postgres
h2o

Can I recover accidentally deleted data in SQL Server? If yes How? [duplicate]

This question already has answers here:
How to recover deleted rows from SQL server table?
(4 answers)
Closed 8 years ago.
Unfortunately I deleted one important record, and I didn't use the transaction. And I am using simple recovery model, can I recover my data? If yes, how? Please help me and thanks in advance.
You can't recovery your data if don't have any backup, CDC or Database Audit.

Difference between Script, Stored Procedure, T-SQL, PL/SQL [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 8 years ago.
Improve this question
I'm getting really confused with all these terms. I used to attend a class called PL/SQL, then when I came out to work, I came across other terms like Stored Procedure, T-SQL and even script. They all look very similar to me, but exactly what are the differences between each of them? (if any)
Here's some rough definitions to explain the differences.
PL/SQL - a SQL variation specific to Oracle databases.
T-SQL (Transact-SQL) - a SQL variation specific to Microsoft (and Sybase) databases.
Stored Procedure - a set of SQL commands that is precompiled and stored on the server for reuse
Script - a set of SQL commands that is run ad-hoc (not precompiled / not meant for reuse)
There are more differences between Stored Procedures and Scripts (e.g. sprocs can have parameters, etc.) but that's the fundamental difference.
T-SQL is Microsoft's version of SQL. PL/SQL is Oracle's version of SQL. Both are ANSI SQL compliant, but contain additional capabilities that are not in the standard.
A Stored Procedure is a prepared SQL statement that is stored on the database server, and can be reused by calling it.
Script is basically code, but scripts are typically small, standalone programs that operate without the aid of a GUI. A Stored Procedure could properly be called a script.

Is there any way to view the last run sql query in sql server managment studio [duplicate]

This question already has answers here:
How to see query history in SQL Server Management Studio
(14 answers)
Closed 9 years ago.
I have run a query a few days before but its lost now I did not save it can you please help me whether we can find the last run query in sql server managament studio.
I suggest using SSMS Tools in the future.
Among several other features, it also keeps a history of queries run.

How to search all tables in a database for a particular value? [duplicate]

This question already has answers here:
Find a value anywhere in a database
(18 answers)
Closed 10 years ago.
Is there a query or tool that will search all tables/fields for a particular value?
The program is storing cost in a field and I can't find it.
Profiler is not an option.
Thanks in advance,
Bryan Moore
there are a couple of undocumented stored procedures which iterate across all tables and all db however the exact answer is here: http://vyaskn.tripod.com/search_all_columns_in_all_tables.htm Actually this is a fine site and well worth general browsing as there are numerous answers to obsure and not so obsure questions that come up from time to time.
Hope this helps