Forum Replies Created

Viewing 15 posts - 2,776 through 2,790 (of 3,011 total)

  • RE: My Database goes read only mode

    This will do it.  You won't have to ask people to leave the DB, because it will kick them out.

    use master
    alter database MyDatabase set read_write with rollback immediate
    
  • RE: Clustered Index Scans

    Different subject, but it is usually bad idea to use NOLOCK hints, because you can get data that is uncommitted or may eventually be rolled back.

     

     

  • RE: date string conversion...

    I think this conversion method is a little shorter:

    select
    
     run_date,
     run_time,
     [Job Run Date/Time] =
     -- Convert run_date and run_time to datetime
     dateadd(ss,((run_time/10000)*3600)+(((run_time/100)%100)*60)+(run_time%100),right(run_date,8))
    from
     (
     -- Select sample of 20 jobs
     select top 20 * from sysjobhistory order by...
  • RE: Stop the madness

    Looks like it came back from the dead, and it's just as nasty as ever.  Maybe worse.

     

     

  • RE: Explanation for *=

    It is an obsolete syntax for doing a left join.

     

  • RE: How many records overlap on a date range

    Chris, you need more conditions in your join to get all possible overlaps.

    on
     ( t1.dtDATESTART BETWEEN t2.dtDATESTART and t2.dtDATEEND )  or
     ( t1.dtDATEEND BETWEEN t2.dtDATESTART and t2.dtDATEEND )  or
     ( t1.dtDATESTART < t2.dtDATESTART and t1.dtDATEEND...
  • RE: Block the DBA?

    The name of the article should be, “Get The DBA So Pissed Off At You That He Takes Away Your Access To Everything”, not “Let’s Play Block The DBA”, since...

  • RE: just the date, please

    It's better to just store all your data in a single column in a single row in a single table using the XML data type (2005 only).

    It's the ultimate in...

  • RE: deleted job still appears on application event log

    Do you means the Windows Application Event log?  If so, that is what I would expect.

    The Application Event log is not tied to SQL Server, so deleteing a job should...

  • RE: just the date, please

    Not to make too big a deal about it, I think a function for something like this has its place:

    You may just need to call it once in a query...

  • RE: just the date, please

    I did quite a bit of testing of the performance difference of inline code vs. UDFs and posted it on this thread:

    Demo Performance Penalty of User Defined Functions

    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=78601

     

    One comment...

  • RE: Stop the madness

    Geek fight!

    It reminds me of this quote from Henry Kissinger:

    "University politics are vicious precisely because the stakes are so small."

  • RE: Stop the madness

    No one has posted on that thread for a couple of days, so maybe the fire is burnt out.

    On another note: Is posting on this forum the best way to report...

  • RE: just the date, please

    I have done extensive testing against tables with millions of rows, and it is faster.

  • RE: just the date, please

    It is simple, it's much faster than converting to varchar, and it doesn't have any dependencies on the setting of DATEFORMAT or LANGUAGE.

     

Viewing 15 posts - 2,776 through 2,790 (of 3,011 total)