Forum Replies Created

Viewing 15 posts - 21,616 through 21,630 (of 49,552 total)

  • RE: created database user for new database, but cannot access tables with this user, what did I do wrong?

    In SQL, by default permissions are neutral. Nothing granted, nothing denied. That means that the user cannot get any access to anything. There are two levels from there.

    Grant: Explicitly give...

    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: Physical vs logical corruption

    In both cases a page has been mangled (has incorrect values). The first one is in the clustered index, so the actual data, the second is in a nonclustered index,...

    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: Sanity Check/Assistance re-writing nested join

    m mcdonald (12/20/2011)


    PO_Type is appears to be 0 for a regular order and 1 for a quote. [AFAIK It should be one or the other. However, the database...

    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 into SPROC

    IF EXISTS (SELECT 1 FROM #ins)

    SELECT TOP 1 @AppUser = ModifiedBy FROM #ins

    ELSE

    SELECT TOP 1 @AppUser = ModifiedBy FROM #del

    You don't need to go back...

    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: created database user for new database, but cannot access tables with this user, what did I do wrong?

    Dev (12/20/2011)


    You might have missed on some steps in Installation Manual (your organization specific). Please crosscheck it. If possible, redo it from scratch (if it doesn’t take much...

    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: created database user for new database, but cannot access tables with this user, what did I do wrong?

    And the error messages?

    btw, if that user just needs to read tables, all that should be checked under database roles is db_datareader. Nothing more.

    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 into SPROC

    Btw, I know this is late, but the way that trigger is written, if that's the actual trigger code that's listed in your first post, is highly inefficient. It 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: Trigger into SPROC

    So your table has an UpdatedBy column and a ModifiedBy column, the UpdatedBy is populated by the front end and you want the trigger to copy that value from UpdatedBy...

    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: Interpreting execution plan

    Very little difference actually. The actual plan includes the actual row counts, actual execution count and actual data size in the operator and data flow properties.

    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: created database user for new database, but cannot access tables with this user, what did I do wrong?

    What database roles did you grant? Windows login or SQL login?

    What are the errors you're getting?

    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: Interpreting execution plan

    bwoulfe (12/20/2011)


    GilaMonster (12/20/2011)


    bwoulfe (12/20/2011)


    If you want to measure the impact of an index you could also set statistics io on and look at the differences in scan count, logical reads,...

    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: Interpreting execution plan

    bwoulfe (12/20/2011)


    If you want to measure the impact of an index you could also set statistics io on and look at the differences in scan count, logical reads, physical reads...

    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: Sanity Check/Assistance re-writing nested join

    I don't think you answered my question

    GilaMonster (12/19/2011)


    Do you want the rows that don't have matches to po_detail (and hence get nulls for all columns) to be excluded because...

    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 query to format numbers

    I gave 4 pieces of sample data. How should those 4 be formatted?

    Why the limitation? the front end is the correct place to do this, doing it in SQL 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: Trigger fires twice

    Excellent. Glad you figured it out.

    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 - 21,616 through 21,630 (of 49,552 total)