Forum Replies Created

Viewing 11 posts - 1 through 11 (of 11 total)

  • Reply To: move db files to different location dynamically

    here is the updated script:

    -- Get database file information for each database

    IF OBJECT_ID('TempDB..#holdforeachdb') IS NOT NULL

    DROP TABLE #holdforeachdb;

    create table #holdforeachdb

    ( [databasename] [nvarchar](128) collate sql_latin1_general_cp1_ci_as not null,

    [int] not null,

    [name] [nvarchar](128)...

    • This reply was modified 2 years, 2 months ago by  1974lg.
  • Reply To: move db files to different location dynamically

    Hi Robby, you are completely right, it messed up over there somehow. good catch. updating it. thank you!

  • Reply To: Query to get all server properties



    CONVERT(VARCHAR(100), SERVERPROPERTY('Servername')) Servername ,

    CONVERT(VARCHAR(100), SERVERPROPERTY('ProductVersion')),

    CONVERT(VARCHAR(100), SERVERPROPERTY('ProductLevel')) Product_SP_Level,

    CONVERT(VARCHAR(100), SERVERPROPERTY('ResourceLastUpdateDateTime'))ResourceLastUpdate,

    CONVERT(VARCHAR(100), SERVERPROPERTY('ResourceVersion'))ResourceVersion,



  • Reply To: Full Recovery DB

    you can use register servers and run one of the proposed queries or you can create list of servers and run PS as below:

    $Servername=("SQLC-EST-IN-N5\INTERNAL","SQL1", "SQL2","SQL..n")

    foreach ($Server in $Servername)


    $output += (invoke-sqlcmd...

  • Reply To: Migrate 4 TB database to new environment

    you can also restore from full backup with norecovery and then only transfer the latest trn backups (alternative to log shipping), restore them.

    of course depends how big the trn backups,...

  • RE: Claculated field in Where clause

    GilaMonster - Wednesday, January 9, 2019 12:45 PM

    The problem with optional parameters like that is that they're a performance problem. Erratic performance,...

  • RE: Composite indexes; performance

    AER - Thursday, November 8, 2018 10:05 AM

    Thanks for all your replies.
    I know that is not the simple question; that's why I...

  • RE: What's wrong with my table?

    GilaMonster - Saturday, October 13, 2018 9:57 AM

    Complete lack of normalisation, several questionable data types, lots of names that don't tell me...

  • RE: Page Life Expectancy - dmv counters give occasional massive spikes

    srlanka - Thursday, June 9, 2016 11:03 AM

    Did you find the root cause of this issue? We are seeing the same exact...

  • RE: Partitioning - Sliding Window (Switching) and Always On - Advice Please!

    WolfgangE - Saturday, August 3, 2013 12:36 PM

    I'd say you are the second :-)I'm setting up an Always On Group these weeks....

  • RE: SQL Server Restart or Cluster Failover Notification

    I would also add history table (this is what I did/added):

    CREATE TABLE [dbo].[ClusterNodesHystory]
         [ID]          [int]            IDENTITY(1,1)     NOT NULL CONSTRAINT [PK_ClusterNodesHystory_ID] PRIMARY KEY CLUSTERED ,
         [CurrentNode] [varchar](100)                 NULL,

Viewing 11 posts - 1 through 11 (of 11 total)