I suggest you sign the trigger with a certificate, copy the certificate to the other database, and grant permissions to a user based on the cert. That will allow cross-database access with the needed permissions even though the caller has no access to the other database. See this article for details.
Below is an example:
--Create self-signed cert in Database1 with auto-generated public/private key pair and copy to Database2
USE Database1;
CREATE CERTIFICATE your_certificate
ENCRYPTION BY PASSWORD = 'password protecting certificate private key'
WITH SUBJECT = 'For cross-database access';
GO
--Copy DBMK encrypted cert to another database.
--Cert private key is decrypted using third CERTPRIVATEKEY argument (decryption_password).
--Cert private key encrypted using the second CERTPRIVATEKEY argument (encryption password) to protect private key in transit.
DECLARE @cert_id int = CERT_ID('your_certificate');
DECLARE @public_key varbinary(8000) = CERTENCODED(@cert_id),
@private_key varbinary(8000) = CERTPRIVATEKEY(@cert_id , 'password protecting certificate private key during copy', 'password protecting certificate private key');
--these values should not be NULL
IF @cert_id IS NULL RAISERROR('Assertion failed: @cert_id is NULL',16,1);
IF @public_key IS NULL RAISERROR('Assertion failed: @public_key is NULL',16,1);
IF @private_key IS NULL RAISERROR('Assertion failed: @private_key is NULL',16,1);
--create same certificate in target database with cert private key encrypted by the target database DBMK
DECLARE @sql nvarchar(MAX) =
'CREATE CERTIFICATE your_certificate
FROM BINARY = ' + CONVERT(varchar(MAX), @public_key, 1) + '
WITH PRIVATE KEY (BINARY = ' +
CONVERT(varchar(MAX), @private_key, 1)
+ ', DECRYPTION BY PASSWORD = ''password protecting certificate private key during copy'''
+ ', ENCRYPTION BY PASSWORD = ''password protecting certificate private key'');'
EXEC Database2.sys.sp_executesql @sql;
GO
--create certificate user in Database2 and grant permissions needed by the trigger
USE Database2;
CREATE USER your_certificate_user FROM CERTIFICATE your_certificate;
GRANT INSERT ON dbo.Table2 TO your_certificate_user;
GO
--add signature to trigger by the same certificate that exists in both databases
USE Database1;
ADD SIGNATURE TO dbo.TR_table1
BY CERTIFICATE your_certificate
WITH PASSWORD = 'password protecting certificate private key';
--optionally, remove private key after signing (ephemoral)
ALTER CERTIFICATE your_certificate REMOVE PRIVATE KEY;
GO