Forum Replies Created

Viewing 15 posts - 45,076 through 45,090 (of 49,552 total)

  • RE: About Trigger

    Firstly, there's no such thing as a before trigger. The two types in SQL are instead of and after.

    A trigger will fire once per operation, not once per row. After...

    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 CheckDB Error Msgs, Proper Course of Action

    That's good to hear.

    Daily is perhaps overkill. CheckDB is a very intensive operation. Running it weekly, over a weekend is probably adequate.

    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: Separate Login for a query in a stored procedure

    bhuvnesh.dogra (8/13/2008)


    But i enabled 4th option where i nedded to put remote login nad i put sa authentication.

    Very, very bad idea. The mapping is fine, but it should be mapped...

    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 CheckDB Error Msgs, Proper Course of Action

    j2r (8/13/2008)


    Does the index being specified as -1 mean that this is a data page that's corrupt?

    No. It means SQL hasn't got the vaguest clue what this page 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: DBCC CheckDB Error Msgs, Proper Course of Action

    There should have been another line in the checkDB output saying what level was required to fix. What did it say?

    Since you have no good backup, the only way 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: Alter Table Add Constraint Returns bizarre error

    Brandie Tarvin (8/13/2008)


    Curiousier and Curiousier... It is NOT there in the July 2006 version. The only code examples I see are:

    A) with the Alter Table Alter column to set...

    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: Alter Table Add Constraint Returns bizarre error

    Brandie Tarvin (8/13/2008)


    I looked and looked in BOL, but it doesn't have this as a code reference.

    There is, it's just a little hidden. Right at the bottom 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: Alter Table Add Constraint Returns bizarre error

    I may be miles off, but you haven't said which column to put the fk on. Maybe this?

    Alter Table TableA

    Add Constraint FK_TableA_TimeKey Foreign Key (TimeKey) References dbo.DimTime (TimeKey);

    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: Is a variable in the JOIN as bad as using a function?

    Neither should cause a table scan because you don't have a function on the column. If's functions on the columns that prevent index usage.

    You may be prone to parameter sniffing...

    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 - The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION.

    The code flow is such that after the commit is reached, execution goes past the Errblock label and executes rollback. Of course, seeing as the transaction has just committed, there's...

    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: slow running sysindex, syscolums query

    Of course, then there's the question of why the application wants to know the columns of the indexes in the first place...

    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: slow running sysindex, syscolums query

    Looks like the developer was trying to list the index columns, but I don't think that's the right way. There's a much easier (faster) way in 2005, but if 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: 14 minutes to return only 20% of rows in table of ~6M

    6 million rows at say an average of 20 characters each (rough guess) means that query is pulling around 200 MB of data from the database and across the network....

    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: 14 minutes to return only 20% of rows in table of ~6M

    Since there's no where clause, SQL has to read all the rows of the table. Indexes aren't going to help much. At best, you could change the exec plan from...

    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: Timeout Expire: coz of sp?

    khushbu.kumar (8/13/2008)


    ans

    1)Timeout expired.The timeout period elapsed prior to completion of the operation or the server is not responding.

    2) approx after 50-60 sec

    3)SP takes approx 3-4 in QA

    3-4 seconds or...

    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 - 45,076 through 45,090 (of 49,552 total)