Forum Replies Created

Viewing 15 posts - 496 through 510 (of 608 total)

  • RE: error in stored procedure

    ALTER PROCEDURE [dbo].[usp_delete]

    @tablename sysname,

    @pid int,

    @pidname varchar(10)

    AS

    DECLARE @sql NVARCHAR(MAX),

    @Params NVARCHAR(MAX);

    SELECT@sql = 'DELETE FROM [' + @tablename + '] WHERE ' + @pidname + ' = @pid;',

    @Params = '@pid INT';

    EXEC sp_executesql @sql,...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: SQL Agent Job succeeds even though step should fail

    I am having the same behaviour with SQL Server 2012 RTM.

    I came up with the following workaround for my environment. This code should go into a job step immediately after...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Why is my transaction log full?

    Hi Gail,

    Can I please ask a quick question. In your article you say the following:

    Log backup

    The log backup wait reason will never appear in Simple Recovery.

    Now I do agree...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Intellisense - Table definition (hover over *)

    Bruce Edney (11/14/2012)


    This mean you need to go to Object Explorer when building temp tables etc. Very frustrating

    If you highlight a table name in a query window and press ALT+F1...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: DbMail, Service Broker and P.L.E.

    This is getting very complicated, I am finding more and more problems. I will feedback once I better understand what is going on. In the meantime, the memory usage in...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: DbMail, Service Broker and P.L.E.

    opc.three (11/14/2012)


    Thanks for the detailed write-up! Are you confirming that the reduction in reads due to adding a new covering index has curbed the PLE drops?

    I wasn't able to confirm...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: DbMail, Service Broker and P.L.E.

    opc.three (11/13/2012)


    Thanks for looking into this. The server has improved with a few basic configurations that were not correct, but I am still seeing my PLE drop significantly

    on the...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: DbMail, Service Broker and P.L.E.

    I have spent most of the day compiling a reply, using a few minutes here and there, and while getting the information you requested I think I have found the...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Release unused space in the mdf file

    dsanchez-630020 (11/9/2012)


    Is there away without shrinking the database to get back the space when we delete big files in our database?

    Paul Randal's Shrink Alternative:

    So what if you *do* need to...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Huge cost issue with Temp DB using 2008r2 sp2

    Where are your TempDb files located?

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Creating index

    kapil_kk (11/3/2012)


    I want to create non clustered index on a view to check the limit that how many non clustered index can be created on a view.

    Why?

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Formatting date of birth using South African ID number

    There is no reliable way to convert YYMMDD to YYYY\MM\DD and that is why every form I have ever filled in has an entry for ID Number and an entry...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Huge cost issue with Temp DB using 2008r2 sp2

    Can you run this on both servers

    SELECTOBJECT_NAME(s.object_id) AS TableName,

    s.name AS StatsName,

    s.auto_created,

    s.user_created,

    STATS_DATE(s.object_id, s.stats_id) AS StatsDate,

    c.name AS ColumnName

    FROMsys.stats s

    INNER JOINsys.stats_columns sc

    ON s.object_id = sc.object_id

    INNER JOINsys.columns c

    ON s.object_id = c.object_id

    AND sc.column_id = c.column_id

    ORDER...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Huge cost issue with Temp DB using 2008r2 sp2

    Your slow query has a clustered index scan on UploadedImage sending 15,152 rows to a merge join. The fast query does a seek, sending 351 rows to a nested loop...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Huge cost issue with Temp DB using 2008r2 sp2

    I wouldn't recommend them to off on tempdb, at least not the Auto Create. Can you switch them on and try your query again. Please attach the new query plan.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

Viewing 15 posts - 496 through 510 (of 608 total)