June 29, 2005 at 10:00 am
Hi,
I'm trying to make a backup copy of a table '_all_props' on my local MS SQL Server 2000 by copying it to a linked server on a network. The linked server is called 'beta', destination db is 'work'. When I execute statement
select *
into beta.work.dbo.Table_backup
from _all_props
I'm receiving message:
Msg 117: The object name 'beta.work.dbo.' contains more than the maximum number of prefixes. The maximum is 2.
Any idea how to accomplish the copying by code in Query Analyzer, other than by doing it through DTS Import/Export Wizard in SQL Server Enterprise Manager?
Thanks,
Sergei
June 29, 2005 at 10:29 am
I would then presume that this operation is not doable that way. Have you tried creating the table on the other server and simply inserting into it?
June 29, 2005 at 10:38 am
the reason I asked is that I have a vague recollection that it can be accomplished that way, fast with just a couple of lines - I did it before but simply forgot the details. Alternative (though slower) way is to use DTS Manager. This morning I ended up doing exactly that.
Thank u
June 29, 2005 at 10:40 am
Slower might be a strong word here. If you know your wizards, it takes less than 1 minute to do that. Now how fast can you type .
June 29, 2005 at 10:47 am
it's mostly clicking in the DTS wizard pointing to objects - boring to death. I'd better typa smth in QZ, or use a template.
June 29, 2005 at 10:49 am
Well hopefully someone will know how to do it. Good luck.
June 29, 2005 at 10:52 am
same to u
June 29, 2005 at 11:18 am
Actually, I was doing something along these lines on a linked server and ran into the same problem. I too will be interested to know if there another way to identify a table on a linked server by using 4 prefixes.
I wasn't born stupid - I had to study.
June 29, 2005 at 11:33 am
something like
select * from beta.data_base.dbo.table_name
works just fine, the problem starts when u attempt to create the new table on a linked server remptely from a local server.
Farrell,
what do u mean by '4 prefixes' ? How can it be? Pls give an example. I thought 3 prefixes is a max.
th
June 29, 2005 at 11:43 am
Select * from (LinkedServer).(Database).(Owner).(Table/view)
June 29, 2005 at 11:54 am
cant you use this syntax
insert
into beta.work.dbo.Table_backup
select * from _all_props
June 29, 2005 at 12:00 pm
No he wants Select into. Insert would do fine but he doesn't want to have to create the table first.
June 29, 2005 at 12:43 pm
Remi:
i was under impression tha 'prefix' is defined as 'identifier before an entity'
ie in yr query above (post 2626) there are 3 prefixes before the table name, or in other words, the table name has 3 prefixes.
June 29, 2005 at 1:06 pm
Remi was correct in interpretting my meaning. I should have said three (3) prefixes instead of four; I erroneously counted the table name as a prefix. Dopey me.
I wasn't born stupid - I had to study.
June 29, 2005 at 1:10 pm
That could be correct :
(LinkedServer).(Db).(Owner).(Table).Column = 4 prefixes .
Viewing 15 posts - 1 through 15 (of 27 total)
You must be logged in to reply to this topic. Login to reply