I have a local database that has a linked server pointing to a remote server by its IP address. So in my local database, the linked server is called [192.168.0.1] (just an example, not the real IP).
There's one query that I found that does not run correctly:
SELECT * INTO [192.168.0.1].RemoteDB.dbo.NewSampleTable FROM LocalDB.dbo.SampleTable
This command fails with
Msg 117, Level 15, State 1, Line 1
The object name '192.168.0.1.RemoteDB.dbo.NewSampleTable' contains more than the maximum number of prefixes. The maximum is 2.
However, some other queries I tried work fine:
SELECT * FROM [192.168.0.1].RemoteDB.dbo.NewSampleTable
INSERT INTO [192.168.0.1].RemoteDB.dbo.NewSampleTable SELECT * FROM LocalDB.dbo.SampleTable
SELECT * INTO LocalDB.dbo.NewSampleTable FROM [192.168.0.1].RemoteDB.dbo.SampleTable
All of those queries run just fine, and I'm puzzled as to why it fails when I SELECT INTO. Is this a bug, or am I doing something wrong?
Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86) Oct 14 2005 00:33:37 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
View Complete Post