I want to connect with relationships between 2 tables in 2 databases without link server.
NOTE: When you say two different databases i'm guessing you mean on two separate servers otherwise just look at 'The beginner''s answer on this.
You can use FROM OPENDATASOURCE
but Microsoft doesn't recommended this as the security details are in the connection string, a Linked Server is the best way to go about it.
The Microsoft Docs is HERE, and a handy post is HERE.
The syntax will look something like this:
SELECT
*
FROM OPENDATASOURCE('Connection String')."DATABASE"."SCHEMA"."TABLE" T1
INNER JOIN Table2 T2 on T1.Id = T2.Id