Forum Replies Created

Viewing 15 posts - 10,786 through 10,800 (of 49,552 total)

  • RE: Zero date.

    ben.brugman (11/29/2013)


    I did understand that the datetime in SQL-server is stored as the number of microseconds / 3 since 1899-12-30.

    No. Never has been.

    Datetime is made up of two pieces. The...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Backup/restore full + differential

    Pretty much, just use different backup file names. Otherwise you're liable to make some mistake somewhere.

    db_full.bak and db_diff.bak for example.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Check Data exists or not

    kapil_kk (11/29/2013)


    GilaMonster (11/29/2013)


    INSERT INTO TableB ...

    SELECT ...

    FROM TableA

    WHERE NOT EXISTS (SELECT 1 FROM TableB where <column comparison>)

    Sorry to mention that I also have update the record if data from tableA...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Check Data exists or not

    INSERT INTO TableB ...

    SELECT ...

    FROM TableA

    WHERE NOT EXISTS (SELECT 1 FROM TableB where <column comparison>)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Maximum output length in text for a query result.

    No. It's a property of the client tool only, not something that SQL Server sets within itself

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Enter user-defined variables at runtime

    If the developers have enough rights to run that, they have enough rights to just log directly on to the server and do stuff anyway. If you don't trust your...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Enter user-defined variables at runtime

    kevaburg (11/29/2013)


    How could this be rewritten so it would be more secure? Ideally if I am going to implement it, I want it done properly......

    This can't. To run this...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Enter user-defined variables at runtime

    kevaburg (11/29/2013)


    1. Why NVARCHAR(MAX) and not VARCHAR(MAX)? My understanding is that NVARCHAR reserves the total amount of space required to hold the variable whereby VARCHAR is more dynamic.

    They're...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: DBCC Update usage on SQL Server 2012

    singh.kamaldeep (11/28/2013)


    What are the criterias where this need s to run.

    Straight from Books Online

    DBCC UPDATEUSAGE corrects the rows, used pages, reserved pages, leaf pages and data page counts for...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: DBCC Update usage on SQL Server 2012

    Why are you running it? What made you decide to run that command?

    You can cancel it, just like any other query. May sit rolling back for hours.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: DBCC Update usage on SQL Server 2012

    It'll take as long as it takes. Probably quite a while on a large DB like that. Patience.

    Why are you running UpdateUsage on a database upgraded from SQL 2008?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: What will happen if the hard drive with the data file goes to zero space?

    ryan.costello (11/28/2013)


    I've deleted hundreds of thousands of old unneeded records and this is increased the unallocated database space by quite a bit but it has of course not increased any...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Find out top memory consuming queries

    External memory pressure, ie something other than SQL consuming memory? Task manager to start, perfmon with the process object later if necessary.

    MemToLeave is a 32-bit concept only.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Running DBCC CHECKDB Against Mirrored DB

    wak_no1 (11/28/2013)


    Would I need to suspend Mirroring, take the database out of restoring mode, run the check, put the db back in restoring mode and then restart the mirroring session?...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Find out top memory consuming queries

    Not necessarily because those pages read may be tossed out of cache fast. You can assume that a query with high physical reads is reading lots off the disk and...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 10,786 through 10,800 (of 49,552 total)