Forum Replies Created

Viewing 15 posts - 856 through 870 (of 1,170 total)

  • RE: Change DB Owner to sa for multiple DB's

    Nice script

    The following is missing AND is_read_only = 0 in select

    INSERT INTO @LoopExecuteScripts

    SELECT 'ALTER AUTHORIZATION ON DATABASE::' + name + ' TO sa'

    FROM sys.databases

    WHERE owner_sid <> 0x01

    AND state_desc =...

    Igor Micev

  • RE: TempDB issue

    IgorMi (8/23/2013)


    GilaMonster (8/23/2013)


    No, it's not a bug. The client app ran out of memory probably due to the 'several selects for each insert'.

    Correct!

    Thank you

    IgorMi

    Issue was surpassed after I changed the...

    Igor Micev

  • RE: TempDB issue

    GilaMonster (8/23/2013)


    No, it's not a bug. The client app ran out of memory probably due to the 'several selects for each insert'.

    Correct!

    Thank you

    IgorMi

    Igor Micev

  • RE: TempDB issue

    GilaMonster (8/23/2013)


    That's a client error, not server. It's a .Net memory error (sql server is not written in .net)

    You're running Management Studio, on your client machine out of memory. Nothing...

    Igor Micev

  • RE: TempDB issue

    ...and additional

    The insert operations execute under an explicit transaction.

    I wanted to try to create a snapshot of the database and was not able because of the

    SQL Server version:

    Microsoft SQL...

    Igor Micev

  • RE: Shrink does not release space

    Erland Sommarskog (8/19/2013)


    IgorMi (8/19/2013)


    It is not good to shrink without rebuild.

    If you shrink and rebuild after then it's ok.

    No, it may be OK. In this case, the jfgrocha removed 200...

    Igor Micev

  • RE: Shrink does not release space

    Talib123 (8/19/2013)


    Can't believe no one has pointed out that is not a good idea to shrink Production DBs.

    It is not good to shrink without rebuild.

    If you shrink and rebuild after...

    Igor Micev

  • RE: Shrink does not release space

    Hi

    Can you check whether you have open transactions?

    SELECT * FROM sys.sysprocesses sp WHERE sp.open_tran = 1 and sp.dbid = DB_ID()

    or

    DBCC OPENTRAN

    Regards

    IgorMi

    Igor Micev

  • RE: Tempdb tables two months old

    The temp objects are not deleted. They are just truncated and then reused for other purposes, hence you cannot know which temp object from which user object is created/used. The...

    Igor Micev

  • RE: String esaping in TSQL

    Dird (8/1/2013)


    Hi Igor,

    No. The issue is "''''''''''''''''"...so many! because for every ' I have to do '' to escape it. Is there another way to escape in TSQL? So I...

    Igor Micev

  • RE: String esaping in TSQL

    Dird (8/1/2013)


    but then it will still have many apostrophes? just in a different location~

    I think i get your issue. What about this:

    set quoted_identifier off

    declare @query nvarchar(1000)

    declare @server nvarchar(100)

    set @query =...

    Igor Micev

  • RE: String esaping in TSQL

    Dird (8/1/2013)


    Hi Igor,

    What do you mean?

    I mean if you can put your code with many apostrophes in another script/sp and use it from another place...

    Igor Micev

  • RE: Index Fragmentation and Page count minimum

    SQLRNNR (8/1/2013)


    IgorMi (8/1/2013)


    Hi,

    The widely used thresholds are: Reorganize if fragmentation is between 10-30%. Rebuild if > 30%.

    Indexes with small number of pages (<1000) will usually not loose fragmentation. Try...

    Igor Micev

  • RE: Index Fragmentation and Page count minimum

    Hi,

    The widely used thresholds are: Reorganize if fragmentation is between 10-30%. Rebuild if > 30%.

    Indexes with small number of pages (<1000) will usually not loose fragmentation. Try your own...

    Igor Micev

  • RE: Tempdb tables two months old

    Hi,

    How about the refdate dates? are they two months ago, or fresher?

    Regards,

    IgorMi

    Igor Micev

Viewing 15 posts - 856 through 870 (of 1,170 total)