Wednesday, March 28, 2012

Problem with liinked server

This is a multi-part message in MIME format.
--=_NextPart_000_00A3_01C79966.58D0C7A0
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable
Hi,
I have two sql server. One is sql 2000, and another is sql 2005
On sql 2000 I try to add linked to sql 2005.
(like this)
exec sp_addlinkedserver @.server =3D N'ZAGREB_NEW',
@.srvproduct =3D N' ',
@.provider =3D N'SQLNCLI',
@.datasrc =3D N'',
@.catalog =3D N'komitenti',
@.provstr =3D N'SERVER=3DZAGREB_NEW;uid=3Dradovan;pwd=3DDELTA555'
GO
I try
SELECT top 1 adresa from zagreb_new.komitenti.dbo.komitenti
and have followig error:
OLE DB error trace [Non-interface error: Column 'MB' (compile-time = ordinal 4) of object '"komitenti"."dbo"."komitenti"' was reported to = have changed. The exact nature of the change is unknown].
Msg 7356, Level 16, State 1, Line 1
OLE DB provider 'SQLNCLI' supplied inconsistent metadata for a column. = Metadata information was changed at execution time.
When I try:
SELECT * FROM OPENQUERY(ZAGREB_NEW, 'SELECT TOP 1 * FROM = komitenti.dbo.komitenti')
I got result.
How can I exec stored procedure on linked server, because
exec Zagreb_new.database.dbo.Mystored doesn't work
error is:
Msg 7212, Level 17, State 1, Line 1
Could not execute procedure 'spG_ProvjeriMB' on remote server = 'zagreb_new'.
--=_NextPart_000_00A3_01C79966.58D0C7A0
Content-Type: text/html;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Hi,
I have two sql server. One is sql 2000, = and another is sql 2005

On sql 2000 I try to add linked to sql 2005.

(like this)
exec sp_addlinkedserver @.server =3D N'ZAGREB_NEW',
@.srvproduct =3D N' ',
@.provider =3D N'SQLNCLI',
@.datasrc =3D N'',
@.catalog =3D N'komitenti',
@.provstr =3D N'SERVER=3DZAGREB_NEW;uid=3Dradovan;pwd=3DDELTA555'
GO

I try
SELECT top 1 adresa from zagreb_new.komitenti.dbo.komitenti
and have followig error:

OLE DB error trace [Non-interface error: = Column 'MB' (compile-time ordinal 4) of object '"komitenti"."dbo"."komitenti"' was = reported to have changed. The exact nature of the change is unknown].
Msg 7356, Level 16, State 1, Line = 1
OLE DB provider 'SQLNCLI' supplied = inconsistent metadata for a column. Metadata information was changed at execution time.

When I try:
SELECT * FROM OPENQUERY(ZAGREB_NEW, = 'SELECT TOP 1 * FROM komitenti.dbo.komitenti')
I got result.

How can I exec stored procedure on linked = server, because
exec Zagreb_new.database.dbo.Mystored = doesn't work
error is:

Msg 7212, Level 17, State 1, Line 1
Could not execute procedure 'spG_ProvjeriMB' on remote = server 'zagreb_new'.

--=_NextPart_000_00A3_01C79966.58D0C7A0--Hi
"Radovan DobriÄ?" wrote:
> Hi,
> I have two sql server. One is sql 2000, and another is sql 2005
> On sql 2000 I try to add linked to sql 2005.
> (like this)
> exec sp_addlinkedserver @.server = N'ZAGREB_NEW',
> @.srvproduct = N' ',
> @.provider = N'SQLNCLI',
> @.datasrc = N'',
> @.catalog = N'komitenti',
> @.provstr = N'SERVER=ZAGREB_NEW;uid=radovan;pwd=DELTA555'
> GO
>
> I try
> SELECT top 1 adresa from zagreb_new.komitenti.dbo.komitenti
> and have followig error:
>
> OLE DB error trace [Non-interface error: Column 'MB' (compile-time ordinal 4) of object '"komitenti"."dbo"."komitenti"' was reported to have changed. The exact nature of the change is unknown].
> Msg 7356, Level 16, State 1, Line 1
> OLE DB provider 'SQLNCLI' supplied inconsistent metadata for a column. Metadata information was changed at execution time.
>
> When I try:
> SELECT * FROM OPENQUERY(ZAGREB_NEW, 'SELECT TOP 1 * FROM komitenti.dbo.komitenti')
> I got result.
>
> How can I exec stored procedure on linked server, because
> exec Zagreb_new.database.dbo.Mystored doesn't work
> error is:
>
> Msg 7212, Level 17, State 1, Line 1
> Could not execute procedure 'spG_ProvjeriMB' on remote server 'zagreb_new'
The only thing I have found about this is that "it could be fixed in SP2"
which versions are the servers running? Is the client one of the servers?
Is a login defined for the linked server? See
http://msdn2.microsoft.com/en-us/library/ms189811.aspx or are you using the
default mapping, in which case will the login have permissions on the remote
server? Your error message when running the remote procedure would indicate
that they don't have permissions to run this.
John|||Hi,
I have sp2 on server (I try it on another server with sp2 in another firm
and have exactly same result).
I try it with sql server account (and did mapping on that account). That
account have admin privil.
radovan
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:BE5DF476-CF21-4F8C-8634-D4461EA9132F@.microsoft.com...
> Hi
> "Radovan Dobriæ" wrote:
>> Hi,
>> I have two sql server. One is sql 2000, and another is sql 2005
>> On sql 2000 I try to add linked to sql 2005.
>> (like this)
>> exec sp_addlinkedserver @.server = N'ZAGREB_NEW',
>> @.srvproduct = N' ',
>> @.provider = N'SQLNCLI',
>> @.datasrc = N'',
>> @.catalog = N'komitenti',
>> @.provstr = N'SERVER=ZAGREB_NEW;uid=radovan;pwd=DELTA555'
>> GO
>>
>> I try
>> SELECT top 1 adresa from zagreb_new.komitenti.dbo.komitenti
>> and have followig error:
>>
>> OLE DB error trace [Non-interface error: Column 'MB' (compile-time
>> ordinal 4) of object '"komitenti"."dbo"."komitenti"' was reported to have
>> changed. The exact nature of the change is unknown].
>> Msg 7356, Level 16, State 1, Line 1
>> OLE DB provider 'SQLNCLI' supplied inconsistent metadata for a column.
>> Metadata information was changed at execution time.
>>
>> When I try:
>> SELECT * FROM OPENQUERY(ZAGREB_NEW, 'SELECT TOP 1 * FROM
>> komitenti.dbo.komitenti')
>> I got result.
>>
>> How can I exec stored procedure on linked server, because
>> exec Zagreb_new.database.dbo.Mystored doesn't work
>> error is:
>>
>> Msg 7212, Level 17, State 1, Line 1
>> Could not execute procedure 'spG_ProvjeriMB' on remote server
>> 'zagreb_new'
> The only thing I have found about this is that "it could be fixed in SP2"
> which versions are the servers running? Is the client one of the servers?
> Is a login defined for the linked server? See
> http://msdn2.microsoft.com/en-us/library/ms189811.aspx or are you using
> the
> default mapping, in which case will the login have permissions on the
> remote
> server? Your error message when running the remote procedure would
> indicate
> that they don't have permissions to run this.
> John
>|||Hi
Have you tried creating the linked server as
EXEC sp_addlinkedserver @.server = 'ZAGREB_NEW',
@.srvproduct = N'',
@.provider = N'SQLNCLI',
@.datasrc = N'ZAGREB_NEW'
or
EXEC sp_addlinkedserver 'ZAGREB_NEW', N'SQL Server'
John
"Radovan Dobriæ" wrote:
> Hi,
> I have sp2 on server (I try it on another server with sp2 in another firm
> and have exactly same result).
> I try it with sql server account (and did mapping on that account). That
> account have admin privil.
> radovan
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:BE5DF476-CF21-4F8C-8634-D4461EA9132F@.microsoft.com...
> > Hi
> >
> > "Radovan Dobriæ" wrote:
> >
> >> Hi,
> >> I have two sql server. One is sql 2000, and another is sql 2005
> >>
> >> On sql 2000 I try to add linked to sql 2005.
> >>
> >> (like this)
> >> exec sp_addlinkedserver @.server = N'ZAGREB_NEW',
> >>
> >> @.srvproduct = N' ',
> >>
> >> @.provider = N'SQLNCLI',
> >>
> >> @.datasrc = N'',
> >>
> >> @.catalog = N'komitenti',
> >>
> >> @.provstr = N'SERVER=ZAGREB_NEW;uid=radovan;pwd=DELTA555'
> >>
> >> GO
> >>
> >>
> >>
> >> I try
> >>
> >> SELECT top 1 adresa from zagreb_new.komitenti.dbo.komitenti
> >>
> >> and have followig error:
> >>
> >>
> >>
> >> OLE DB error trace [Non-interface error: Column 'MB' (compile-time
> >> ordinal 4) of object '"komitenti"."dbo"."komitenti"' was reported to have
> >> changed. The exact nature of the change is unknown].
> >>
> >> Msg 7356, Level 16, State 1, Line 1
> >>
> >> OLE DB provider 'SQLNCLI' supplied inconsistent metadata for a column.
> >> Metadata information was changed at execution time.
> >>
> >>
> >>
> >> When I try:
> >>
> >> SELECT * FROM OPENQUERY(ZAGREB_NEW, 'SELECT TOP 1 * FROM
> >> komitenti.dbo.komitenti')
> >>
> >> I got result.
> >>
> >>
> >>
> >> How can I exec stored procedure on linked server, because
> >>
> >> exec Zagreb_new.database.dbo.Mystored doesn't work
> >>
> >> error is:
> >>
> >>
> >>
> >> Msg 7212, Level 17, State 1, Line 1
> >>
> >> Could not execute procedure 'spG_ProvjeriMB' on remote server
> >> 'zagreb_new'
> >
> > The only thing I have found about this is that "it could be fixed in SP2"
> > which versions are the servers running? Is the client one of the servers?
> >
> > Is a login defined for the linked server? See
> > http://msdn2.microsoft.com/en-us/library/ms189811.aspx or are you using
> > the
> > default mapping, in which case will the login have permissions on the
> > remote
> > server? Your error message when running the remote procedure would
> > indicate
> > that they don't have permissions to run this.
> >
> > John
> >
> >
>
>|||That was my first try.
Linked server works fine with
SELECT * FROM OPENQUERY(ZAGREB_NEW, 'SELECT TOP 1 * FROM
komitenti.dbo.komitenti')
but not with
SELECT TOP 1 * FROM zagreb_new.komitenti.dbo.komitenti'
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:03897BB2-0508-4F7C-A923-090DB6AE439B@.microsoft.com...
> Hi
> Have you tried creating the linked server as
> EXEC sp_addlinkedserver @.server = 'ZAGREB_NEW',
> @.srvproduct = N'',
> @.provider = N'SQLNCLI',
> @.datasrc = N'ZAGREB_NEW'
> or
> EXEC sp_addlinkedserver 'ZAGREB_NEW', N'SQL Server'
>
> John
> "Radovan Dobria" wrote:
>> Hi,
>> I have sp2 on server (I try it on another server with sp2 in another firm
>> and have exactly same result).
>> I try it with sql server account (and did mapping on that account). That
>> account have admin privil.
>> radovan
>> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
>> news:BE5DF476-CF21-4F8C-8634-D4461EA9132F@.microsoft.com...
>> > Hi
>> >
>> > "Radovan Dobria" wrote:
>> >
>> >> Hi,
>> >> I have two sql server. One is sql 2000, and another is sql 2005
>> >>
>> >> On sql 2000 I try to add linked to sql 2005.
>> >>
>> >> (like this)
>> >> exec sp_addlinkedserver @.server = N'ZAGREB_NEW',
>> >>
>> >> @.srvproduct = N' ',
>> >>
>> >> @.provider = N'SQLNCLI',
>> >>
>> >> @.datasrc = N'',
>> >>
>> >> @.catalog = N'komitenti',
>> >>
>> >> @.provstr = N'SERVER=ZAGREB_NEW;uid=radovan;pwd=DELTA555'
>> >>
>> >> GO
>> >>
>> >>
>> >>
>> >> I try
>> >>
>> >> SELECT top 1 adresa from zagreb_new.komitenti.dbo.komitenti
>> >>
>> >> and have followig error:
>> >>
>> >>
>> >>
>> >> OLE DB error trace [Non-interface error: Column 'MB' (compile-time
>> >> ordinal 4) of object '"komitenti"."dbo"."komitenti"' was reported to
>> >> have
>> >> changed. The exact nature of the change is unknown].
>> >>
>> >> Msg 7356, Level 16, State 1, Line 1
>> >>
>> >> OLE DB provider 'SQLNCLI' supplied inconsistent metadata for a column.
>> >> Metadata information was changed at execution time.
>> >>
>> >>
>> >>
>> >> When I try:
>> >>
>> >> SELECT * FROM OPENQUERY(ZAGREB_NEW, 'SELECT TOP 1 * FROM
>> >> komitenti.dbo.komitenti')
>> >>
>> >> I got result.
>> >>
>> >>
>> >>
>> >> How can I exec stored procedure on linked server, because
>> >>
>> >> exec Zagreb_new.database.dbo.Mystored doesn't work
>> >>
>> >> error is:
>> >>
>> >>
>> >>
>> >> Msg 7212, Level 17, State 1, Line 1
>> >>
>> >> Could not execute procedure 'spG_ProvjeriMB' on remote server
>> >> 'zagreb_new'
>> >
>> > The only thing I have found about this is that "it could be fixed in
>> > SP2"
>> > which versions are the servers running? Is the client one of the
>> > servers?
>> >
>> > Is a login defined for the linked server? See
>> > http://msdn2.microsoft.com/en-us/library/ms189811.aspx or are you using
>> > the
>> > default mapping, in which case will the login have permissions on the
>> > remote
>> > server? Your error message when running the remote procedure would
>> > indicate
>> > that they don't have permissions to run this.
>> >
>> > John
>> >
>> >
>>|||Hi
On May 23, 3:40 pm, "Radovan Dobri=E6" <rado...@.servis24.hr> wrote:
> That was my first try.
> Linked server works fine with
> SELECT * FROM OPENQUERY(ZAGREB_NEW, 'SELECT TOP 1 * FROM
> komitenti.dbo.komitenti')
> but not with
> SELECT TOP 1 * FROM zagreb_new.komitenti.dbo.komitenti'
>
The error you are getting would indicate that the user context that
each one is running under is different in each case.
Try mapping the local login to a different remote login using
sp_addlinkedsrvlogin
e=2Eg.
EXEC sp_addlinkedsrvlogin 'Accounts', 'false', 'Domain\Mary', 'MaryP',
'd89q3w4u'
and/or make sure that you can connect as the same user on the remote
system and execute the procedure.
John

No comments:

Post a Comment