Forum Replies Created

Viewing 15 posts - 46,816 through 46,830 (of 49,552 total)

  • RE: Limiting impact of poorly designed queries

    Oberion (4/18/2008)


    lastly, it ain't my job to baby sit developers or review all their code. I have other projects and bigger fish to fry.

    Sorry, but I can not agree...

    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 write update trigger in sql database with current system date

    I'm not sure I follow.

    Do you want the procedure to run at midnight? If so, you need a SQL job

    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: Prevent multilple logins per user

    A logon trigger is server wide. I'm not sure if at the point of login you can see what database the user is going to connect to. You'll have 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: A View Or a Stored Procedure?

    View should be sufficient.

    You'll be needing both CASE (the the not empty string) and ISNULL (for the NULLS)

    Something like this (partial query only )

    SELECT ...,

    CASE WHEN ISNULL(CUST_NAME_RU,'') = '' THEN...

    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: I need to reinstall the Sql Server 2005 Agent

    I can't see your hard drive. Image url - file:///h:/sql.bmp

    Attach a jpg to your post.

    SQL agent is installed and is running. Are you sysadmin on that server?

    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 BLOCKING PROBLEM

    Are the queries written optimally?

    Do you have appropriate indexes?

    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 Server Profiler 2005

    If the trace is still running, yuo won't be able to open the file. You'll have to stop the trace, or pause it and copy the trace file elsewhere, 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: Performance Tool - SQL Profiler

    What's the error you're getting?

    I've never used Visual studio's database projects, so I can't be much 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: Limiting impact of poorly designed queries

    Jim Russell (4/18/2008)


    But I'm hard to convince, and I see it as a huge flaw that a db server can be so vulnerable.

    I don't see it as a vulnerability....

    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: Cannot perform an aggregate function on an expression containing an aggregate or a subquery.

    Move the subquery into the from clause and treat it as a derived table.

    Something like

    SELECT

    [year],

    ...

    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 Affected Row Count from a Dynamic Query

    I did.

    DECLARE @sSQL NVARCHAR(100), @rowcount INT

    SET @sSQL = 'select * from sysobjects'

    EXEC sp_executesql @sSQL

    SELECT @rowcount = @@ROWCOUNT

    PRINT '@rowcount = ' + CAST(@rowcount AS VARCHAR(4))

    Output in the messages tab -

    (118...

    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 Disable an index in sql server 2000

    What you're getting back from sp_executesql that way is the return value. Traditionally that's 0 if there was no error, otherwise it's the error code. But that depends on 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: Anyone fancy helping me with a query?

    Please create a new thread for your question.

    Thanks

    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: Limiting impact of poorly designed queries

    Jim Russell (4/18/2008)


    That's the chauvinistic IT department high priest answer!

    I don't care about the job title of the author of the problematic query, I just want to limit the impact.

    If...

    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: Limiting impact of poorly designed queries

    Limit permissions so that users can't write ad-hoc code.

    Code reviews for all code written by the developers

    Training

    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 - 46,816 through 46,830 (of 49,552 total)