Forum Replies Created

Viewing 15 posts - 1,066 through 1,080 (of 1,315 total)

  • RE: Linked Server Trigger Issue

    If the dbf table has some kind of autonumber or timestamp field (or one could be added), so your scheduled task can use something like "WHERE {timestamp} > {last run time}",...

  • RE: Why is article rated so low?

    The ROUND() function has a little-known third argument that specifies whether to round or truncate.  ROUND(<value>,2,1) would solve the problem better than the code in the article.

  • RE: Log shipping and differential backup

    The differential backups can be used to initialize the standby database, but there is no need to apply them afterwards.

    You're restoring the log backups every 15 minutes, there's nothing in...

  • RE: NEED SQL to place DB in ReadOnly from Query Analyzer

    You can't set the options on multiple databases in one statement.  But you can set multiple options on one database in one statement.

    ALTER DATABASE <db> SET READ_ONLY, SINGLE_USER

      [ WITH...

  • RE: "Snapshot" of confusion

    No, they're both correct statements.

    The current realtime state of the data that hasn't changed is, by definition, the same as it was when the snapshot was created. 

    A query against a...

  • RE: Question of the Day for 23 Aug 2005

    Restoring the master database is a different animal.  You can only restore the master database if you started SQL Server in single-user mode, so the normal checks for other connections...

  • RE: How to find Last Friday without using sp

    I'm not sure who Leonid is, but over the weekend I realized the script I posted would not work for some dates.  (Tells you how exciting my weekends are.)

    Here is...

  • RE: How to find Last Friday without using sp

    Converting a datetime to a float gives you a number in days (the fractional part is the time), and floor() will truncate it to a pure date.   You get an error if...

  • RE: How to find Last Friday without using sp

    select TheDate,

     dateadd(d, 6 - ((cast(floor(cast(FirstDayOfMonth as float)) as integer) - 1) % 7), FirstDayOfMonth) as FirstMondayOfMonth,

     dateadd(d, -(cast(floor(cast(LastDayOfMonth as float)) as integer) + 3) % 7, LastDayOfMonth) as LastFridayOfMonth

    from (

     select...

  • RE: Location Of DTS files In SQL Server

    Substituting the other msdb may work, but you probably want to get the DTS packages out of it so you can put the original msdb back.  You might have maintenance plans,...

  • RE: MSDB size rocketed

    Try to find out what table(s) have all this data.  An extra 500MB should be easy to spot.  I looked around at a number of my servers and can't find...

  • RE: Flat Files

    BCP and DTS do not pretend to have reporting capabilities, they are just ways to dump query results to a text file.  I might be tempted to use a script...

  • RE: changing data type

    You're welcome to stop by any time and troubleshoot my server configuration.

    Try to remember that I didn't say to never use ALTER TABLE.  I said that ALTER may have a...

  • RE: changing data type

    That's a very tiny MAY, in my experience.  I can INSERT/SELECT 15 million rows in minutes on most of the servers I work with, but I have seen ALTER take...

  • RE: changing data type

    If you have sufficient disk space, copying the data to build a new table may run much faster than updating the existing table.  Obviously it is a lot more work,...

Viewing 15 posts - 1,066 through 1,080 (of 1,315 total)