Share Coding

Tutorials, Problems, Stuffs …

SQL Server Linked Servers and Create View

Server Objects > New > Linked Server…

1

Input server name (or IP):

2

Security > Without using security context or input the remote login name and password:

3

If the view is created from “right-click > New Views”, an error received when:

Select * from [10.8.8.212].[DBName].[dbo].[TableName]
Error in FROM clause: near '10.8'. 
Unable to parse query text.

The bracket [] will be auto removed by MS Management studio:

4

You may create the view successfully by using SQL:

CREATE VIEW [dbo].[DB_VIEW]
AS
SELECT *
FROM [10.8.8.212].[DBName].[dbo].[TableName]
GO
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: