Forum Discussion
Jaipal385
Dec 25, 2023Copper Contributor
trigger between 2 databases
Hi, community, I am trying to create a trigger between 2 different databases on one server. Query: CREATE TRIGGER insert_into_pipelines ON [test_1].[dbo].[ag] AFTER INSERT AS BEGIN INS...
olafhelper
Dec 27, 2023Bronze Contributor
Reference to database and/or server name in 'test_1.dbo.ag' is not supported in this version of SQL Server.
Jaipal385 , by the error message I guess you are using Azure SQL Database? As the error message clearly says, that not support and there is no way around.
At all it's a bad idea to reference a different database within a trigger. What is that database is offline, in recovery or restore mode? Everything will fail.