Forum Replies Created

Viewing 15 posts - 1 through 15 (of 20 total)

  • RE: Find the most executed stored procedure(s)

    Hi samp 35029

    Thanks for the reply.

    I'm unsure how useful this script is for an 'active' database.

    Running against our development server, with few if any active connections at the time,...

  • RE: Find the most executed stored procedure(s)

    Hi asdawkins 16457

    Thank you for your kind words, appreciate it.

    Thanks for this. I will be using it a lot.

    How do I add a column that shows the "last execution date"?

    I...

  • RE: Display the SELECT statement for any table

    Well said @below86

    Thanks 'You name Here', its been a good day for gaining new knowledge. Not real sure where or when I would need to do this...

  • RE: Display the SELECT statement for any table

    Hey "Your Name Here" thanks for the example.

    I guess the real draw would be if you wanted to automate a series of events. I'm probably not coming up with the...

  • RE: Display the SELECT statement for any table

    That's great Owen White .

    Thank you for the script. I have updated this to a stored procedure that I can pass in the table name:

    CREATE PROCEDURE dbo.UTIL_DynamicTable_SELECT

    @mStrTable varchar(255)

    AS

    -----------------------------------------------

    --Display the...

  • RE: Display the SELECT statement for any table

    below86

    below86

    Why don't you just right click on the table name in SSMS in the object explorer and do 'Script table as' then select 'SELECT to'. This will do the...

  • RE: Display the SELECT statement for any table

    Tom_Sacramento

    ---------------------------------

    ---Complete working example---

    ---Apologies for any mix ups.

    ---------------------------------

    --Create a test table & insert test record.

    Create Table TestSelect (tstField1 Varchar(10), tstField2 Varchar(10), tstField3 Varchar(10))

    Insert into TestSelect Select 'A', 'A1',...

  • RE: Display the SELECT statement for any table

    Thanks Ken Hedges

    ---------------------------------

    ---Complete working example---

    ---Apologies for any mix ups.

    ---------------------------------

    --Create a test table & insert test record.

    Create Table TestSelect (tstField1 Varchar(10), tstField2 Varchar(10), tstField3 Varchar(10))

    Insert into TestSelect Select 'A', 'A1',...

  • RE: how to take script for database table data

    Hi Durai,

    Reading your reply - are you suggesting that the generation of scripts is not possible in SSMS 2005 ?

    Hopw this is not available in SQL 2005.

    Kindly check...

  • RE: Display the SELECT statement for any table

    Fair point HextallFanForLife.

    You can try the following if you want the Schema name to be included too.

    DECLARE @mStrColumns VARCHAR(8000) , @mStrTable VARCHAR(100)

    SET @mStrTable ='TABLE_NAME'

    --

    SELECT @mStrColumns = COALESCE(@mStrColumns + ', ',...

  • RE: how to take script for database table data

    Hi,

    If this helps - you can script the database items using the Generate Scripts option for your selected database.

    [p]

    1. Right click on your database in SSMS, select Tasks...

  • RE: Using sys.dm_exec_requests to estimate completion time for a process

    Nice script Smitha.

    Just a quick addition to your script , in regrads to backups and restores we could use the STATS option which will show the percentage as required....

  • RE: Copy Multiple objects from One Schema to Another Schema

    Hi Vinay, nice script.

    Liked both your scripts for objects copying across schemas. Just wanted to share this other way to add SQL objects to multiple database on a server.

    http://www.sqlservercentral.com/Forums/Topic1168030-9-1.aspx

    If...

  • RE: SQL Process % Complete

    Fair point trstringer. 🙂

    You can use the WITH STATS for Backups or restores which can serves as a progress bar and displays the percentage of work done continuously....

  • RE: SQL Process % Complete

    Hi rajvenkat87

    Just checked your post. I do not understand your question, Kindly eloborate on it please.

    Regards,

Viewing 15 posts - 1 through 15 (of 20 total)