Share via

How to create view from another server

BeUnique 2,332 Reputation points
2021-02-18T07:59:10.693+00:00

I have 2 server which is server1 and server2

i just want copy of the view from server 2 and same to be in server1.

the main thing is, i don't want all the tables and views. i just want only one view from server2 and same to be reflected in server1.

Is it possible to create view without using linked server..?

Example:

Server2 :

            TESTDB ==> 
                               dbo.view1
                               dbo.view2

I want to fetch view from (server2 ==> TESTDB ==>dbo.view2)

Note : if i use linked server, the other person may be able to see all the db,tables and views. we just want to restrict.

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories

0 comments No comments

Answer accepted by question author

Olaf Helper 47,621 Reputation points
2021-02-18T08:44:11.507+00:00

Is it possible to create view without using linked server..?

Instead of a Linked Server (which should be preferred for your requirement) you can use OPENROWSET (Transact-SQL) ; which is a kind of ad-hoc Linked Server.

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.