Forum Replies Created

Viewing 15 posts - 33,541 through 33,555 (of 49,552 total)

  • RE: It is possible to do this in SQL Server Triggers?

    Create one trigger FOR INSERT and put the insert logic in that, create a second trigger FOR UPDATE and put the update logic in there.

    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: Ask MS to add "create or replace procedure/function" syntax?

    Post it on Connect and see how people vote. Posted here the dev team isn't going to see it.

    p.s. Why drop, create, fix permissions at all? That's what ALTER 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: Introduction to Indexes: Part 2 – The clustered index

    wodom (3/11/2010)


    That would seem to imply that to avoid the extra work, maybe it's better to have no clustered index, in which case SQL Server can always use the row...

    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: Table Scan with Statistics !!!!!

    Bhuvnesh (3/11/2010)


    Statistics are automatically generated by sql server whenever queries executed on any table first time.

    Statistics are generated when the query optimiser needs to know cardinality of a column...

    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: If I increase the Memory allocated, Will the query run faster.?

    winslet (3/11/2010)


    on what basis, you say so ?

    Its a best practise to have a perfromance..

    So if I have a server with only 2GB of memory in it, I can't give...

    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 log filling up

    I think the safest thing here would be to script out all your jobs, alerts and anything else in MSDB and rebuild it. There are scripts available online (on MSDN...

    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 sp_MSforeachtable to gen COUNT(*) for each table in MyDBname

    Please post new questions in a new thread. Thank 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: What can be the cause when a DBCC SHRINKDATABASE(N'DBname') works but DBCC SHRINKFILE (N'MDFfile' , 0, TRUNCATEONLY) fails.

    If you want a list of what pages are allocated and what aren't, there's no documented way. You could use DBCC Page (undocumented) on all of the GAM and SGAM...

    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: Possible Sharepoint Database corruption

    May I suggest, going forward, that you institute regular database integrity checks. Regular enough that, should there be a problem, restoring from backup is always an option.

    Also keep in mind...

    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 log filling up

    I'm kinda curious how that could happen. All the system databases should have the same collation. Did you restore MSDB from somewhere else?

    What's the server collation and what are 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: The BackUP of the file Group of file is not permitted

    Please post new questions in a new thread please, giving as much detail as possible as to what's wrong.

    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: What can be the cause when a DBCC SHRINKDATABASE(N'DBname') works but DBCC SHRINKFILE (N'MDFfile' , 0, TRUNCATEONLY) fails.

    Truncate_only will only reduce the size of the DB is there's free space at the end of the file. Shrinkdatabase will move pages to the beginning of the file and...

    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 has become Suspect

    Nasty.

    You should do some root-cause analysis of this, otherwise it may happen again. See if there were any errors logged around the time that the DB went suspect. 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: Error log filling up

    Paul, is this in the SQL error log or the SQL Agent error log? If the latter, it narrows it down to something that Agent is running across. Does MSDB...

    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 log filling up

    GTR (3/10/2010)


    How could collation of databases is different from Server collation?

    Very easily. Restore a database from another server where the server collation was different. Attach a database with 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

Viewing 15 posts - 33,541 through 33,555 (of 49,552 total)