Forum Replies Created

Viewing 15 posts - 46,786 through 46,800 (of 49,552 total)

  • RE: varchar(8) query

    SELECT LEFT(<Some Column>,8) 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: back ups

    SQL's native backups do not allow you to just restore a single table. You'll have to restore the entire database either as a new DB on the same server 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: How does SQL Server 2005 "use" a temp file on C: drive

    So it's management studio's local work space. Good to know.

    Try opening the file in notepad. I'd be interested to know if it's the query in there, or the results. I...

    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: varchar(8) query

    Yup. Should be fine.

    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 5172: Header for file is not valid.

    Is it a SQL 2000 or a SQL 2005 database?

    Databases cannot be downgraded in version. If the DB in question was detached from SQL 2005, it has 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: Use two temp DBs

    Usually its enough to have 2 files on the same drive. If you're seeing IO bottlenecks on that drive, you may want to separate the data files onto different drives.

    It...

    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 does SQL Server 2005 "use" a temp file on C: drive

    The SQL database engine doesn't use temp files and certainly not in those directories. It uses TempDB for its temporary work space. Otherwise it uses its allocated memory.

    It could 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: index size qn

    You should be able to safely drop the index on testplan. Not the others.

    An index is redundant if the columns in it are a left-based subset of another index.

    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: NULL & Count()

    Look up sp_executesql. It allows you to pass parameters in and out of dynamic SQL. I know there's a good example in books online showing exactly 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: Find out if a database is being used and how much

    I'd say use the dm_exec_query_stats. I believe there is a DBID in there. The plan cache is transcient, so commands may get removed from the cache and not all statements...

    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 is it not generating error ?

    The keyword AS for specifying an alias is optional. These are equivalent statements

    SELECT 1 AS This_Is_A_Column_Alias FROM SomeTable AS This_Is_A_Table_Alias

    SELECT 1 This_Is_A_Column_Alias FROM SomeTable This_Is_A_Table_Alias

    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: varchar(8) query

    Be aware that LEN does not count trailing spaces.

    SELECT LEN('abc') -- 3

    SELECT LEN('abc ...

    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: Index Usage

    Yes. I was more referring to the other NC indexes.

    As I mentioned in another thread, that cluster is exceedingly wide. The recommendations for clustered indexes is that they are as...

    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 does SQL Server 2005 "use" a temp file on C: drive

    What's the name of that file?

    It's possible that it's the windows swap file, which means SQL's using more memory than the machine has available and windows is swapping it 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: Index Usage

    Without seeing the table structure, or the index definitions, it's hard to say.

    You could probably widen a couple of the indexes and it would reduce the lookups. Without knowing 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

Viewing 15 posts - 46,786 through 46,800 (of 49,552 total)