Forum Replies Created

Viewing 15 posts - 30,886 through 30,900 (of 49,552 total)

  • RE: Insert Nvarchar value in stored procedure

    Nothing needs resolving. The parameter is defined as an nvarchar, hence it is an nvarchar and will be inserted into the table as an nvarchar. The N prefix is only...

    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: Scratching my head? Simple query takes minutes to run.

    Please post table definitions, index definitions and execution plan, as per http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

    Pics of the exec plans don't contain enough info.

    Probably parameter sniffing (or lack thereof)

    http://sqlinthewild.co.za/index.php/2008/02/25/parameter-sniffing-pt-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: Search database for specific datatypes

    This should work

    SELECT OBJECT_NAME(c.object_id), c.name, t.name

    FROM sys.columns c

    INNER JOIN sys.types t ON c.user_type_id = t.user_type_id

    WHERE t.name IN ('text','ntext','image','xml')

    ...

    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: Search database for specific datatypes

    luckysql.kinda (9/7/2010)


    select * from sys.syscolumns

    where length IN (16,8000,-1)

    Syscolumns is deprecated, should not be used for new development and will be removed in a future version of SQL.

    That query also returns...

    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: Database stuck in RECOVERING state

    If they are recovering, then you just need to wait. Long recovery times could be caused by poor IO performance or log fragmentation. Regardless, they should come on line once...

    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: Database stuck in RECOVERING state

    Before you do anything else....

    Query sys.databases. What's the exact state (state_desc) for these databases?

    Check the SQL error log. Are there any entries in there relating to these databases? If so,...

    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: Cluster Index - Huge Table - 0 Fragmentation - Clustered Index Scan???

    sqlbuddy123 (9/7/2010)


    Clustered index can be created on a single column and it is not equivalent to creating a Nonclustered index with all the columns in a table.

    If you create 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: Cluster Index - Huge Table - 0 Fragmentation - Clustered Index Scan???

    Derrick Smith (9/7/2010)


    Maybe Gail or someone else more knowledgeable can correct me, but creating a nonclustered index that contains every column is more or less identical (for selecting) to 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: Cluster Index - Huge Table - 0 Fragmentation - Clustered Index Scan???

    Great. 4 questions down, most important two to go.

    Also, please post the query's execution plan as a .sqlplan file. The excerpt of text you posted previously does not contain anywhere...

    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: Database in Recovery Pending State

    Please post new questions in a new thread.

    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: Same editor tab query window but able to disconnect one server and connect another?

    WebTechie38 (9/7/2010)


    I did not know about the Central Management servers.

    What I showed isn't central management servers. It's just multi-server queries. Central management servers are something else entirely.

    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: Background Processes Waiting? Should I be concerned?

    amy26 (9/7/2010)


    Ok thanks, I hadn't noticed it really before and we're having a lot of network contention and I/O issues with a slow server connection so I wanted to be...

    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: Background Processes Waiting? Should I be concerned?

    Firstly you can't kill the system processes, except by restarting SQL.

    They should be waiting most of the time. The system processes should be idle the majority of the time on...

    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 2005 Standard only shows 8mb of RAM with AWE enabled at 2-4GB?

    Where are you seeing 8MB in use? What counter?

    What's this about 2000's agent and why do you think 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: Same editor tab query window but able to disconnect one server and connect another?

    Running the same code on multiple servers one by one is so slow. Since you're on SQL2008, run the code on all servers with one execution. 😀

    p.s. 2008 Management...

    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 - 30,886 through 30,900 (of 49,552 total)