postgresql – Not able to connect to the target endpoint in dms

Actually i have a requirement to migrate the database from AWS RDS to on premises.I have ubuntu as my on premises server. For that i have to setup a dms task and i have created the replication instance along with my source and target endpoints.
When i run the test connection for source endpoint(which is from aws side), its successful.
But the test connection is failing for my target endpoint(which is on on prem).

I have checked the security group settings but still not able to figure out where i am going wrong..
The error which i am getting-

Test Endpoint failed: Application-Status: 1020912, Application-Message: Cannot connect to ODBC provider Network error has occurred, Application-Detailed-Message: RetCode: SQL_ERROR SqlState: 08001 NativeError: 101 Message: (unixODBC)timeout expired

Any help is much appreciated.

postgresql – Drop postgres constraint before run DMS then restore them back

I need a script to drop constraint and store them in temp table
then restore them back after DMS run.

I have the query to list all the constraints

SELECT * FROM (

SELECT
    pgc.contype as constraint_type,
    pgc.conname as constraint_name,
    ccu.table_schema AS table_schema,
    kcu.table_name as table_name,
    CASE WHEN (pgc.contype = 'f') THEN kcu.COLUMN_NAME ELSE ccu.COLUMN_NAME END as column_name, 
    CASE WHEN (pgc.contype = 'f') THEN ccu.TABLE_NAME ELSE (null) END as reference_table,
    CASE WHEN (pgc.contype = 'f') THEN ccu.COLUMN_NAME ELSE (null) END as reference_col,
    CASE WHEN (pgc.contype = 'p') THEN 'yes' ELSE 'no' END as auto_inc,
    CASE WHEN (pgc.contype = 'p') THEN 'NO' ELSE 'YES' END as is_nullable,

        'integer' as data_type,
        '0' as numeric_scale,
        '32' as numeric_precision
FROM
    pg_constraint AS pgc
    JOIN pg_namespace nsp ON nsp.oid = pgc.connamespace
    JOIN pg_class cls ON pgc.conrelid = cls.oid
    JOIN information_schema.key_column_usage kcu ON kcu.constraint_name = pgc.conname
    LEFT JOIN information_schema.constraint_column_usage ccu ON pgc.conname = ccu.CONSTRAINT_NAME 
    AND nsp.nspname = ccu.CONSTRAINT_SCHEMA
 
 UNION
 
    SELECT  null as constraint_type , null as constraint_name , 'public' as "table_schema" ,
    table_name , column_name, null as refrence_table , null as refrence_col , 'no' as auto_inc ,
    is_nullable , data_type, numeric_scale , numeric_precision
    FROM information_schema.columns cols 
    Where 1=1
    AND table_schema = 'public'
    and column_name not in(
        SELECT CASE WHEN (pgc.contype = 'f') THEN kcu.COLUMN_NAME ELSE kcu.COLUMN_NAME END 
        FROM
        pg_constraint AS pgc
        JOIN pg_namespace nsp ON nsp.oid = pgc.connamespace
        JOIN pg_class cls ON pgc.conrelid = cls.oid
        JOIN information_schema.key_column_usage kcu ON kcu.constraint_name = pgc.conname
        LEFT JOIN information_schema.constraint_column_usage ccu ON pgc.conname = ccu.CONSTRAINT_NAME 
        AND nsp.nspname = ccu.CONSTRAINT_SCHEMA
    )
)   as foo

ORDER BY table_name desc

I need to store it in the table then drop constant

then restore all constraints once DMS finished

mysql – GCP CloudSQL: DMS migration with existing CloudSQL instances

We are planning to make a switch from On-Premises Mysql servers to Google’s Cloud SQL. For that we are planning to use the DMS service provided by Google.

Everything else checks out okay, but we want to use an instance already created by us beforehand(via Terraform) for migration, rather than creating a new instance.

From many of the links I gathered, there doesn’t seem to be any option to do that.

Links:
https://cloud.google.com/database-migration/docs/mysql/migration-types#continuous-migration

https://www.geeksforgeeks.org/google-cloud-platform-overview-of-data-migration-service/

dnd 5e – What are the DM’s responsibilities when dealing with a character’s death?

This is about Best Practices, not responsibilities.

You ask about responsibilities and there aren’t any, formally.
Informally, the objective of the DM is to facilitate the play experience for the players. There is a practical need to work with the player, once the session is over and before the next session, to get their next character set up and ready to fit into the game world. I’ve done that literally dozens of times, probably hundreds. I have also been the player in that situation dozens of times.

  • Good DMs have always opened up some time to help me get my new PC
    ready for the next session with the group.

Should they leave? Should they just sit quietly and watch? What can
they do? What should I, as DM, do?

It depends on the player.

What I usually do when it comes up during a session

I usually have the dead character’s player, for the rest of that session, do all of the die rolling and movement for the monsters that the party is fighting. I’ve been doing this since I started DMing in the late 1970’s. Very few players don’t enjoy this. Most of them jump right in – when they do it relieves the DM of a lot of detailed work, and (importantly) keeps the player engaged for the rest of the session. (This was very important for pre teens, I found).

For those rare ones who do not embrace that option, I have generally put them to work in creating their next character. They can stay in the room, or, if they don’t want the distraction of the session going on while they do that, move to another room.

For those who get upset and / or rage quit

Yeah, it happens. Some people get very upset about their character’s death. I don’t see it that much anymore, but I saw it a lot among teenaged players and a very few adults.

For those cases:

  1. Express condolences. (I did this even in old school games. I never
    took joy nor pride in the PC dying – some DMs seemed to …)

  2. Remind them that this is a game.

  3. Ask them to make a new character, and encourage them to start right
    now. Sometimes this does not work, and that leaves …

  4. Ask them to come back later, or for the next session, when they have
    cooled down.

Those are DM best practices that I’ve seen, and implemented, over a lot of D&D years.


The Impromptu Funeral – a group option if your players like this

I was in one very memorable group in a high lethality campaign (AD&D 1e) who would, after a battle where a PC died, put together an impromptu funeral pyre and each player would say something nice about the dead PC before the flames burned out – unless hot pursuit was an issue. In a few cases of the latter, we had memorial services at a local tavern during the session wrap up, or at the beginning of the next session.
I (a player) maintained the “Hall of Heroes” notebook where the char sheets of dead PCs was kept. (about a dozen). That small three ring binder is still in a box in my pile of old D&D stuff in the attic.


Proper Prior Planning

DMG p. 236 offers this:

Multiple characters can be a good idea in a game that features nonstop
peril and a high rate of character death. If your group agrees to the
premise, have each player keep one or two additional characters on
hand, ready to jump in whenever the current character dies. Each time
the main character gains a level, the backup characters do as well

If you all are running a campaign with a high lethality rate, or have embraced that tone of a campaign, then having a back up character already put together(one for each player) is a best practice. You still have the matter of what to do ‘for the rest of the session’ or ‘until I can fit in a Meet the New PC situation’ which takes us back to “run the monsters” as a good way to keep the player engaged until the session ends, or the meet up scene arises.

Bonus: this approach is also useful if a player gets tired of a PC and wants to retire (or suicide) the PC and bring in a different one. We’ve had five instances of that in my current shared-world campaign that I DM with my brother.

DMS Script Is Failing From SQL to DynamoDB

I am using a DMS task to migrate data from on-premise to the cloud in AWS.
I have resolved several issues involving permissions.
Now, I am encountering the following error that I am unable to resolve which is causing my DMS script to fail. Can anyone shed light on this error and how to fix it?

Last Error Fatal error has occurred Task error notification received from subtask 0, thread 0 [reptask/replicationtask.c:2822] [1022505] RetCode: SQL_ERROR SqlState: 08004 NativeError: 911 Message: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Database ‘rdsadmin’ does not exist. Make sure that the name is entered correctly. Line: 1 Column: -1; RetCode: SQL_ERROR SqlState: 42000 NativeError: 21089 Message: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Only members of the sysadmin fixed server role can perform this operation. Line: 1 Column: -1; Failed while preparing stream component ‘st_0_3ZJW7ULRLAL2T5LICGL5JFYRUF3SDGNTCZZNKJA’.; Cannot initialize subtask; Stream component ‘st_0_3ZJW7ULRLAL2T5LICGL5JFYRUF3SDGNTCZZNKJA’ terminated [reptask/replicationtask.c:2829] [1022505] Stop Reason FATAL_ERROR Error Level FATAL

dnd 5e – How to stop myself from interrupting the session to correct the DM’s mistakes?

I like to think that admitting my mistake is the first step to learning.

I learned the rules (features, traits, spells) fairly quickly and feel confident in my knowledge on how the rules as written work. At first I found myself disrupting the table far too often by correcting the mistakes my fellow players made when using a feature/trait/spell. I’ve realized that that’s the DM’s job, not mine, to correct the players if need be. Ever since then, I was able to stop myself from disrupting the table by rules lawyering the other players, if anything I might come to them after the session, away from the table. Really my mentality was that the other players aren’t my problem, so I shouldn’t deal with it. Although I no longer speak up when my fellow players make mistakes, I just can’t stay quiet when the DM is the one making mistakes. To give a few examples (not to badmouth my DM):

  • Stating that the Shield spell only affects one attack instead of lasting until the start of the caster’s next turn
  • Inconsistently houseruling how critical damage works. Sometimes it’s double dice, sometimes it’s maxed dice + rolled dice, sometimes it’s double damage including modifiers (I don’t mind houserules, I mind the inconsistency)
  • Asking for a strength saving throw to resist a grapple
  • Using an enemy Gloom Stalker Ranger’s Shadowy Dodge feature after the result of the players’ attack rolls are announced (he used it against us to reroll Nat20s)
  • Homebrewing a magic sword that deals an ambiguous “2d8 slashing and necrotic damage” which became an issue when we fought a barbarian

These are not houserules. He states when there is a houserule at his table (critical successes for ability checks, for instance, including initiative). When brought up about these issues, the DM does admit that he was mistaken. These mistakes are minor, but there are always a few every combat encounter, and it always slows things down when I chime in to point them out. However, the table doesn’t care about these mistakes and is having fun regardless, and I’m ruining it.

How do I stop myself from interrupting the session to correct the DM’s mistakes?

dnd 5e – How do DMs roleplay the shamans in “Danger at Dunwater” from the Ghosts of Saltmarsh adventure book?

I just finished running this section a few weeks ago.

First it helps of you read the whole entry, and remember the entries cannot cover every possible contingency, this section is too dynamic.

A lizardfolk shaman is leading two disciples (lizardfolk) in a short prayer to Semuanya.

If the party arrives here accompanied by friendly lizardfolk, the
shaman initially urges the guards to attack. A successful DC 15
Charisma (Persuasion) check by a character prevents a fight, and
instead the lizardfolk take the characters in custody and take them to
meet the queen.

Next consider there are many ways the characters can reach this area, including ways that do not involve meeting the queen. They could even fight their way here. If the party comes in through the correct entrance and someone in the party speaks draconic, and they think up a good story, they can enter the village normally (read communications and disposition), so there are several ways the can interact with lizardfolk without having talked to the queen.

Also consider lizardfolk are not psychic, it is entirely possible for the party to have spoke to the queen and yet for many lizardfolk to not know that. Even if they have met the queen there is no reason to believe shamans were present.

Next remember from the entry on politics of the lizardfolk,

Opposing that group (mostly covertly, for the rule of the queen
remains absolute) are the traditionalists, led by the shamans. The
shamans believe that allying and intermingling with other races is
contrary to the divine will of their god, Semuanya, and that no good
can come of it.
Consequently, the shamans hate and distrust the
minister, Sauriv, whom they consider to be the prime instigator of
these efforts that go against nature. They dare not move openly
against him, however, since he enjoys the trust and favor of the
queen.

Also notice the DC for getting the shamans to trust the party is higher than any other group or individual.

From this we can conclude that the shamans want to start a fight or at least an incident. They don’t want the party in the village. They see the very presence of the party as an affront to their religion, they dislike lizardfolk who even cooperate with humans. So even if the party arrives with friendly lizardfolk, the shaman tries to create an incident, knowing if the party harms any lizardfolk it will help sway the queen against them. The shaman wants to start trouble and the party has to act to convince the guards not to fight. Remember the guards will not speak common

Personally I love this part because you can use it to show the party how they can easily be tricked into undermining their own goals, if they just react to everything knee jerk.

Remember the entries cannot cover every possible contingency. The village is meant to be a dynamic place with dispositions being changed by the players. Which is why politics and communications is discussed first. Covering every contingency would fill a book just for this one single chapter. If the entry does not fit based on what has already occurred, ignore it, but chances are if the party is in that spot, it is a ploy by the shamans that could work.

change data capture – Why add secondary indices before AWS DMS CDC?

https://docs.aws.amazon.com/dms/latest/userguide/CHAP_BestPractices.html

For a full load + CDC task, we recommend that you add secondary indexes before the CDC phase. Because AWS DMS uses logical replication, secondary indexes that support DML operations should be in-place to prevent full table scans.

That doesn’t make sense, given that logical replication updates happen based on PK. (Or do they, if something on the source does UPDATE foo SET bar = 15 WHERE blarg = 12; and there’s a secondary index on blarg?)

amazon rds – How does AWS DMS on-going replication works internally?

From the documentation it’s mentioned that “DMS collects changes to the database logs using the database engine’s native API” and replicates to target. But, I didn’t see anywhere that, at what rate it replicates from source to target in terms of number of records and is there any way we can control this settings or can I know each time how many rows it replicates?

aws aurora – how to enable CDC in google cloud sql server for AWS DMS replication?

I am trying to migrate data from GCP cloud sql server to AWS aurora MySQL using DMS CDC, for this I need to enable CDC on DMS source database which cloud SQL. As per the AWS documentation I need to enable CDC by executing “sp_cdc_enable_db” SP and for this I need sysadmin access but google cloud don’t support sysadmin access. So, in this scenario how to enable CDC?

enter image description here