Share Coding

Tutorials, Problems, Stuffs …

Category Archives: MSSQL

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