Forum Replies Created

Viewing 15 posts - 48,886 through 48,900 (of 49,552 total)

  • RE: After Insert Trigger

    You can get the details of the new rows from the inserted table. It will contain all the rows that were inserted by the statement that fired the trigger.

    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: Log File is full

    Accept their offer, and check that the log is been backed up. Check how often, and make sure it's not failing.

    DBCC

    SQLPerf(LogSpace)

    It'll show you the percentage of...

    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: Log File is full

    Possibly, but there's a lot of info in there and it's not intended to be human-readable. It's confusing at best.

    Run DBCC OPENTRAN to see if there are any open transactions....

    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: Log File is full

    View what about it? The size, the percentage full, the actual log records?

    While it is possible to read the log records, I really don't recomend it. It's verbose, completely undocumented...

    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: Help Needed !!!!!!!!!!!!!!

    Is this a homework assignment, or a test or some sort? It certainly looks like it.

    What specifically are you having problems with?

    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: ‘sqlcmd’is not recognized as an internal or external command

    Probably your path is wrong. At the command prompt type path and see what it returns.

    I can't remember offhand where to add paths, but it souldn't be hard 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: Log File is full

    First thing to do is to check that the transaction log is actually getting backed up. It won't be the first time that a log should be getting backed up,...

    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: returning most current record

    Can you give us the structure of the audit table and some sample data?

    Have multiple rows been changed? How are those records identified in the audit table?

    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: Need to prevent row-level updates and deletes

    Triggers is certainly an option, and probably is the one with the least work required.

    Just remember with triggers that a trigger fires once for an change and has all...

    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: Odd SQL query isnt working

    Can you perhaps post some sample data and desired output?

    Maybe there's another way of doing 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: Odd SQL query isnt working

    That's definatly odd SQL.

    What is it that you're trying to 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: (X OR Y) vs. IN (X,Y)

    SELECT * FROM sysobjects WHERE xtype='P' OR xtype = 'S' OR xtype = 'U'

      |--Compute Scalar(<Removed for brevity> )

           |--Clustered Index Scan(OBJECT: ([master].[dbo].[sysobjects].[sysobjects]), WHERE: (([sysobjects].[xtype]='P' OR [sysobjects].[xtype]='S') OR [sysobjects].[xtype]='U'))

    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: (X OR Y) vs. IN (X,Y)

    No difference. the query plans for the two are identical. In fact, checking the query plan, the query parser expanded the second out into ORs.

    I tried these two

    SELECT

    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: Service start time

    That's brilliant. Thanks. I didn't think of looking 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: Service start time

    Can you read those from T-SQL? CLR?

    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 - 48,886 through 48,900 (of 49,552 total)