Forum Replies Created

Viewing 15 posts - 181 through 195 (of 2,647 total)

  • RE: Declare error message before CATCH?

    Sean Pearce (1/21/2013)


    SQLKnowItAll (1/18/2013)


    ..., but I don't know how to test.

    Did someone steal your login credentials?

    CREATE PROCEDURE TestErr

    AS

    DECLARE @Err NVARCHAR(255);

    BEGIN TRY

    SELECT 1 / 0

    END TRY

    BEGIN CATCH

    SET @Err = 'Errrr';

    RAISERROR(@Err,...

  • RE: How to save sp exec result into a temp table

    Jeff Moden (1/18/2013)


    INSERT INTO #BreakDownByCategories

    EXEC dbo.spGetCategoriesByDocIDAsTable @DocID

  • RE: Index question

    If it is as simple as what you provided... creating an index on Table2.FieldB will "probably" help. It will get rid of the scan and use a key lookup...

  • RE: Index question

    I would answer this for you, but it is easy enough to set up and test. Look at the execution plans both before and after the index...

  • RE: How do I clear out old Backups?

    Where exactly are you changing this? In a script? In a maintenance plan package? No matter which one... Please provide details of the script/package. My initial assumption is...

  • RE: Unwanted parameter truncation

    pdanes (12/19/2012)


    David Webb-200187 (12/19/2012)


    You could send a fixed terminating character on the end of your variable parameters and check to see if it is actually the last character in the...

  • RE: Unwanted parameter truncation

    pdanes (12/19/2012)


    GilaMonster (12/19/2012)


    pdanes (12/19/2012)


    Don't you get a performance hit from passing a table over the network, rather than a single string? And I think the server would parse it a...

  • RE: Unwanted parameter truncation

    Don't you get a performance hit from passing a table over the network, rather than a single string? And I think the server would parse it a lot faster than...

  • RE: Unwanted parameter truncation

    It really depends on what you are doing with it. When the parameter is passed in and is 9000 characters, where does it get stored? It is not like...

  • RE: Record Counts Script is not accurate

    I use this:

    SELECT s.name, o.name, SUM(ps.reserved_page_count * 8),

    SUM(CASE WHEN ps.index_id < 2 THEN ps.row_count ELSE 0 END)

    FROM sys.objects o

    INNER JOIN sys.dm_db_partition_stats ps

    ON o.object_id = ps.object_id

    INNER JOIN sys.indexes i

    ON ps.object_id =...

  • RE: Unwanted parameter truncation

    I would say that in the case where a parameter is passed to the stored proc that does not match the size of a particular column (i.e. a delimited string),...

  • RE: Unwanted parameter truncation

    pdanes (12/19/2012)


    GilaMonster (12/19/2012)


    I'm going to be unpopular here but...

    Dependency analysis?

    Regression testing?

    Unit tests?

    Sure, making all parameters and variables varchar(max) would work. Shall we make all table columns varchar max too (if...

  • RE: Replication options - merge or peer-to-peer

    ktalley.dba (12/6/2012)


    I think this option (Transactional Replication with Updateable Subscriptions) is deprecated. It won't be support after SQL 2012.

    Well... The option is not there in the GUI in 2012,...

  • RE: Replication options - merge or peer-to-peer

    If you are using SQL Server 2008 (which I have to assume you are since this is a 2008 forum), you should use Transactional Replication with Updateable Subscriptions. This is...

  • RE: exec commad info

    Did you highlight it and try to run it? That's the best way to find out...

Viewing 15 posts - 181 through 195 (of 2,647 total)