Showing posts with label linked. Show all posts
Showing posts with label linked. Show all posts

Friday, March 30, 2012

One more question regarding Reporting action

All the reporting action samples I read from AdventureWorks, when pass link and parameter to the report in reporting service, is linked to the report as Analysis Service data source based report.

I am wondering if reporting action can pass parameter to regular relational db based reporting service report not Analysis Service data source based report.

If yes, could you share a simple sample?

I can't see why the data source of a report would matter, when using a reporting action. The Adventure Works examples may all be using an Analysis Services data source just for convenience. Have you tried editing an existing Adventure Works reporting action, to point to a relational report instead?|||

Hi Deepak, thank you so much for your reply! Yes, I did try the following using AW AS and AW sample reports RS projects:

Here is my reporting action:

Name: Sales Order Detail

Target Type: Dimension members

Target object: Internet Sales Order Detail

ReportServer:localhost

ReportPath:ReportServer?/AdventureWorks Sample Reports/Sales Order Detail

Parameters NameTongue TiedalesOrderNumber (Match the one at Sales Order Detail report

Parameter Value: [Internet Sales Order Details].[Sales Order Number].[Sales Order Number].CurrentMember.Name

And I make sure Sales Order Detail Report is running correctly and parameter is matching the parameter name I defined at the cube reporting action. Then I deploy the cube, however when drop the Sale Order Number dimension and right click, there is no Reporting Action showing up.

Could you give me some pointers?

Thanks

|||

Did you configure the "Caption", under "Additional Properties" - if not, you can refer to the Adventure Works "Sales Reason Comparisons" action, whose Caption is defined as an MDX expression:

"Sales Reason Comparisons for " +

[Product].[Category].CurrentMember.Member_Caption + "..."

|||

Thanks again. Just did that and deployed.

"Sales Reason Comparisons for " + [Internet Sales Order Details].[Sales Order Number].[Sales Order Number].CurrentMember.Member_Caption + "..."

However reporting action is still not showing. Deepak, anything else I miss?

Thanks

|||Can't think of anything else - are you able to see the standard Reporting action which comes with Adventure Works, ie. "Sales Reason Comparisons"? If so, I would suggest making a test copy of Adventure Works, and progressively modifying this action to incorporate your report in small steps, till it breaks - or maybe it doesn't break!

Monday, March 26, 2012

on insert trigger and a linked server?

Hi all
Is it possiable to use an on insert trigger to insert the same record into
another server (linked)?
Any hints or issues with this would be appreciated.
thanksdarwin
Yes, but why would you want to use a trigger?
"darwin" <darwin@.discussions.microsoft.com> wrote in message
news:AD6E0624-1BB6-49A1-B187-DD6424FFFD1F@.microsoft.com...
> Hi all
> Is it possiable to use an on insert trigger to insert the same record into
> another server (linked)?
> Any hints or issues with this would be appreciated.
> thanks|||Hi
When a new record is inserted into the first table we need a copy of that
record sent to a second table on a different server (linked), in near real
time.
What is the solution you are thinking of?
thks
"Uri Dimant" wrote:

> darwin
> Yes, but why would you want to use a trigger?
>
> "darwin" <darwin@.discussions.microsoft.com> wrote in message
> news:AD6E0624-1BB6-49A1-B187-DD6424FFFD1F@.microsoft.com...
>
>|||Transactional replication is an option:
http://msdn.microsoft.com/library/d...r />
_7syn.asp
ML
http://milambda.blogspot.com/

Wednesday, March 21, 2012

OLEDB Provider Errors

I have an asp page that is using OLEDB to connect to SQL
Server 2K (We'll call it 2k1). It requests data from a
view on 2k1 which via linked server points to a an
instance of SQL Server 7.0 on a different box (We'll call
it 702). In running this command we receive very
sporadic errors. There are two in particular. Both are
regarding the transactions being used for the open
connection. Every thing I read points to using explicit
transactions which we are not. The error will last for
about 20 minutes and just disappear. The developers
stating that they are definately closing connections. I
don't know how to proceed.
Here are the errors.
1.
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'SQLOLEDB' reported an error.
[OLE/DB provider returned message: Connection is busy
with results for another command]
OLE DB error trace [OLE/DB Provider 'SQLOLEDB'
IOpenRowset::OpenRowset returned 0x80004005: ].
2.
Server: Msg 7392, Level 16, State 2,
Could not start a transaction for OLEDB
provider 'SQLOLEDB'. [OLE/DB provider returned message:
Only one transaction cant be active on this session.Are you using Transaction Object
try use the connection's tranaction objectsql

Tuesday, March 20, 2012

OLEDB provider error.

Hi:

I have created a cube and deployed in sql server. I am trying to connect to analysis services to access cube with linked server. I am getting this error...how do i fix this.?

OLE DB provider "MSOLAP" for linked server "(null)" returned message "Errors in the OLE DB provider. The Extended Properties property is set to a value that is not supported.".

Msg 7373, Level 16, State 2, Line 1

Cannot set the initialization properties for OLE DB provider "MSOLAP" for linked server "(null)".

Thanks,

Pramod

What's your Extended Properties? Please check whether there is any typo.|||

Xinwei:

Extended properties for my database is null...

Thanks,

Pramod

|||

Just leave it blank like this: Extended Properties="".
What's your whole connection string?
Thanks.

|||

Xinwei:

This is the query i am using...

SELECT a.* FROM OPENROWSET( 'MSOLAP','DATASOURCE=PKUMAR\PKUMAR;

Initial Catalog=Analysis Services Project1;', 'SELECT Measures.members ON ROWS,

[Product Category].members ON COLUMNS FROM [Adventure Works Internet Sales]') as a

go

Thanks,

|||The problem is on the Extended Properities as the error msg stated. If you have nothing to specify, please try delete it.|||Yep...it didnt help|||I am moving this to the SQL Server Analysis Services Forum.

OLEDB Jet For Access

Hi all,
I am looking for a definitive guide to set up a linked server in SQL Server
2000.
I want to add a linked server to an Access (95) database
I have managed this on our production server (although I keep getting errors
occasionally & have to restart the server service), but on a vanilla test
server I cannot get it to work.
I would like to understand why the production server is OK, but the test is
not.
What do I have to install first to make this work?
Also, is there an idiot's guide anywhere ?Hi,
Use Component Checker to verify MDAC installation.
Install a latest Jet pack update or MDAC.
You can find it on http://www.microsoft.com/data
Use sp_addlinkedserver and sp_dropserver instead EM. (read BOL)
Tomasz B.
"CCA Dave" wrote:

> Hi all,
> I am looking for a definitive guide to set up a linked server in SQL Serve
r
> 2000.
> I want to add a linked server to an Access (95) database
> I have managed this on our production server (although I keep getting erro
rs
> occasionally & have to restart the server service), but on a vanilla test
> server I cannot get it to work.
> I would like to understand why the production server is OK, but the test i
s
> not.
> What do I have to install first to make this work?
> Also, is there an idiot's guide anywhere ?
>
>

OLEDB Jet For Access

Hi all,
I am looking for a definitive guide to set up a linked server in SQL Server
2000.
I want to add a linked server to an Access (95) database
I have managed this on our production server (although I keep getting errors
occasionally & have to restart the server service), but on a vanilla test
server I cannot get it to work.
I would like to understand why the production server is OK, but the test is
not.
What do I have to install first to make this work?
Also, is there an idiot's guide anywhere ?
Hi,
Use Component Checker to verify MDAC installation.
Install a latest Jet pack update or MDAC.
You can find it on http://www.microsoft.com/data
Use sp_addlinkedserver and sp_dropserver instead EM. (read BOL)
Tomasz B.
"CCA Dave" wrote:

> Hi all,
> I am looking for a definitive guide to set up a linked server in SQL Server
> 2000.
> I want to add a linked server to an Access (95) database
> I have managed this on our production server (although I keep getting errors
> occasionally & have to restart the server service), but on a vanilla test
> server I cannot get it to work.
> I would like to understand why the production server is OK, but the test is
> not.
> What do I have to install first to make this work?
> Also, is there an idiot's guide anywhere ?
>
>

Monday, March 12, 2012

OLE/DB provider returned message: Deferred prepare could not be completed

I have 2 SQL servers. And in the first one I have added the second SQL as a Link Server. When I run an SQL statement on the linked server I get the following message.

Server: Msg 7202, Level 11, State 1, Line 1
Could not find server 'PROD' in sysservers. Execute sp_addlinkedserver to add the server to sysservers.
[OLE/DB provider returned message: Deferred prepare could not be completed.]

The SQL statement that I am runnins is

Select * from openquery(PROD,'Select * from PROD.GMS.dbo.qryDispCL')

But when I run only the SQL statement "Select * from PROD.GMS.dbo.qryDispCL" it works perfect. But I need to have the first statement running.

Please help. Your valuable feedback is greatly appriciated.

It's really strange... You can run this to check registered server:

EXEC sp_helpservers

If the server 'PROD' is not in the result, then run this to add it:

EXEC sp_addlinkedserver 'PROD'

Note: you may need to add login information for the 'PROD' server with 'sp_addlinkedsrvlogin'.

Friday, March 9, 2012

OLE DB provider ran out of memory

I run 2 sql servers same nt4 sp5 and server 1 has 2G
memory, server 1 is linked to server 3 and vice versa.
server 1 has a limit of 1.5G max memory setting for sql
server and I recently ran into this error when initiating
job from server03
OLE DB provider 'SQLOLEDB' reported an error.
The provider ran out of memory. [SQLSTATE 42000] (Error
7399) Could not relay results of procedure 'xxx' from
remote server 'server01'.
[SQLSTATE 42000] (Error 7221) Associated statement is not
prepared
[SQLSTATE HY007] (Error 0) OLE DB provider 'SQLOLEDB'
reported an error.
The provider ran out of memory. [SQLSTATE 42000] (Error
7399)
Could not relay results of procedure 'xxx' from remote
server 'server01'.
[SQLSTATE 42000] (Error 7221). The step failed.
not sure if it's a memory cache problem or what. at my
wits endThe problem is more than likely on Server 3 not 1. You say Server 1 has 2GB
with a 1.5GB max setting, what about Server 3? Linked Servers and OLEDB
type activity is usually taken from the memory to leave portion and not the
memory pool. Memory to leave can be adjusted by using the -g statup
parameter for sql server. I also suggest you set a mx memory on Server 3 if
not already.
Andrew J. Kelly
SQL Server MVP
"Paul" <anonymous@.discussions.microsoft.com> wrote in message
news:c33101c3ee91$64e3dfb0$a101280a@.phx.gbl...
> I run 2 sql servers same nt4 sp5 and server 1 has 2G
> memory, server 1 is linked to server 3 and vice versa.
> server 1 has a limit of 1.5G max memory setting for sql
> server and I recently ran into this error when initiating
> job from server03
> OLE DB provider 'SQLOLEDB' reported an error.
> The provider ran out of memory. [SQLSTATE 42000] (Error
> 7399) Could not relay results of procedure 'xxx' from
> remote server 'server01'.
> [SQLSTATE 42000] (Error 7221) Associated statement is not
> prepared
> [SQLSTATE HY007] (Error 0) OLE DB provider 'SQLOLEDB'
> reported an error.
> The provider ran out of memory. [SQLSTATE 42000] (Error
> 7399)
> Could not relay results of procedure 'xxx' from remote
> server 'server01'.
> [SQLSTATE 42000] (Error 7221). The step failed.
> not sure if it's a memory cache problem or what. at my
> wits end
>

OLE DB provider ran out of memory

I run 2 sql servers same nt4 sp5 and server 1 has 2G
memory, server 1 is linked to server 3 and vice versa.
server 1 has a limit of 1.5G max memory setting for sql
server and I recently ran into this error when initiating
job from server03
OLE DB provider 'SQLOLEDB' reported an error.
The provider ran out of memory. [SQLSTATE 42000] (Error
7399) Could not relay results of procedure 'xxx' from
remote server 'server01'.
[SQLSTATE 42000] (Error 7221) Associated statement is not
prepared
[SQLSTATE HY007] (Error 0) OLE DB provider 'SQLOLEDB'
reported an error.
The provider ran out of memory. [SQLSTATE 42000] (Error
7399)
Could not relay results of procedure 'xxx' from remote
server 'server01'.
[SQLSTATE 42000] (Error 7221). The step failed.
not sure if it's a memory cache problem or what. at my
wits endThe problem is more than likely on Server 3 not 1. You say Server 1 has 2GB
with a 1.5GB max setting, what about Server 3? Linked Servers and OLEDB
type activity is usually taken from the memory to leave portion and not the
memory pool. Memory to leave can be adjusted by using the -g statup
parameter for sql server. I also suggest you set a mx memory on Server 3 if
not already.
--
Andrew J. Kelly
SQL Server MVP
"Paul" <anonymous@.discussions.microsoft.com> wrote in message
news:c33101c3ee91$64e3dfb0$a101280a@.phx.gbl...
> I run 2 sql servers same nt4 sp5 and server 1 has 2G
> memory, server 1 is linked to server 3 and vice versa.
> server 1 has a limit of 1.5G max memory setting for sql
> server and I recently ran into this error when initiating
> job from server03
> OLE DB provider 'SQLOLEDB' reported an error.
> The provider ran out of memory. [SQLSTATE 42000] (Error
> 7399) Could not relay results of procedure 'xxx' from
> remote server 'server01'.
> [SQLSTATE 42000] (Error 7221) Associated statement is not
> prepared
> [SQLSTATE HY007] (Error 0) OLE DB provider 'SQLOLEDB'
> reported an error.
> The provider ran out of memory. [SQLSTATE 42000] (Error
> 7399)
> Could not relay results of procedure 'xxx' from remote
> server 'server01'.
> [SQLSTATE 42000] (Error 7221). The step failed.
> not sure if it's a memory cache problem or what. at my
> wits end
>

OLE DB Provider Oracle

english:

Hello,

I have got a problem with the a linked server in SQL server 2005 (64 bit) to Oracle 8.0.5. (32 bit).

Further details:

The old existing SQL server 2000 (32 bit) has a linked server to Oracle 8.0.5. The works with the OLE DB provider from Microsoft. The new SQL server 2005 (64 bit) should also have a linked server to this Oralce database. I have installed the Oracle 8.0 clients on the new server. The connection to oracle works with the client tools from Oracle.

But the SQL server 2005 couldn't connect to the oracle database.

The error message from the SQL server sounds (translated form a german error message):

A instance of the OLE DB provider "OraOLEDB.Oracle" for the linked server "xxxxxx" can't create.

Is the Oracle client software / OLE DB provider the problem?

Exist an other OLE DB provider for Oracle, may be from Microsoft, which works?

Thanks for your help

german:

Hallo Zusammen,

ích habe ein Problem bei der Migration von SQL Server 2005 auf ein x64 Windows System.

Problem ist folgendes:
Auf dem alten Server Windows x32 lief SQL Server 2000 mit einem Verbindungsserver zum Oracle Server 8.05. Das funktionierte mit dem OLE DB treiber von Microsoft hervoragend. Nun haben wir aber eine neue Windows x64 Maschine und ich m?chte die Verbindung zum Oracle Server wieder nutzen. Hatte die Oracle Client Software installiert und bekomme eine Fehlermeldung:

Eine Instanz des OLE DB Anbieters "ORAOLEDB.ORACLE" für den Verbindungsserver "xxxxx" kann nicht erstellt werden.

Ist das ein Problem mit der Oracle Client Software bzw. dem zugrunde liegenden OLE DB Treiber?
Gibt es einen anderen OLE DB Treiber für Oracle, z.B. von Microsoft, der funktionieren k?nnte?

Bin schon l?nger damit besch?ftigt, das zum Laufen zu bekommen. Die Oracle Version ist nicht die neueste, ich wei?.
Was kann ich tun, damit das endlich l?uft.

Für Hilfen w?re ich sehr dankbar.

If you are running 64-bit SQL, you need to use a 64-bit OLEDB provider with linked servers.

So you need to get Oracle's 64-bit OLEDB Provider for Oracle, Microsoft does not provide a 64-bit OLEDB Provider for Oracle.

|||

I got it mostly working with the latest oracle client (10.2.0.3) which you can download from Oracle if you have support with them. If you don't have the .3 version, you'll encounter a bug with their client if you make connections in DTS / intergration services packages to the Oracle DB server. I'm still running into an issue with a remote link server (see my other post).

Here are the steps I did to make the client work. Hope this helps you.

1) To get it working you need to do a custom installation and select at minimum:

Oracle Windows Interfaces (all)

Oracle Database Utilities

SQL*Plus

Oracle Net

2) You then need to copy the files: tnsnames.ora AND sqlnet.ora from another DB server to where ever the Oracle client is installed. In my case it's located at: D:\oracle\product\10.2.0\client\NETWORK\ADMIN

3) You then need to modify the registry to change the dll's that MDAC uses to connect to Oracle:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI

OracleXaLib=oraclient10.dll

OracleSqlLib=orasql10.dll

OracleOciLib=oci.dll

4) You then need to reboot to have the changes take effect.

5a) Browse to: /Server Objects/Linked Servers/Providers and right click on OraOLEDB.Oracle and select properties. Then check the following boxes: Dynamic parameter, Allow inprocess

5b) Then you need to create the link server in the Microsoft SQL Server Management Studio by doing the following:

Browse to: Server Objects/Linked Servers, right click and select "New Linked Server"

Enter the linked server name

Under provider select "Oracle Provider for OLE DB"

Enter a product name IE Oracle...

Enter the data source name (the same name in the tnsnames.ora file)

Select "Security" on the left side and select the last radio button "Be made using this security context" and enter the user name and password to connect to the remote db.

6) Then click OK :)

|||

Hello Arron,

thanks for the information.

I have installed the oracle version 10.2.0.1.0. That was the latest that I found on http://www.oracle.com/technology/software/products/database/oracle10g/index.html for Windows with 64-bit.

We haven't got a support contract with oracle, because it is an old version.

We wouldn't use DTS or integration services (would be nice if it's working also).
We need this only in stored procedures with SQL statements (SELECT, INSERT and UPDATE).

Stefan and MediaK

OLE DB Provider Oracle

english:

Hello,

I have got a problem with the a linked server in SQL server 2005 (64 bit) to Oracle 8.0.5. (32 bit).

Further details:

The old existing SQL server 2000 (32 bit) has a linked server to Oracle 8.0.5. The works with the OLE DB provider from Microsoft. The new SQL server 2005 (64 bit) should also have a linked server to this Oralce database. I have installed the Oracle 8.0 clients on the new server. The connection to oracle works with the client tools from Oracle.

But the SQL server 2005 couldn't connect to the oracle database.

The error message from the SQL server sounds (translated form a german error message):

A instance of the OLE DB provider "OraOLEDB.Oracle" for the linked server "xxxxxx" can't create.

Is the Oracle client software / OLE DB provider the problem?

Exist an other OLE DB provider for Oracle, may be from Microsoft, which works?

Thanks for your help

german:

Hallo Zusammen,

ích habe ein Problem bei der Migration von SQL Server 2005 auf ein x64 Windows System.

Problem ist folgendes:
Auf dem alten Server Windows x32 lief SQL Server 2000 mit einem Verbindungsserver zum Oracle Server 8.05. Das funktionierte mit dem OLE DB treiber von Microsoft hervoragend. Nun haben wir aber eine neue Windows x64 Maschine und ich m?chte die Verbindung zum Oracle Server wieder nutzen. Hatte die Oracle Client Software installiert und bekomme eine Fehlermeldung:

Eine Instanz des OLE DB Anbieters "ORAOLEDB.ORACLE" für den Verbindungsserver "xxxxx" kann nicht erstellt werden.

Ist das ein Problem mit der Oracle Client Software bzw. dem zugrunde liegenden OLE DB Treiber?
Gibt es einen anderen OLE DB Treiber für Oracle, z.B. von Microsoft, der funktionieren k?nnte?

Bin schon l?nger damit besch?ftigt, das zum Laufen zu bekommen. Die Oracle Version ist nicht die neueste, ich wei?.
Was kann ich tun, damit das endlich l?uft.

Für Hilfen w?re ich sehr dankbar.

If you are running 64-bit SQL, you need to use a 64-bit OLEDB provider with linked servers.

So you need to get Oracle's 64-bit OLEDB Provider for Oracle, Microsoft does not provide a 64-bit OLEDB Provider for Oracle.

|||

I got it mostly working with the latest oracle client (10.2.0.3) which you can download from Oracle if you have support with them. If you don't have the .3 version, you'll encounter a bug with their client if you make connections in DTS / intergration services packages to the Oracle DB server. I'm still running into an issue with a remote link server (see my other post).

Here are the steps I did to make the client work. Hope this helps you.

1) To get it working you need to do a custom installation and select at minimum:

Oracle Windows Interfaces (all)

Oracle Database Utilities

SQL*Plus

Oracle Net

2) You then need to copy the files: tnsnames.ora AND sqlnet.ora from another DB server to where ever the Oracle client is installed. In my case it's located at: D:\oracle\product\10.2.0\client\NETWORK\ADMIN

3) You then need to modify the registry to change the dll's that MDAC uses to connect to Oracle:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI

OracleXaLib=oraclient10.dll

OracleSqlLib=orasql10.dll

OracleOciLib=oci.dll

4) You then need to reboot to have the changes take effect.

5a) Browse to: /Server Objects/Linked Servers/Providers and right click on OraOLEDB.Oracle and select properties. Then check the following boxes: Dynamic parameter, Allow inprocess

5b) Then you need to create the link server in the Microsoft SQL Server Management Studio by doing the following:

Browse to: Server Objects/Linked Servers, right click and select "New Linked Server"

Enter the linked server name

Under provider select "Oracle Provider for OLE DB"

Enter a product name IE Oracle...

Enter the data source name (the same name in the tnsnames.ora file)

Select "Security" on the left side and select the last radio button "Be made using this security context" and enter the user name and password to connect to the remote db.

6) Then click OK :)

|||

Hello Arron,

thanks for the information.

I have installed the oracle version 10.2.0.1.0. That was the latest that I found on http://www.oracle.com/technology/software/products/database/oracle10g/index.html for Windows with 64-bit.

We haven't got a support contract with oracle, because it is an old version.

We wouldn't use DTS or integration services (would be nice if it's working also).
We need this only in stored procedures with SQL statements (SELECT, INSERT and UPDATE).

Stefan and MediaK

OLE DB provider 'MSIDXS' reported an error. Access denied.

Not sure if I should post here of inetserver.indexserver, so I apologize
ahead of time.
In Sql2000, I've added a linked server to a development box.
EXEC sp_addlinkedserver Web,
'Index Server',
'MSIDXS',
'stjoedev01.CarenetWeb'
I ran the same command on my local Sql box.
When I execute this query
Select * from OpenQuery(web, 'Select DocTitle, vpath, Filename, Size,
Contents, characterization, PATH, URL, A_Href, rank, write
from stjoedev01.CarenetWeb..Scope(''"d:\Inetpub\"'')
where FREETEXT(Contents, ''adoption'') AND Rank > 50 order by rank desc,
write desc')
on my local box I get a result set. When I excute the same query on the
development sql box I get the following error:
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSIDXS' reported an error. Access denied.
[OLE/DB provider returned message: Invalid catalog name 'CARENETWEB'.
SQLSTATE=42000 ]
OLE DB error trace [OLE/DB Provider 'MSIDXS' ICommandPrepare::Prepare
returned 0x80070005: Access denied.].
In both cases the query analyzer session is logged in with dbo access. I've
checked the file system catalog and "Everyone" has read/write access to the
index files.
The development sql instance is running under a local system account. My
local instance of sql server is running under a domain user account. Would
this account for the 'access denied'?
My ultimate goal is to add a linked server to a production SQL box, but it's
looking rather grim right now.
Thanks for the help,
Barry
The correct linked server command should be this
EXEC sp_addlinkedserver Web,
'Index Server',
'MSIDXS',
'CarenetWeb'
where CarenetWeb is a catalog on the local server.
You can't build a linked server to a remote IS catalog, but you can query it
like this
Select * from openquery(LinkedServerName,'Select DocTitle, Vpath,
Characterization from RemoteServerName.RemoteCatalogName..Scope() where
FileName like ''%.txt''')
Try the above and see if this solves your problem.
"Barry Forrest" <barry.forrest@.no-spam.ps.net> wrote in message
news:ACAF9D1C-A2A1-42CE-8A34-57E6DE116A29@.microsoft.com...
> Not sure if I should post here of inetserver.indexserver, so I apologize
> ahead of time.
> In Sql2000, I've added a linked server to a development box.
> EXEC sp_addlinkedserver Web,
> 'Index Server',
> 'MSIDXS',
> 'stjoedev01.CarenetWeb'
> I ran the same command on my local Sql box.
> When I execute this query
> Select * from OpenQuery(web, 'Select DocTitle, vpath, Filename, Size,
> Contents, characterization, PATH, URL, A_Href, rank, write
> from stjoedev01.CarenetWeb..Scope(''"d:\Inetpub\"'')
> where FREETEXT(Contents, ''adoption'') AND Rank > 50 order by rank desc,
> write desc')
> on my local box I get a result set. When I excute the same query on the
> development sql box I get the following error:
> Server: Msg 7399, Level 16, State 1, Line 1
> OLE DB provider 'MSIDXS' reported an error. Access denied.
> [OLE/DB provider returned message: Invalid catalog name 'CARENETWEB'.
> SQLSTATE=42000 ]
> OLE DB error trace [OLE/DB Provider 'MSIDXS' ICommandPrepare::Prepare
> returned 0x80070005: Access denied.].
> In both cases the query analyzer session is logged in with dbo access.
> I've
> checked the file system catalog and "Everyone" has read/write access to
> the
> index files.
> The development sql instance is running under a local system account. My
> local instance of sql server is running under a domain user account. Would
> this account for the 'access denied'?
> My ultimate goal is to add a linked server to a production SQL box, but
> it's
> looking rather grim right now.
> Thanks for the help,
> Barry
|||How do I need to configure the remote server? Is there anything special I
need to configure on the IS catalog that I'm trying to access remotely?
I've execute the sp_addlinkedserver as you suggest, created the IS catalog
on the SQL box and I'm now getting the dreaded
Invalid catalog name 'CARENETWEB'. SQLSTATE=42000
The biggest problem is I haven't a clue what I'm doing, so thanks again for
the help.
Barry
"Hilary Cotter" wrote:

> The correct linked server command should be this
> EXEC sp_addlinkedserver Web,
> 'Index Server',
> 'MSIDXS',
> 'CarenetWeb'
> where CarenetWeb is a catalog on the local server.
> You can't build a linked server to a remote IS catalog, but you can query it
> like this
> Select * from openquery(LinkedServerName,'Select DocTitle, Vpath,
> Characterization from RemoteServerName.RemoteCatalogName..Scope() where
> FileName like ''%.txt''')
> Try the above and see if this solves your problem.
>
>
>
> "Barry Forrest" <barry.forrest@.no-spam.ps.net> wrote in message
> news:ACAF9D1C-A2A1-42CE-8A34-57E6DE116A29@.microsoft.com...
>
>
|||can you query the local IS server?
Also what rights does the SQL Server agent have on the remote server? Is the
account the SQL Server agent runs under in the local admin group on the
remote server?
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Barry Forrest" <barry.forrest@.no-spam.ps.net> wrote in message
news:B5846E6D-1855-4BE1-9C09-EDC214E7D409@.microsoft.com...
> How do I need to configure the remote server? Is there anything special I
> need to configure on the IS catalog that I'm trying to access remotely?
> I've execute the sp_addlinkedserver as you suggest, created the IS catalog
> on the SQL box and I'm now getting the dreaded
> Invalid catalog name 'CARENETWEB'. SQLSTATE=42000
> The biggest problem is I haven't a clue what I'm doing, so thanks again
for[vbcol=seagreen]
> the help.
> Barry
> "Hilary Cotter" wrote:
query it[vbcol=seagreen]
apologize[vbcol=seagreen]
Size,[vbcol=seagreen]
desc,[vbcol=seagreen]
the[vbcol=seagreen]
to[vbcol=seagreen]
My[vbcol=seagreen]
Would[vbcol=seagreen]
but[vbcol=seagreen]
|||On the Sql Box I can use the query form of IS manager and get results. I can
execute the openquery against the local catalog without receiving the invalid
catalog error, but I don't get any results returned.
The Sql Server Agent runs under a domain account, which is a member of the
remote server's Administrators group.
"Hilary Cotter" wrote:

> can you query the local IS server?
> Also what rights does the SQL Server agent have on the remote server? Is the
> account the SQL Server agent runs under in the local admin group on the
> remote server?
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
> "Barry Forrest" <barry.forrest@.no-spam.ps.net> wrote in message
> news:B5846E6D-1855-4BE1-9C09-EDC214E7D409@.microsoft.com...
> for
> query it
> apologize
> Size,
> desc,
> the
> to
> My
> Would
> but
>
>
|||Its puzzling that you don't get any hits from the local catalog. Can you
check 1) the IS server is running locally. 2) the catalog is indexing
diriectories, expand the directories folder and verify there are directories
there 3) the directories indexed are both real and virtual (the virtual
directories have blue globes on them), 4) there are documents in the
physical directories.
Also can you try this code agains your remote catalog - make sure you change
this entry to reflect your actual remote server name and catalog
@.objIxsso, 'catalog', 'query://remoteservername.remotecatalogname'
create procedure sp_indexServer @.input char(255)
as
declare @.HResult int
declare @.objIxsso int
declare @.RecordSet int
declare @.recordCount int
declare @.Count int
declare @.fields int
declare @.path varchar(100)
declare @.vpath varchar(100)
declare @.doctitle varchar(100)
declare @.size varchar(100)
declare @.filename varchar(100)
declare @.write varchar(100)
declare @.rank varchar(100)
declare @.hitcount varchar(100)
EXEC @.HResult = sp_OACreate 'Ixsso.query', @.objIxsso Out
EXEC @.HResult = sp_OASetProperty @.objIxsso, 'Query', @.input
EXEC @.HResult = sp_OASetProperty
@.objIxsso, 'catalog', 'query://remoteservername.remotecatalogname'
EXEC @.HResult = sp_OASetProperty @.objIxsso, 'Columns', _
'path, vpath, doctitle,size,filename,write,rank,hitcount'
EXEC @.HResult = sp_OASetProperty
@.objIxsso, 'MaxRecords', '200'
EXEC @.HResult = sp_OASetProperty @.objIxsso, 'SortBy', 'rank
[d]'
IF @.HResult <> 0
BEGIN
EXEC sp_OAGetErrorInfo @.objIxsso
RETURN
END
exec @.HResult =sp_OAMethod @.objIxsso,_
'CreateRecordSet("nonsequential")',@.recordSet OUTPUT
IF @.HResult <> 0
BEGIN
EXEC sp_OAGetErrorInfo @.objIxsso
RETURN
END
EXEC @.HResult = sp_OAGetProperty
@.recordSet, 'RecordCount',_
@.RecordCount output
IF @.HResult <> 0
BEGIN
EXEC sp_OAGetErrorInfo @.recordset
RETURN
END
if @.recordcount =0
print 'No matches found'
else
begin
print convert (varchar(5),@.recordcount) +' matches found'
SET @.Count = 1
WHILE ( @.Count <= @.RecordCount )
BEGIN
EXEC @.HResult = sp_OAGetProperty @.RecordSet, 'fields', _
@.fields out,0
EXEC @.HResult = sp_OAGetProperty @.fields, 'Value', _
@.path output
EXEC @.HResult = sp_OAGetProperty @.RecordSet, 'fields', _
@.fields out,1
EXEC @.HResult = sp_OAGetProperty @.fields, 'Value', _
@.vpath output
EXEC @.HResult = sp_OAGetProperty @.RecordSet, 'fields', _
@.fields out,2
EXEC @.HResult = sp_OAGetProperty @.fields, 'Value', _
@.doctitle output
EXEC @.HResult = sp_OAGetProperty @.RecordSet, 'fields', _
@.fields out,3
EXEC @.HResult = sp_OAGetProperty @.fields, 'Value', _
@.size output
EXEC @.HResult = sp_OAGetProperty @.RecordSet, 'fields', _
@.fields out,4
EXEC @.HResult = sp_OAGetProperty @.fields, 'Value', _
@.filename output
EXEC @.HResult = sp_OAGetProperty @.RecordSet, 'fields',
@.fields out,5
EXEC @.HResult = sp_OAGetProperty @.fields, 'Value', @.write
output
EXEC @.HResult = sp_OAGetProperty @.RecordSet, 'fields',
@.fields out,6
EXEC @.HResult = sp_OAGetProperty @.fields, 'Value', @.rank
output
EXEC @.HResult = sp_OAGetProperty @.RecordSet, 'fields',
@.fields out,7
EXEC @.HResult = sp_OAGetProperty @.fields, 'Value',
@.hitcount output
print @.path +', ' +@.vpath+', '+@.doctitle+', '+@.size +', '+_
@.filename +', '+@.write+', '+@.rank+', '+@.hitcount
EXEC @.HResult =sp_OAMethod @.RecordSet, 'MoveNext'
select @.count=@.Count+1
END
print @.count
EXEC @.HResult = sp_OADestroy @.fields
IF @.HResult <> 0
BEGIN
EXEC sp_OAGetErrorInfo @.fields
RETURN
END
END
EXEC @.HResult = sp_OADestroy @.recordset
IF @.HResult <> 0
BEGIN
EXEC sp_OAGetErrorInfo @.recordset
RETURN
END
EXEC @.HResult = sp_OADestroy @.objIxsso
IF @.HResult <> 0
BEGIN
EXEC sp_OAGetErrorInfo @.objIxsso
RETURN
END
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Barry Forrest" <barry.forrest@.no-spam.ps.net> wrote in message
news:8A815D4C-DED1-486F-9E20-ADDFF4A892A4@.microsoft.com...
> On the Sql Box I can use the query form of IS manager and get results. I
can
> execute the openquery against the local catalog without receiving the
invalid[vbcol=seagreen]
> catalog error, but I don't get any results returned.
> The Sql Server Agent runs under a domain account, which is a member of the
> remote server's Administrators group.
> "Hilary Cotter" wrote:
the[vbcol=seagreen]
special I[vbcol=seagreen]
remotely?[vbcol=seagreen]
catalog[vbcol=seagreen]
again[vbcol=seagreen]
where[vbcol=seagreen]
Filename,[vbcol=seagreen]
on[vbcol=seagreen]
'CARENETWEB'.[vbcol=seagreen]
ICommandPrepare::Prepare[vbcol=seagreen]
access.[vbcol=seagreen]
access[vbcol=seagreen]
account.[vbcol=seagreen]
account.[vbcol=seagreen]
box,[vbcol=seagreen]
|||The lack of hits from the local catalog was due to a bad keyboard driver. I
didn't change the scope of the query.
The permissions path you pointed me to seems to be the solution. I connected
to the Sql box with a Sql user account and was able to execute the query.
When I connect to the Sql box with windows credentials I get the invalid
catalog, access denied combination error.
Thank you so much for your assistance.
Barry
"Hilary Cotter" wrote:

> Its puzzling that you don't get any hits from the local catalog. Can you
> check 1) the IS server is running locally. 2) the catalog is indexing
> diriectories, expand the directories folder and verify there are directories
> there 3) the directories indexed are both real and virtual (the virtual
> directories have blue globes on them), 4) there are documents in the
> physical directories.
> Also can you try this code agains your remote catalog - make sure you change
> this entry to reflect your actual remote server name and catalog
> @.objIxsso, 'catalog', 'query://remoteservername.remotecatalogname'
>
> create procedure sp_indexServer @.input char(255)
> as
> declare @.HResult int
> declare @.objIxsso int
> declare @.RecordSet int
> declare @.recordCount int
> declare @.Count int
> declare @.fields int
> declare @.path varchar(100)
> declare @.vpath varchar(100)
> declare @.doctitle varchar(100)
> declare @.size varchar(100)
> declare @.filename varchar(100)
> declare @.write varchar(100)
> declare @.rank varchar(100)
> declare @.hitcount varchar(100)
> --
> EXEC @.HResult = sp_OACreate 'Ixsso.query', @.objIxsso Out
> EXEC @.HResult = sp_OASetProperty @.objIxsso, 'Query', @.input
> EXEC @.HResult = sp_OASetProperty
> @.objIxsso, 'catalog', 'query://remoteservername.remotecatalogname'
> EXEC @.HResult = sp_OASetProperty @.objIxsso, 'Columns', _
> 'path, vpath, doctitle,size,filename,write,rank,hitcount'
> EXEC @.HResult = sp_OASetProperty
> @.objIxsso, 'MaxRecords', '200'
> EXEC @.HResult = sp_OASetProperty @.objIxsso, 'SortBy', 'rank
> [d]'
> IF @.HResult <> 0
> BEGIN
> EXEC sp_OAGetErrorInfo @.objIxsso
> RETURN
> END
> exec @.HResult =sp_OAMethod @.objIxsso,_
> 'CreateRecordSet("nonsequential")',@.recordSet OUTPUT
> IF @.HResult <> 0
> BEGIN
> EXEC sp_OAGetErrorInfo @.objIxsso
> RETURN
> END
> EXEC @.HResult = sp_OAGetProperty
> @.recordSet, 'RecordCount',_
> @.RecordCount output
> IF @.HResult <> 0
> BEGIN
> EXEC sp_OAGetErrorInfo @.recordset
> RETURN
> END
> if @.recordcount =0
> print 'No matches found'
> else
> begin
> print convert (varchar(5),@.recordcount) +' matches found'
> SET @.Count = 1
> WHILE ( @.Count <= @.RecordCount )
> BEGIN
> EXEC @.HResult = sp_OAGetProperty @.RecordSet, 'fields', _
> @.fields out,0
> EXEC @.HResult = sp_OAGetProperty @.fields, 'Value', _
> @.path output
> EXEC @.HResult = sp_OAGetProperty @.RecordSet, 'fields', _
> @.fields out,1
> EXEC @.HResult = sp_OAGetProperty @.fields, 'Value', _
> @.vpath output
> EXEC @.HResult = sp_OAGetProperty @.RecordSet, 'fields', _
> @.fields out,2
> EXEC @.HResult = sp_OAGetProperty @.fields, 'Value', _
> @.doctitle output
> EXEC @.HResult = sp_OAGetProperty @.RecordSet, 'fields', _
> @.fields out,3
> EXEC @.HResult = sp_OAGetProperty @.fields, 'Value', _
> @.size output
> EXEC @.HResult = sp_OAGetProperty @.RecordSet, 'fields', _
> @.fields out,4
> EXEC @.HResult = sp_OAGetProperty @.fields, 'Value', _
> @.filename output
> EXEC @.HResult = sp_OAGetProperty @.RecordSet, 'fields',
> @.fields out,5
> EXEC @.HResult = sp_OAGetProperty @.fields, 'Value', @.write
> output
> EXEC @.HResult = sp_OAGetProperty @.RecordSet, 'fields',
> @.fields out,6
> EXEC @.HResult = sp_OAGetProperty @.fields, 'Value', @.rank
> output
> EXEC @.HResult = sp_OAGetProperty @.RecordSet, 'fields',
> @.fields out,7
> EXEC @.HResult = sp_OAGetProperty @.fields, 'Value',
> @.hitcount output
> print @.path +', ' +@.vpath+', '+@.doctitle+', '+@.size +', '+_
> @.filename +', '+@.write+', '+@.rank+', '+@.hitcount
> EXEC @.HResult =sp_OAMethod @.RecordSet, 'MoveNext'
> select @.count=@.Count+1
> END
> print @.count
> EXEC @.HResult = sp_OADestroy @.fields
> IF @.HResult <> 0
> BEGIN
> EXEC sp_OAGetErrorInfo @.fields
> RETURN
> END
> END
> EXEC @.HResult = sp_OADestroy @.recordset
> IF @.HResult <> 0
> BEGIN
> EXEC sp_OAGetErrorInfo @.recordset
> RETURN
> END
> EXEC @.HResult = sp_OADestroy @.objIxsso
> IF @.HResult <> 0
> BEGIN
> EXEC sp_OAGetErrorInfo @.objIxsso
> RETURN
> END
>
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
> "Barry Forrest" <barry.forrest@.no-spam.ps.net> wrote in message
> news:8A815D4C-DED1-486F-9E20-ADDFF4A892A4@.microsoft.com...
> can
> invalid
> the
> special I
> remotely?
> catalog
> again
> where
> Filename,
> on
> 'CARENETWEB'.
> ICommandPrepare::Prepare
> access.
> access
> account.
> account.
> box,
>
>
|||Hi Barry,
Could you please elaborate on how you got the openquery to work, and the
SQL user account credentials used.
I am currently struggling with the same problem you specified. However I
am already using SQL server authentication instead of windows
authentication.
I am stumped.
Many thanks in advance.
Cheers,
Luca
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
|||Using the Management console on the Sql box I created a catalog with the same
name as the remote catalog that I wished to query.
Using Query analyzer connected to the Sql server I executed a sp_addlinked
server:
EXEC sp_addlinkedserver FileSystem,
'Index Server',
'MSIDXS',
'CatalogName'
In the Sql Management console, under Security --> Linked Servers
-->Properties, I set the Security tab option to "Be made using this security
context:" and assigned a domain account that is a member of the local
Administrators group on the remote server where the queried catalog resides.
Then constructed a query like this:
SELECT DocTitle, vpath, Filename, Size, Contents, characterization, PATH,
URL, A_Href, rank, write
FROM RemoteServer.CatalogName..SCOPE(''" + this.Scope + "'')
Where FREETEXT(Contents,''" SearchPhrase"'')
Which I was able to then execute while connected with a sql account that was
a db_owner.
Hope that Helps,
Barry
"Luca Gnezda" wrote:

> Hi Barry,
> Could you please elaborate on how you got the openquery to work, and the
> SQL user account credentials used.
> I am currently struggling with the same problem you specified. However I
> am already using SQL server authentication instead of windows
> authentication.
> I am stumped.
> Many thanks in advance.
> Cheers,
> Luca
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
>
|||Thanks very much Barry.
My environment reflects your setup, unfortunately it doesn't work.
However I have found that the excact same setup, using a pair of 2003
Servers instead of the 2000 servers works perfectly.
I suspect that I have incorrect versions of service packs, or some other
install/patch conflicting with the 2000 server setup.
I will continue playing with versions to find the root cause. Once again
thank you very much for your feedback.
Regards,
Luca
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!

OLE DB provider MSDAORA was unable to begin a distributed transaction

Dear all,

I have been attempting to set up a linked server in SQL Server 2000 to point to an Oracle database (a very old Oracle database, v7!).

The linked server set up works fine. Then I created a database on the same SQL Server. Within that database I created a view which reads information from a view in the Oracle database (linked server). When I attempted to create this view in Enterprise Manager, I get the following error:

"The operation could not be performed because the OLE DB provider 'MSDAORA' was unable to begin a distributed transaction."

And so I created the view in Query Analyzer. This worked perfectly, no errors, and I can now go into Enterprise Manager and call up the view, which happily goes off to the view in the Oracle linked server and pulls back the info. BUT, when I attempt to do the same thing through an application on a different machine (using OLE Db, and a UDL to connect) the same error as above appears.

Does anyone know what this error means, and where I went wrong? Any help greatly appreciated. My view onto the linked server looks like this:

"CREATE VIEW dbo.NLPG_VIEW
AS
SELECT * from openquery(sadaslink, 'select * from NLPG_VIEW')"

Many thanks in advance for your wisdom!

P.S I wondered whether I need to check if the distributed transaction co-ordinator is running but don't know how.
Thanks,http://www.aspfaq.com/2455 fyi.|||Thanks, I've already had aread through this. I did create the view in query analyzer but the problem now is that I can't get it to work from a remote application. I think I need to look into the distributed transaction co-ordinator, but I don't know how or where. How do I see if it is running? How do I get it running?|||On the SQL Server, start the SQL Services Manager. Change the Service to Distributed Transaction Coordinator. Play to your heart's content!

FYI, with Oracle 7.3 I needed to use SET REMOTE_PROC_TRANSACTIONS (http://msdn.microsoft.com/library/en-us/tsqlref/ts_set-set_206r.asp) to make things happy.

-PatP|||Would SET_REMOTE_PROC_TRANSACTIONS have to be coded into the app, as I can't put it in the SQL in the view can I?|||http://www.microsoft.com/technet/prodtechnol/sql/2000/books/c08ppcsq.mspx a guide to the solution.
Also check whether compatible Oracle driver is being used to connect, try with latest drivers.|||When you said remote procedure transactions, is that the same as setting remote procedure call in the GUI in enterprise manager? RPC and RPC OUT?

Thanks,
Paula|||No Polly, the concepts are related, but definitely not the same.

The problem is that SQL Server uses many flavors of locks in order to acheive true data consistancy... Some locks prohibit writing, some prohibit any access at all, and some do things that are difficult to describe in English, but make the engine behave as well as possible.

I haven't tried this in a long time, and no longer have an Oracle 7.x server to even test with, but I think you could get by with:SET REMOTE_PROC_TRANSACTIONS OFF
GO
CREATE VIEW dbo.NLPG_VIEW
AS
SELECT * from openquery(sadaslink, 'select * from NLPG_VIEW')All I can suggest that you do is to try it... I don't see how the attempt could hurt anything.

-PatP|||Thanks very much, I'll try it. Can't test it until next week, but Il'l let you know the results.

Wednesday, March 7, 2012

OLE DB Provider for ODBC and Oracle

Hi,

I created a linked server for MS SQL Server 2005 Express to an Oracle
database using the OLE DB Provider for ODBC. My ODBC Source uses the
Microsoft ODBC for Oracle driver.
I'm using the OLE DB Provider for ODBC instead of the Oracle OLE DB
providers because those don't handle Oracle's Numeric Data Type well.
When I set this up yesterday it worked fine. However I log in today and
attempt to run sp_tables_exec against my linked server and get the
following

OLE DB provider "MSDASQL" for linked server "WHATEVER" returned message
"[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed".
OLE DB provider "MSDASQL" for linked server "WHATEVER" returned message
"[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed".
OLE DB provider "MSDASQL" for linked server "WHATEVER" returned message
"[Microsoft][ODBC driver for Oracle][Oracle]".
Msg 7303, Level 16, State 1, Procedure sp_tables_ex, Line 41
Cannot initialize the data source object of OLE DB provider "MSDASQL"
for linked server "WHATEVER".

I can tnsping the server, and I have no trouble connecting with the
Oracle OLE DB provider

I try to set up ODBC logging but the log file is blank -- same with
attempting to set up logging for Oracle's network client. I've been
dealing with crap like this the last 4 days, something works one day,
then the next nothing (I've done nothing to change the configuration
between these outages).

Can anyone help me?

Thanks
FrustratedReplied to duplicate post of 22/12 !

"Crazy Cat" <danbredy@.hotmail.com> wrote in message
news:1135178623.892320.137120@.o13g2000cwo.googlegr oups.com...
> Hi,
> I created a linked server for MS SQL Server 2005 Express to an Oracle
> database using the OLE DB Provider for ODBC. My ODBC Source uses the
> Microsoft ODBC for Oracle driver.
> I'm using the OLE DB Provider for ODBC instead of the Oracle OLE DB
> providers because those don't handle Oracle's Numeric Data Type well.
> When I set this up yesterday it worked fine. However I log in today and
> attempt to run sp_tables_exec against my linked server and get the
> following
> OLE DB provider "MSDASQL" for linked server "WHATEVER" returned message
> "[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed".
> OLE DB provider "MSDASQL" for linked server "WHATEVER" returned message
> "[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed".
> OLE DB provider "MSDASQL" for linked server "WHATEVER" returned message
> "[Microsoft][ODBC driver for Oracle][Oracle]".
> Msg 7303, Level 16, State 1, Procedure sp_tables_ex, Line 41
> Cannot initialize the data source object of OLE DB provider "MSDASQL"
> for linked server "WHATEVER".
> I can tnsping the server, and I have no trouble connecting with the
> Oracle OLE DB provider
> I try to set up ODBC logging but the log file is blank -- same with
> attempting to set up logging for Oracle's network client. I've been
> dealing with crap like this the last 4 days, something works one day,
> then the next nothing (I've done nothing to change the configuration
> between these outages).
> Can anyone help me?
> Thanks
> Frustrated

OLE DB provider "MSOLAP" linked svr "Errors in the back-end database data provide

Is it that I have a syntax error in the nested OPENQUERY or is there another issue? Do I need to specify a different provider in the Server Link such as OLEDB? Non-nested OPENQUERYs work fine.

I'm generally following theTips and Tricks article.

"Executing predictions from the SQL Server relational engine". One problem is the sample doesn't actually complete the example query after the second nested OPENQUERY call.

e.g.

SELECT * FROM OPENQUERY(DMServer,

'select … FROM Modell PREDICTION JOIN OPENQUERY…')

The SQL Server server link's provider is configured to allow adhoc access. I appears that the inner OPENQUERY cannot be prepared by Analysis Server or the Server link provider? but I need to return a key value t.[CardTransactionID] for joining to SQL Server data elements.

OLE DB provider "MSOLAP" for linked server "DMServer" returned message "Errors in the back-end database access module. The data provider does not support preparing queries.".

Msg 7321, Level 16, State 2, Line 2 An error occurred while preparing the query

SELECT * FROM OPENQUERY(DMServer,

'SELECT

t.[CardTransactionID],

t.[PostingDate],

[Misuse Abuse Profile].[Even Dollar Purchase],

PredictProbability([Misuse Abuse Profile].[Even Dollar Purchase]) AS Score,

PredictSupport([Misuse Abuse Profile].[Even Dollar Purchase]) AS Suppt,

t.[BillingAmount]

FROM

[Misuse Abuse Profile]

PREDICTION JOIN

OPENQUERY([Athena Dev],

''SELECT

[CardTransactionID],

[PostingDate],

[BillingAmount],

[AccountNumber],

[SupplierStateProvinceCode],

[MerchantCategoryCode],

[PurchaseIDFormat],

[TransactionTime],

[TaxAmountIncludedCode],

[Tax2AmountIncludedCode],

[OrderTypeCode],

[MemoPostFlag],

[EvenDollarPurchase]

FROM

[dbo].[vMisuseAbuseProfile]

'') AS t

ON

[Misuse Abuse Profile].[Account Number] = t.[AccountNumber] AND

[Misuse Abuse Profile].[Supplier State Province Code] = t.[SupplierStateProvinceCode] AND

[Misuse Abuse Profile].[Merchant Category Code] = t.[MerchantCategoryCode] AND

[Misuse Abuse Profile].[Purchase ID Format] = t.[PurchaseIDFormat] AND

[Misuse Abuse Profile].[Transaction Time] = t.[TransactionTime] AND

[Misuse Abuse Profile].[Tax Amount Included Code] = t.[TaxAmountIncludedCode] AND

[Misuse Abuse Profile].[Tax2 Amount Included Code] = t.[Tax2AmountIncludedCode] AND

[Misuse Abuse Profile].[Order Type Code] = t.[OrderTypeCode] AND

[Misuse Abuse Profile].[Memo Post Flag] = t.[MemoPostFlag] AND

[Misuse Abuse Profile].[Even Dollar Purchase] = t.[EvenDollarPurchase]

')

In desparation I tried returning the case key (CardTransactionID) and the predictive column elements but I get an error when I try that. I assume this is a no-no?

OLE DB provider "MSOLAP" for linked server "DMServer" returned message "Error (Data mining): Only a predictable column (or a column that is related to a predictable column) can be referenced from the mining model in the context at line 2, column 15.".

It appears the default Analysis Services Data Source wizard selection of SQL Native Client Data Source provider cannot prepare an OPENQUERY if passed from a linked server? I changed the Datasource to Provider=SQLOLEDB.1 and the query now works.

|||this is very odd - we will look into it - thanks for reporting.|||

Hi Bill,

Could you give more details about the setup. Is the SQL server where you defined the linked server DMTest on the same machine with the Analysis Server it refers too? And also is the SQL server refered on the inner openquery datasource [Athena Dev] on a different machine than the machines with AS and SQL server with added linked server?

Thanks,

Dana Cristofor

OLE DB provider "MSOLAP" linked svr "Errors in the back-end database data provide

Is it that I have a syntax error in the nested OPENQUERY or is there another issue? Do I need to specify a different provider in the Server Link such as OLEDB? Non-nested OPENQUERYs work fine.

I'm generally following theTips and Tricks article.

"Executing predictions from the SQL Server relational engine". One problem is the sample doesn't actually complete the example query after the second nested OPENQUERY call.

e.g.

SELECT * FROM OPENQUERY(DMServer,

'select … FROM Modell PREDICTION JOIN OPENQUERY…')

The SQL Server server link's provider is configured to allow adhoc access. I appears that the inner OPENQUERY cannot be prepared by Analysis Server or the Server link provider? but I need to return a key value t.[CardTransactionID] for joining to SQL Server data elements.

OLE DB provider "MSOLAP" for linked server "DMServer" returned message "Errors in the back-end database access module. The data provider does not support preparing queries.".

Msg 7321, Level 16, State 2, Line 2 An error occurred while preparing the query

SELECT * FROM OPENQUERY(DMServer,

'SELECT

t.[CardTransactionID],

t.[PostingDate],

[Misuse Abuse Profile].[Even Dollar Purchase],

PredictProbability([Misuse Abuse Profile].[Even Dollar Purchase]) AS Score,

PredictSupport([Misuse Abuse Profile].[Even Dollar Purchase]) AS Suppt,

t.[BillingAmount]

FROM

[Misuse Abuse Profile]

PREDICTION JOIN

OPENQUERY([Athena Dev],

''SELECT

[CardTransactionID],

[PostingDate],

[BillingAmount],

[AccountNumber],

[SupplierStateProvinceCode],

[MerchantCategoryCode],

[PurchaseIDFormat],

[TransactionTime],

[TaxAmountIncludedCode],

[Tax2AmountIncludedCode],

[OrderTypeCode],

[MemoPostFlag],

[EvenDollarPurchase]

FROM

[dbo].[vMisuseAbuseProfile]

'') AS t

ON

[Misuse Abuse Profile].[Account Number] = t.[AccountNumber] AND

[Misuse Abuse Profile].[Supplier State Province Code] = t.[SupplierStateProvinceCode] AND

[Misuse Abuse Profile].[Merchant Category Code] = t.[MerchantCategoryCode] AND

[Misuse Abuse Profile].[Purchase ID Format] = t.[PurchaseIDFormat] AND

[Misuse Abuse Profile].[Transaction Time] = t.[TransactionTime] AND

[Misuse Abuse Profile].[Tax Amount Included Code] = t.[TaxAmountIncludedCode] AND

[Misuse Abuse Profile].[Tax2 Amount Included Code] = t.[Tax2AmountIncludedCode] AND

[Misuse Abuse Profile].[Order Type Code] = t.[OrderTypeCode] AND

[Misuse Abuse Profile].[Memo Post Flag] = t.[MemoPostFlag] AND

[Misuse Abuse Profile].[Even Dollar Purchase] = t.[EvenDollarPurchase]

')

In desparation I tried returning the case key (CardTransactionID) and the predictive column elements but I get an error when I try that. I assume this is a no-no?

OLE DB provider "MSOLAP" for linked server "DMServer" returned message "Error (Data mining): Only a predictable column (or a column that is related to a predictable column) can be referenced from the mining model in the context at line 2, column 15.".

It appears the default Analysis Services Data Source wizard selection of SQL Native Client Data Source provider cannot prepare an OPENQUERY if passed from a linked server? I changed the Datasource to Provider=SQLOLEDB.1 and the query now works.

|||this is very odd - we will look into it - thanks for reporting.|||

Hi Bill,

Could you give more details about the setup. Is the SQL server where you defined the linked server DMTest on the same machine with the Analysis Server it refers too? And also is the SQL server refered on the inner openquery datasource [Athena Dev] on a different machine than the machines with AS and SQL server with added linked server?

Thanks,

Dana Cristofor

OLE DB provider "MSDAORA" for linked server "DBNAME" returned message "

Hi All,

I have a strange problem with one of my Linked server connections. I am connecting from

SQL Server 2005 Standard Edition (9.00.3042.00) to and Oracle 10g database using the Microsoft OLE DB Provider for Oracle. The connection works and I am able to select from all the Oracle tables except for 1 table. When selecting from this table I get the following error:

OLE DB provider "MSDAORA" for linked server "DBNAME" returned message "ORA-01476: divisor is equal to zero".

Msg 7330, Level 16, State 2, Line 1

Cannot fetch a row from OLE DB provider "MSDAORA" for linked server "DBNAME".

This probem happens if the table has rows or has no rows (empty table).

I have tried SELECT * and count(*) along with selecting a specific column from the table.

I can use SQL*plus from the system that the SQL database server running on it and select from the table using the same login/password that the linked server uses to rule out a permissions problem.

Any suggestions on what I can try next?

Thanks.

Did you try using Oracle's own oledb provider? MSDAORA is a legacy provider and not officially supported for Oracle 10g.|||

Yes I had tried that. Found the solution that worked for me:

Provider: used the Oracle Provider

Product name: Oracle

Data source: The database name in TNSNames.ora

And here is the important part. Under the Provider Options for the Oracle provider enable (check) the "Allow inprocess" provider option.

Regards,

Scott

OLE DB provider "MSDAORA" for linked server "DBNAME" returned message "

Hi All,

I have a strange problem with one of my Linked server connections. I am connecting from

SQL Server 2005 Standard Edition (9.00.3042.00) to and Oracle 10g database using the Microsoft OLE DB Provider for Oracle. The connection works and I am able to select from all the Oracle tables except for 1 table. When selecting from this table I get the following error:

OLE DB provider "MSDAORA" for linked server "DBNAME" returned message "ORA-01476: divisor is equal to zero".

Msg 7330, Level 16, State 2, Line 1

Cannot fetch a row from OLE DB provider "MSDAORA" for linked server "DBNAME".

This probem happens if the table has rows or has no rows (empty table).

I have tried SELECT * and count(*) along with selecting a specific column from the table.

I can use SQL*plus from the system that the SQL database server running on it and select from the table using the same login/password that the linked server uses to rule out a permissions problem.

Any suggestions on what I can try next?

Thanks.

Did you try using Oracle's own oledb provider? MSDAORA is a legacy provider and not officially supported for Oracle 10g.|||

Yes I had tried that. Found the solution that worked for me:

Provider: used the Oracle Provider

Product name: Oracle

Data source: The database name in TNSNames.ora

And here is the important part. Under the Provider Options for the Oracle provider enable (check) the "Allow inprocess" provider option.

Regards,

Scott