Forum Replies Created

Viewing 15 posts - 481 through 495 (of 608 total)

  • RE: How to find (or create) the stats_stream, rowcount, and pagecount used in Update Statistics

    DBCC SHOW_STATISTICS(N'[dbo].[StgVendItem]', N'XIE1StgVendItem')

    WITH STATS_STREAM

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: SQL job error

    Executing the query "EXECUTE master.dbo.xp_create_subdir N'D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\BDSBPM' " failed with the following error: "Cannot create a file when that file already exists."

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Large system coming, looking for advice of how to maintain, over 2TB.

    Michael Valentine Jones (1/14/2013)


    The sp_updatestats stored procedure is smart enough to only rebuild stats when needed, so you should be able to run it fairly often.

    I have been badly burnt...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Memory Settings Help Please

    I would definitely build clustered indexes on 1GB+ heap tables and would seriously consider applying compression to those indexes.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Data Page Allocations

    L' Eomot Inversé (12/28/2012)


    Sean Pearce (12/28/2012)


    gkganeshbe (12/26/2012)


    How to deallocate the unused pages?

    As mentioned in the reference URL you can either use the TABLOCK hint, use TRUNCATE TABLE or...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Data Page Allocations

    Hugo Kornelis (12/26/2012)


    Basics? That's not how I would describe it!

    Thanks for a good question, Sean. I think I once read or heard that after deleting all rows...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: UNIQUE constraint

    This is what Books Online says:

    Creating a PRIMARY KEY or UNIQUE constraint automatically creates a unique index on the specified columns. There are no significant differences between creating a UNIQUE...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Request

    Thanks for the kind words, a real compliment from professionals in my industry.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: To drop all tables from a database

    arthi.anan (12/13/2012)


    Thanks all....

    My database name is Serv and I have 150 tables and 200 procedures...

    How would i give it in this query...

    Can u please make me clear

    IF EXISTS (SELECT *...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: How to return a certain percentage of rows (NOT TOP PERCENT QUESTION)

    create table #temp (customer varchar(15),number int)

    insert into #temp select'A',1

    insert into #temp select'B',1

    insert into #temp select'C',1

    insert into #temp select'D',1

    drop table #temp

    What is the expected results of selecting 25% of the above?

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Query optimization

    Have you updated stats? You have some serious under-estimations with the large table.

    Clustered Index Seek

    [DS_GreensDK].[DCL].[CompanyToken].[ix_CL_DCL_CompanyToken]

    Estimated Number Of Rows : 309

    Actual Number Of Rows : 13,807,291

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Dynamic SQL

    SQL_Kills (12/11/2012)


    Sorry what is the above meant to be saying to me?

    http://en.wikipedia.org/wiki/SQL_injection

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: error in stored procedure

    Eugene Elutin (12/11/2012)


    Sean Pearce (12/11/2012)


    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 =...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Dynamic SQL

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

Viewing 15 posts - 481 through 495 (of 608 total)