Hi @HemantSudehely-0557, yes we can create the trigger between multiple databases in same Azure Sql Managed Instance. Please check the below steps:
Create an Azure Sql Managed Instance on Azure Portal
Connect the instance through SSMS
Create a trigger in below format, need to create a linked query to update second database through first database. This is just a sample code and you can write the trigger logic as per your need. Or if there is anything specific related to code, please let us know.
CREATE TRIGGER testInsertTriggerOnAzureManagedInstance
ON [test].[dbo].[audit]
FOR INSERT AS
BEGIN
your logic
INSERT INTO dbo.audit values ('1')
INSERT INTO [test2].[dbo].[audit] values('2')
END
Execute the trigger by inserting some records in [test].[dbo].[audit] table. Both the tables should be updated.
Delete trigger can be written in same way.
Please let us know if this was the problem statement you were looking for. If not, we can discuss further and we will be glad to help you out here.
If an Answer is helpful, please “Accept Answer” or Up-Vote for the same which might be beneficial to other community members reading this thread.