Forum Replies Created

Viewing 15 posts - 30,916 through 30,930 (of 49,552 total)

  • RE: Help Me Guys

    Bhuvnesh (9/6/2010)


    subbusa2050 (9/6/2010)


    ** Set @Old_Val = (Select @OC from deleted) tis IS NOT WORKING.

    How would you get data from deleted table in case of INSERT trigger. there will...

    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 SHRINKFILE not working for datafile

    Bhuvnesh (9/6/2010)


    take a full backup and then try shrinkdatabase

    Why is a full DB backup going to help?

    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: Cluster Index - Huge Table - 0 Fragmentation - Clustered Index Scan???

    iqtedar (9/6/2010)


    query:select * from test where test_regid= 12345

    Answer 3 then.

    The query could seek on a nonclustered index, but there are too many rows returned and the nonclustered index is...

    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: Cluster Index - Huge Table - 0 Fragmentation - Clustered Index Scan???

    It means it's suggesting that you essentially duplicate the entire table. Usually a very bad idea. DTA is not perfect (or even good) a lot of the time.

    Why don't you...

    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: transactional log remedy

    Truncate and shrink are two different concepts.

    Truncating the log makes space within available for reuse. Log backups do this.

    Shrink releases unused space to the OS. Backup log does not do...

    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: How to refer PK Of Dimension table twice in a fact table

    Why aren't you able to do this? Is the alter table for the second foreign key failing? (it shouldn't, same syntax will work for both) If so, with what error?

    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: Are the posted questions getting worse?

    CirquedeSQLeil (9/6/2010)


    Happy Labor Day all.

    Labour day is a good description for today - first day back from a week-long 'holiday'

    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: drop and create temptable

    Duplicate post. No replies to this thread please. Direct replies to http://www.sqlservercentral.com/Forums/Topic981041-392-1.aspx

    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: How to extract records when table does not have unique column?

    Look up ROW_NUMBER(), just note that it's not particularly fast on larger result sets.

    p.s. Consider using parametrised SQL statements or stored procedures. That example line you gave is vulnerable to...

    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: drop and create temptable

    Ok.

    DROP TABLE #TableName

    CREATE TABLE #TableName (<table definition>)

    Is there a question here?

    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: how to check table creation statement

    If you just want the creation statement, management studio can generated it based on the system tables. From object explorer right click the table, script as -> create

    If you want...

    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: Cluster Index - Huge Table - 0 Fragmentation - Clustered Index Scan???

    Index scan or clustered index scan?

    Several reasons why it might be doing a clustered index scan:

    * The where clause predicate is not SARGable

    * The where clause predicate does not refer...

    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: table tuning

    Let me guess...

    It's a heap (no clustered index)?

    If you run SELECT * FROM sys.dm_db_index_physical_stats for that table, how many allocated pages are there?

    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: ENABLED TRACE FLAGS

    dbcc tracestatus

    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: ERROR RESTORE SQL 2000 ENT.EDI DB TO SQL 2008 ENT

    Joie Andrew (9/5/2010)


    What do you get back from running restore verifyonly on the backup that you are trying to use?

    Worth noting that without checksum backups (2005+), restore verify only checks...

    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 - 30,916 through 30,930 (of 49,552 total)