I am running an update statement in query analyzer to update a database with
data from another database on another server.
I am running into the error : Error: Contains more than the maximum number
of prefixes. Maximum is 3
How do I overcome this error. I am the admin on both servers.http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=44062
DishanF
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!|||I was trying to do something similar by doing an update and "pushing" the da
ta across to a linked server with the following:
update ServerName.AAD.dbo.t_employee
set ServerName.AAD.dbo.t_employee.work_shift = wa.work_shift
from t_employee wa
where ServerName.AAD.dbo.t_employee.id = wa.id
and wa.id = '105'
I was also getting the following:
Server: Msg 117, Level 15, State 2, Line 4
The number name 'ServerName.AAD.dbo.t_employee' contains more than the maxim
um number of prefixes. The maximum is 3.
It's a simple, but not obvious, answer. Put the table you are updating in th
e FROM clause with an alias and update the alias, as follows:
update la
set la.work_shift = wa.work_shift
from ServerName.AAD.dbo.t_employee la, t_employee wa
where la.id = wa.id
and wa.id = '105'
You have to love simple answers. Finding them is the challenging part. :)sql
Showing posts with label analyzer. Show all posts
Showing posts with label analyzer. Show all posts
Thursday, March 29, 2012
Error: Contains more than the maximum number of prefixes. Maximum
I am running an update statement in query analyzer to update a database with
data from another database on another server.
I am running into the error : Error: Contains more than the maximum number
of prefixes. Maximum is 3
How do I overcome this error. I am the admin on both servers.
> I am running an update statement in query analyzer to update a database
with
> data from another database on another server.
> I am running into the error : Error: Contains more than the maximum number
> of prefixes. Maximum is 3
> How do I overcome this error. I am the admin on both servers.
Object names in SQL Server have 4 parts: server.database.owner.objectname
Therefore, you ca have only 3 prefixes. Check the names in your Update
query.
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com
data from another database on another server.
I am running into the error : Error: Contains more than the maximum number
of prefixes. Maximum is 3
How do I overcome this error. I am the admin on both servers.
> I am running an update statement in query analyzer to update a database
with
> data from another database on another server.
> I am running into the error : Error: Contains more than the maximum number
> of prefixes. Maximum is 3
> How do I overcome this error. I am the admin on both servers.
Object names in SQL Server have 4 parts: server.database.owner.objectname
Therefore, you ca have only 3 prefixes. Check the names in your Update
query.
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com
Sunday, February 19, 2012
Error while shrinking transaction log
Hi all,
while I shrinked transaction log using command "dbcc shrinkfile (logfile)" in query analyzer, the error message " cannot find logfile in sysfiles" was shown up.
The I list out content of sysfiles, and found that sysfiles doesn't contain logfile.
Can anybody tell me how to eliminate error in order to shrink transaction log?
Thanks in advances.
PaulYou need to enter the correct filename for your tempdb database. Default is templog. Right click on tempdb to find your correct filename.
Try:
USE tempdb
go
DBCC SHRINKFILE (TEMPLOG)|||Martsar,
Thanks for your input.
I checked and found that my syntax and log file name were correct, but preceding error message was still there. But I did successfully to shrink TEMPLOG.|||to check the filenames of db and log execute from your database:
use yourDB
go
sp_helpfile
The syntax to shrink db and log is:
DBCC SHRINKDATABASE (N'dbName/or logName', 0)
Also, try to shrink log in EM.
while I shrinked transaction log using command "dbcc shrinkfile (logfile)" in query analyzer, the error message " cannot find logfile in sysfiles" was shown up.
The I list out content of sysfiles, and found that sysfiles doesn't contain logfile.
Can anybody tell me how to eliminate error in order to shrink transaction log?
Thanks in advances.
PaulYou need to enter the correct filename for your tempdb database. Default is templog. Right click on tempdb to find your correct filename.
Try:
USE tempdb
go
DBCC SHRINKFILE (TEMPLOG)|||Martsar,
Thanks for your input.
I checked and found that my syntax and log file name were correct, but preceding error message was still there. But I did successfully to shrink TEMPLOG.|||to check the filenames of db and log execute from your database:
use yourDB
go
sp_helpfile
The syntax to shrink db and log is:
DBCC SHRINKDATABASE (N'dbName/or logName', 0)
Also, try to shrink log in EM.
Error while running Query
Hi,
SQL Server 7
When i ran a query in query analyzer i am getting the below error.
once i closed and opened the query analyzer and ran the same query it worked fine.
pls the error which i got in first time.
Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
[Microsoft][ODBC SQL Server Driver]TDS buffer length too large
[Microsoft][ODBC SQL Server Driver]TDS buffer length too large
[Microsoft][ODBC SQL Server Driver]TDS buffer length too large
[Microsoft][ODBC SQL Server Driver]TDS buffer length too large
[Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server
[Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server
[Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server
[Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server
[Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server
[Microsoft][ODBC SQL Server Driver]TDS buffer length too large
[Microsoft][ODBC SQL Server Driver]TDS buffer length too large
[Microsoft][ODBC SQL Server Driver]TDS buffer length too large
Pls help me in this
TIA
AdilSo, after you reopened QA the same query ran with no errors? Are you suspecting you're going to get it again?|||hi
thanks for the reply
yes, i'm worried if it comes again whats the solution for it.
pls help me out.
TIA|||The problem seems to be that you've got some bits stuck in your network cable. Remove the cable, shake it vigorously in all four cardinal compass points (north, east, south, and west), and plug it back in. Things should work just fine then!
On a slightly more serious note, removing the network cable will actually fix the problem in most cases. There was some kind of communication error, possibly lost data/framing error/digi-voodoo/etc. When you remove the network cable for any significant amount of time (over a few seconds), the NIC resets. When the cable is reattached, the NIC reconnects, and whatever problem there was is magically gone.
If nothing else, the attention that you get when everybody thinks that you've clearly lost what little mind you might have once had, then your bizzare behavior appears to fix the problem will get you lots of digi-voodoo status.
-PatP|||that's an interesting solution, but considering the real reason for the above error actually very precise. now, here's your reference material (http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q176/2/56.asp&NoWebContent=1) in this regard.|||Pat Phelan, you need to be more carefull about your advice. I followed your intructions and got bits all over my carpet. They are extremely hard to get out, and since the dang things carry a static charge they stick to my cat and he has tracked them all over the house. On a positive note, they seemed to pass through his digestive tract pretty quickly.
SQL Server 7
When i ran a query in query analyzer i am getting the below error.
once i closed and opened the query analyzer and ran the same query it worked fine.
pls the error which i got in first time.
Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
[Microsoft][ODBC SQL Server Driver]TDS buffer length too large
[Microsoft][ODBC SQL Server Driver]TDS buffer length too large
[Microsoft][ODBC SQL Server Driver]TDS buffer length too large
[Microsoft][ODBC SQL Server Driver]TDS buffer length too large
[Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server
[Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server
[Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server
[Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server
[Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server
[Microsoft][ODBC SQL Server Driver]TDS buffer length too large
[Microsoft][ODBC SQL Server Driver]TDS buffer length too large
[Microsoft][ODBC SQL Server Driver]TDS buffer length too large
Pls help me in this
TIA
AdilSo, after you reopened QA the same query ran with no errors? Are you suspecting you're going to get it again?|||hi
thanks for the reply
yes, i'm worried if it comes again whats the solution for it.
pls help me out.
TIA|||The problem seems to be that you've got some bits stuck in your network cable. Remove the cable, shake it vigorously in all four cardinal compass points (north, east, south, and west), and plug it back in. Things should work just fine then!
On a slightly more serious note, removing the network cable will actually fix the problem in most cases. There was some kind of communication error, possibly lost data/framing error/digi-voodoo/etc. When you remove the network cable for any significant amount of time (over a few seconds), the NIC resets. When the cable is reattached, the NIC reconnects, and whatever problem there was is magically gone.
If nothing else, the attention that you get when everybody thinks that you've clearly lost what little mind you might have once had, then your bizzare behavior appears to fix the problem will get you lots of digi-voodoo status.
-PatP|||that's an interesting solution, but considering the real reason for the above error actually very precise. now, here's your reference material (http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q176/2/56.asp&NoWebContent=1) in this regard.|||Pat Phelan, you need to be more carefull about your advice. I followed your intructions and got bits all over my carpet. They are extremely hard to get out, and since the dang things carry a static charge they stick to my cat and he has tracked them all over the house. On a positive note, they seemed to pass through his digestive tract pretty quickly.
Subscribe to:
Posts (Atom)