Forum Replies Created

Viewing 15 posts - 226 through 240 (of 345 total)

  • RE: Need program to generate DB Test Data

    I usually do this via a loop.

    Either calling things test0001, test0002 ...

    or by generating random values if the distribution is needed.

    It's quite quick to do.

  • RE: Veritas Backup/Restore

    I had an admin dept tell me that a backup to tape would be much fater than to disc but it turned out to be lots slower.

    Guess there are lots...

  • RE: Procedure Cache

    I haven't tested it since v7 no sp but for that it would execute the version in the database for user sps but the version in master for system sps....

  • RE: How do I delete the log file for a dB?

    Easiest way is to

    Back up the database

    Detach the database (sp_detach_db)

    delete the .ldf

    attach the log file (sp_attach_single_file_db)

    You have to delete (or rename) the log file or it may be picked up...

  • RE: This board

    Shame on you for not developing your own .

    And what does mean?

  • RE: Quirk in recording job duration; please help!

    I've checked the job logging against what actually happens at it did seem to be about right - but I haven't done it for a while and not for anything...

  • RE: Unable to preserve security settings for user ''

    Have you restarted the server? If not try that.

    try dbcc checks on the database.

    Who should have access to TempCustomers - you will probably find that something has gone wrong with...

  • RE: About The Days problem in Date

    convert(varchar(6),@dte,112)+'01)

    will give the start of the month.

    dateadd(dd,-1,convert(varchar(6),dateadd(mm,1,@dte),112)+'01)

    the end of the month.

    uses datediff(ww,..,...) for these two dates to give the number of week boundaries between them then add/subtract 1 depending on...

  • RE: Error Handling - Efficient way

    What happens when you leave (or take a holiday).

    I just like to try and make it easier for people.

    Had someone recently

    if @error = 0

    begin

    stmnt

    select...

  • RE: Return Value

    you could

    @Table=coalesce(@Table + ',','') + OldTable

    which will give 'Fixed,Nat'

    or insert into a temp table or table variable.

  • RE: display error message

    If you perform a raiserror before the return that should be trapped by the error handler in your client - and you can pass the message that way too.

  • RE: Error Handling - Efficient way

    Don't like that as it means causes problems if someone accidentally clears the flag.

    Prefer

    declare @error int, @rowcount int

    statement

    select @error = @@error, @rowcount = @rowcount

    if @error <> 0

    goto...

  • RE: Veritas Backup/Restore

    I have been to a number of companies where they have tried direct to tape backups and none of their backups could be restored.

    Strange that this strategy seems to...

  • RE: Need to copy structure but not contents

    If you want to do it once then probably dts is easier.

    If you want to do it many times and change objects trnsferred then maybe dmo would be easier. I...

  • RE: Stored procedure into a table?

    Or you could just put the result into a temp table before the query.

Viewing 15 posts - 226 through 240 (of 345 total)