Re: Creating local view on linked server database/table
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Tue, 14 Mar 2006 23:18:28 +0000 (UTC)
Taggart (Taggart@xxxxxxxxxxxxxxxxxxxxxxxxx) writes:
Writing raw SQL via the OPENQUERY command works with no problems.
However when trying to create a view using the OPENQUERY sql, I get the
error message:
"ODBC error:[Microsoft][ODBC SQL Server Driver][SQL Server] The operation
could not be performed becasue the OLE DB provider 'MSDAORA' was unable to
begin a distributed transaction."
So I try adding BEGIN DISTRIBUTED TRANSACTION statement (although it's
just a select statement in the SQL) and then I get the message that the
query designer does not support this clause.
Jump out the query designer and run from a query window:
BEGIN DISTRIBUTED TRANSACTION
go
CREATE VIEW ...
go
COMMIT TRANSACTION
CREATE VIEW must be in a batch of its own, so you cannot use the designer.
I don't promise that you will be successful to create the view in this
way, though.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- Prev by Date: Save OLEObject "value" from MS Access db as MS Word doc
- Next by Date: How to save multiple recordsets from SP as separate XML files (SQL
- Previous by thread: Save OLEObject "value" from MS Access db as MS Word doc
- Next by thread: How to save multiple recordsets from SP as separate XML files (SQL
- Index(es):
Relevant Pages
|