Forum Replies Created

Viewing 15 posts - 1,276 through 1,290 (of 7,191 total)

  • RE: Concatenate sp_MSForeachdb results

    DROP TABLE #Results
    CREATE TABLE #Results (
         SchemaName sysname NOT NULL
    ,    DBName sysname NOT NULL
    ,    TableName sysname NOT NULL
    ,    IndexName sysname NULL
    ,    Frag decimal NOT NULL

  • RE: Time increments

    Yes, you probably do need something a bit more sophisticated than just a calendar table.  The snippet below will convert your Dates table into a table that just shows the...

  • RE: Time increments

    Create a calendar table in your database, with weekends and other non-working days marked off.  You then only need to add another predicate to your WHERE clause:
    WHERE...

  • RE: DBCC CHECKDB - Offload to another server.

    I would just restore the databases from where the backups are.  You may need to tweak some NTFS permissions, and maybe change some drive letters to UNCs, but it'll cut...

  • RE: Updating 60 column of null value ?

    aloshya - Friday, August 25, 2017 4:36 AM

    John Mitchell-245523 - Friday, August 25, 2017 4:24 AM

    August 25, 2017 at 4:41 am

    #1956778

  • RE: Updating 60 column of null value ?

    If you're intepreting NULL as 0, then:

    SELECT COALESCE(col1,0) + COALESCE(col2,0) + ... AS SumofAllCols
    FROM MyTable

    (You can also use ISNULL instead of COALESCE.  It's...

  • RE: DBCC CHECKDB - Offload to another server.

    Paul

    Do you already have something set up that goes to all servers and gathers information about the most recent backup of each database?  If not, that would be...

  • RE: Updating 60 column of null value ?

    Yes, and if you do update the table so that there are no more NULLs, make sure you also update the table DDL so that all columns are defined as...

  • RE: Sum with String concatenation

    I suspect that you don't need that UNION ALL.  Indeed, you might not need to stage in @TempTable at all.  If you post table DDL (CREATE TABLE statements) and sample...

  • RE: Index creation not completed

    binutb - Wednesday, August 23, 2017 8:25 AM

    Hi John,
    below is full output.
    output is taken when executing the query  

    session_id host_name program_name client_interface_name login_name session_status database_name request_status command wait_type wait_sec last_wait_type wait_resource blocking_session_id blocking_host blocking_program blocking_login transaction_id open_transaction_count cpu_sec total_elapsed_sec start_time reads writes logical_reads isol_level object_name sql_handle plan_handle text
    51 MSCSMCY-SHIPMAT Microsoft SQL Server Management Studio...

  • RE: Reindex maintenance plan error

    gtrennert - Wednesday, August 23, 2017 4:07 AM

    I will have a look to get something better, but not immediatly
    I first try to...

  • RE: Windows authentication account that runs SQL Engine and SQL agent

    Yes, as others have said, you need to change the passwords in SSCM.  If you don't do that, the services will continue to run normally until the next time they...

  • RE: Reindex maintenance plan error

    I think there is something to understand if it's failing, yes.  My point is that you might not want to put too much effort into doing so given that you...

  • RE: Reindex maintenance plan error

    gtrennert - Wednesday, August 23, 2017 2:07 AM

    yes they execute without any problem

    Gosh, yes, you did say that in your original post....

  • RE: Reindex maintenance plan error

    Have you tried running those 51408 statements (or some of them) manually?

    John

Viewing 15 posts - 1,276 through 1,290 (of 7,191 total)