Forum Replies Created

Viewing 15 posts - 31 through 45 (of 312 total)

  • Reply To: TempDB won't shrink

    I have tries using couple of different methods.

    1. DBCC SHRINKFILE
    2. DBCC FREEPROCCACHE
    3. There are 8 files in total.

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • Reply To: LOg file growth

    Try this

     IF (OBJECT_ID('tempdb..#DatabaseSize')) IS NOT NULL DROP TABLE #DatabaseSize

    CREATE TABLE #DatabaseSize (
    DatabaseName VARCHAR(255),
    FileLogicalName VARCHAR(255),
    FilePhysicalName VARCHAR(1000),
    AllocatedGB NUMERIC(12,2),
    UsedGB NUMERIC(12,2))


    DECLARE @ServerName VARCHAR(255)
    DECLARE...

    • This reply was modified 6 years, 6 months ago by LearningDBA.

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • Reply To: A database which was part of 2 AGs on the same server

    I see what you are saying but the problem is not about removing the database. Environment details to help you better understand.

    We have AG1 (DAG) which acts as a Primary

    We...

    • This reply was modified 6 years, 6 months ago by LearningDBA.
    Attachments:
    You must be logged in to view attached files.

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • Reply To: DB goes into not sync / suspect after a manual failover

    Its back online and in sync. Took the backup, paused the data movement, restore the DB, join the DB and that's it.

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • Reply To: Is there a SQL to show how many total select statements hit a particular table?

    Run this query and tell me what you get?

    SELECT 
    SPID,
    DB_NAME(SP.DBID) AS DBNAME,
    HOSTNAME,LOGIN_TIME,LOGINAME,
    CAST(((DATEDIFF(s,start_time,GetDate()))/3600) as varchar) + ' hour(s), '
    ...

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • Reply To: DB goes into not sync / suspect after a manual failover

    I am restoring a DB with no recovery. I will then just join the DB.

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • Reply To: Is there a SQL to show how many total select statements hit a particular table?

    I have this query I run when I am trying to capture long running queries. You can modify it and capture all the select statement.

    Create procedure [dbo].[spSelectQueries] 
    as

    INSERT...

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • Reply To: Unable to shrink the log file

    Ag has been configured the same across all servers.

    ON Prem:

    SQL1 Primary              synch

    SQL2 Secondary         synch

    SQL3 Secondary         Asynch

    SQL4 Secondary         synch

    DR site

    SQL15 Primary              synch

    SQL16 Secondary         synch

    SQL17 Secondary         Asynch

    SQL18 Secondary         synch

    log backup runs every 15 minutes

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • Reply To: Unable to shrink the log file

    I have been monitoring the redo_queue_length on 18 for past hour and the size is not decreasing. Its staying around '3341.....'. I am really not sure what to look for...

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • Reply To: Always-On AG Cluster: Suspect database on secondary node, backup failing

    I think it really doesn't matter where you are running your tlog backups (either Primary or Secondary).

    Have you checked the error log? Did you try to run the log backup...

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • Reply To: Adding another listener into an existing AG

    This issue has been resolved. I was trying to create a client access point from cluster level and that's why it was just giving me all sorts of issues. I...

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • Reply To: Adding another listener into an existing AG

    sys.availability_group_listeners only gave me 1 record (details of an existing listener).

    Tried running an alter AG statement with modify listener with port.

    ALTER AVAILABILITY GROUP [AG]

    modify LISTENER N'Test' (PORT=1433);

    Got this error: "The...

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • Reply To: Performance impact by running 2 scripts on the prod server.

    Attaching files

    Attachments:
    You must be logged in to view attached files.

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • Reply To: Documentation of server/db config

    This one is helpful as well

    DECLARE @serverID  INT

    ,       @Memory    INT

    ,       @Edition   VARCHAR (200)

    ,       @Version   VARCHAR (200)

    ,       @CoreCount INT;

    DECLARE @MemoryOutput TABLE ( MemoryGB INT )

    select @serverID = server_id from sys.servers

    SELECT @CoreCount...

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • Reply To: Documentation of server/db config

    Something like this?

     

    DROP TABLE [dbo].INVENTORY

    CREATE TABLE [dbo].INVENTORY(

    [ID] [int] NULL,

    [ServerName] [varchar](200) NULL,

    [Database_Name] [varchar](200) NULL,

    [Recovery_Model] [varchar](30) NULL,

    [Creation_Date] [datetime] NULL,

    [Owner] [varchar](50) NULL,

    [IS_Mirrored] [int] NULL,

    [VLFcount] int

    )

    --variables to hold each 'iteration'

    declare @query varchar(100)

    declare @dbname sysname

    declare...

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

Viewing 15 posts - 31 through 45 (of 312 total)