Forum Replies Created

Viewing 15 posts - 49,051 through 49,065 (of 49,552 total)

  • RE: Database audit trail

    You can use a trigger to log inserts, updates and deletes. There's no way to audit selects though, not within SQL directly. Books online gives a good overview of 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: Help to prepare for microsoft certification

    http://www.microsoft.com/learning/mcp/default.mspx

    That'll give you a good overview of what certifications are available and what exams and courses exist for each.

    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: Free SQL Prompt 2.0 valuable, but flawed; V3.0 being built from scratc

    Why do you say that? What exactly doesn't work? I've found it works in most places, missing a few irritating things (like picking up new tables, or when using 3-part...

    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: Shrink Database

    As I said, it will force the database to grow again, when data is added. This grow may occur at a busy time, slowing the database down. It will fragment your indexes, possibly...

    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: Shrink Database

    It's not considered good practice to shrink a production database.

    If the database has been shrunk and new data is added then it has to grow again, probably at an...

    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: INSERT INTO from stored procedure - help pls!

    I suggeested it as al alternative to a second table, which he said wasn't really what he was looking for.

    A second thought, no need to do the update, can specify...

    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: INSERT INTO from stored procedure - help pls!

    ALTER TABLE #Table

    ADD Variable1 <data type>

    ADD Variable2 <Data Type>

    UPDATE #Table

    SET Variable1 = @Var1, Variable2 = @Var2

    Is that what you're looking 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: colour-coded sql testing

    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: SQL 2000 Error: 1203, Severity: 20, State: 1 Error

    I would suggest you do an integrity check on your database. It looks like you might have allocation errors.

    DBCC

    CheckDB ('<YourDBName>')

    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: Trigger Order Of Execution?

    That's users for you.

    My pleasure, good luck hunting. If you do fnd the cause, please post your solution 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: Trigger Order Of Execution?

    It states 1 row inserted cause that's what you set @rowcount to...

    SELECT @rowCount = Len(1) FROM inserted

    Change that back to SELECT @rowCount = count(*) FROM inserted and the print will read...

    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: Trigger Order Of Execution?

    Books online doesn't say either way, from what I could see.

    Try running this. The trigger gets executed once. All rows inserted are in the inserted table.

    CREATE

    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: Removing the permissions to change the database size

    Why do you want to make them db_owner? Users should never be part of the do_owner role.

    Create your own role, add all users to that role and grant the role...

    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: Trigger Order Of Execution?

    Not cursors, please. Cursors in triggers kill performance. By the looks of the trigger you should be able to change the updates to set-based.

    Here's a section of your 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: Trigger Order Of Execution?

    No, they run once per statement, whether it be insert, update or delete. Actions are slower because of the additional code and stuff in the trigger. A well-written trigger shouldn't...

    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 - 49,051 through 49,065 (of 49,552 total)