Forum Replies Created

Viewing 15 posts - 41,596 through 41,610 (of 49,552 total)

  • RE: Creating indexed views

    As the error says, you're not allowed to access a remove server in an object that's created WITH SCHEMABINDING.

    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: Deadlock

    MichaelJasson (1/18/2009)


    Do we need to restart the sql service everytime we enable any trace or this is applicable to only some of the traces?

    If you enable the traceflag using DBCC...

    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: Why do people need to do this?

    That's actually not that hard, providing it's impossible to have two sequential in's or out's and the first entry is going in.

    Pseudocode:

    SELECT * FROM

    (SELECT *, ROW_NUMBER OVER (PARTITION BY EmployeeID...

    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: My problem 'LIKE' Child

    Ok.....

    Since the OrderNo (in event items) is a != in the query, it's absolutely senseless to have it as the leading column. It means that SQL has to do a...

    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 Architecture? What's going on behind the scenes?

    Two excellent places to look for details on the storage engine - http://blogs.msdn.com/sqlserverstorageengine/default.aspx and http://www.sqlskills.com/blogs/paul/

    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: Error Converting Data type varchar to numeric

    Cast them to numeric(9,2) before casting to varchar. It will cause the value to be rounded and then displayed with 2 decimals.

    eg: replace CAST(DeliveredQty AS VARCHAR(10)) with CAST(CAST(DeliveredQty AS NUMERIC(9,2))...

    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: Top N sub query workaround - Does it exist?

    krypto69 (1/18/2009)


    As for the code block. I'm a little confused..I looked at the example again and I thought I matched it, but I'm guessing you want 'GO's in between 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: Corrupt Table

    For what it's worth, if I had that error on a production database, I'd pick the second option if it was feasible (due to time constraints). Or you can just...

    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: Deleted DBs

    MichaelJasson (1/18/2009)


    I shall always keep default trace running to avoid such happenings.

    The default trace won't avoid such happenings. It'll only tell you who did it. The default trace (as it'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: Corrupt Table

    Unfortunately, with that error you only have two options.

    1) Edit the system tables directly to remove the orphaned records (very tricky, as the system tables are very complex on SQL...

    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: Top N sub query workaround - Does it exist?

    Almost. What do you want the results to look like?

    p.s. Can you put that lot into a code block so it doesn't cause scrolling?

    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 there something like rowtype in SQL Server 2008

    matsinopoulos (1/18/2009)


    So, I would imagine it is quite common to use a cursor to traverse table X. No?

    No!

    That's a single update statement, no need to do it row by...

    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: Deadlock

    ravikanth (1/18/2009)


    DBCC TRACEON(1204,1222)

    1204 - This trace flag reports deadlock information formatted by each node involved in the deadlock

    1222 - This trace flag formats deadlock information, first by processes and 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: Deadlock

    Enable traceflag 1222. You can use use a DBCC statement (DBCC TRACEON(1222,-1)), or add -t1222 to the startup parameters of the SQL instance (needs a restart to take effect)

    Once that...

    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: Degrade Database from MSql 2008 Express Edition to Msql 2005

    ashish_1279 (1/18/2009)


    I tried to restore Backup of same to Microsoft SQL 2005 Server again it did not

    work. Its ggiving downgrade compatibility error.

    Can anybody suggest how to do that ??

    Short answer,...

    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 - 41,596 through 41,610 (of 49,552 total)