Forum Replies Created

Viewing 15 posts - 7,501 through 7,515 (of 26,490 total)

  • RE: Converting a old .sql to new

    Not sure, but this looks like it may be for MySQL not MS SQL Server. I don't have the time to look harder at the moment as I am...

  • RE: Funnies on Views???

    Sean Lange (5/28/2013)


    Yet another reason NOT to use select *. 😛 I have answered this exact same question at work twice in the last week.

    I have to agree on NOT...

  • RE: Are the posted questions getting worse?

    I think Gail needs to be congratulated on her restraint. It is amazing how many people have been challenging her knowledge and experience just this weekend.

  • RE: Using fetch and cursor in a while loop

    You do realize that there is probably a set-based solution to your problem so that a cursor solution is not needed. If you would provide the details of the...

  • RE: Funnies on Views???

    That is because SELECT * does not automatically refresh as the underlying table(s) are modified.

    IF the views aren't schema bound you should run sp_refreshview 'viewname' for each view that needs...

  • RE: tempdb getting full

    Golfer22 (5/26/2013)


    ...

    If you could use table variables instead of temporary tables, that could help. But it requires a large amount of memory. Upgrading memory could help.

    ...

    Using table variables...

  • RE: Trigger for truncate

    Golfer22 (5/26/2013)


    One thing to remember is that truncating a table is not a DML operation (like DELETE). Truncating is a DDL operation. So transaction logging doesn't occur when a...

  • RE: Fragmentation accuracy? 98% fragmented?!!

    Dird (5/26/2013)


    It's the same thing -_ rebuild index -> avg_fragmentation_in_percent reduces along with page splits. I'll play around/Google at work on Tuesday for some TSQL for a rebuilding job.

    Thanks for...

  • RE: Stored Proc with temp table issue.

    BlackGarlic (5/26/2013)


    index portion of code is wrong. It's actually

    create NONCLUSTERED INDEX #idx_ID on #ID(ID) include (TID).

    But I will run it again without index portion.

    I an using following sql code in...

  • RE: Stored Proc with temp table issue.

    My SSIS is rusty, how are you invoking the procedure in SSIS?

  • RE: Curious Case of .. Syntax Error. Or may be not?

    Yuri55 (5/26/2013)


    Here we are (sorry, if this is wrong way to post script):

    ******************************************************************

    USE [DBA]

    GO

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    -- ============================================================

    --rebuild index using dbo.index_rebuild_log ahead prepared data

    -- ============================================================

    CREATE PROCEDURE [dbo].[usp_IndexRebuild]

    AS

    BEGIN

    SET NOCOUNT ON;

    declare...

  • RE: Fragmentation accuracy? 98% fragmented?!!

    Looks to me like you may have some big records in some of those tables with an avg_fragment_size_in_pages = 1. I'd be interested in the following as well:

    min_record_size_in_bytes

    max_record_size_in_bytes

    avg_record_size_in_bytes

    These also...

  • RE: Fragmentation accuracy? 98% fragmented?!!

    Dird (5/26/2013)


    Autoshrink is disabled in 10.5. There wouldn't be any manual shrinking because there's no real maintenance for our SQL Servers =//

    The 'DETAILED' option is so slow >_<

    Dird

    You won't get...

  • RE: Fragmentation accuracy? 98% fragmented?!!

    To use avg_page_space_used_in_percent you will also have to change your query to run in DETAILED mode, like this:

    ...

    FROM sys.dm_db_index_physical_stats (DB_ID(), NULL, NULL, NULL, 'DETAILED') AS ps

    ...

  • RE: Fragmentation accuracy? 98% fragmented?!!

    The table is a heap (no clustered index). The index_id will be a 0 (zero). You may want to add this column to the query also: ps.forwarded_record_count.

Viewing 15 posts - 7,501 through 7,515 (of 26,490 total)