Showing posts with label issuing. Show all posts
Showing posts with label issuing. Show all posts

Friday, March 23, 2012

Error when issuing OPENQUERY

I'm running on a Windows 2003 server SQL Server 2000. I'm getting the
following error when trying to execute an OPENQUERY statement. I have
about 5 linked servers, and they all worked in the past. Now one of
them is giving me trouble when issuing the OPENQUERY statement with
the following error:
Server: Msg 7391, Level 16, State 1, Line 1
The operation could not be performed because the OLE DB provider
'SQLOLEDB' was unable to begin a distributed transaction.
[OLE/DB provider returned message: New transaction cannot enlist in
the specified transaction coordinator. ]
OLE DB error trace [OLE/DB Provider 'SQLOLEDB'
ITransactionJoin::JoinTransaction returned 0x8004d00a].
I've tried all the Microsoft Workaround solutions:
http://support.microsoft.com/kb/873160 (even if it doesn't apply 100%)
http://support.microsoft.com/default.aspx?scid=kb;en-us;329332
http://support.microsoft.com/default.aspx?scid=kb;en-us;816701
http://support.microsoft.com/?kbid=816701
The linked server has not changed according to the administrator.
There is no firewall under either side of the severs (internal private
network). After enabling DTC under the remote server, I've noticed
that the queries take longer, but they continue returning the same
error as indicated above.
The servers have been configured with 'No authentication on DTC' so I
can't imagine what the problem could be, I've also checked the routing
(IP routes) between the two servers and I can't see any flaw, all
traffic is internal. I say this because the servers host dual cards
(internal and external networks) - but the external network is not
being enabled. Bidirectional traceroutes show the same path.
I've Googled the error messages and they all point to the same thing,
but it appears not to work. I have other SQL servers under the same
internal networks and I can run the OPENQUERY on them.
Can anyone help me out here?
Hi
The last two links you posted are the same!
Have you tried DTCping? http://support.microsoft.com/kb/306843
John
"InvestorTrade" wrote:

> I'm running on a Windows 2003 server SQL Server 2000. I'm getting the
> following error when trying to execute an OPENQUERY statement. I have
> about 5 linked servers, and they all worked in the past. Now one of
> them is giving me trouble when issuing the OPENQUERY statement with
> the following error:
> Server: Msg 7391, Level 16, State 1, Line 1
> The operation could not be performed because the OLE DB provider
> 'SQLOLEDB' was unable to begin a distributed transaction.
> [OLE/DB provider returned message: New transaction cannot enlist in
> the specified transaction coordinator. ]
> OLE DB error trace [OLE/DB Provider 'SQLOLEDB'
> ITransactionJoin::JoinTransaction returned 0x8004d00a].
>
> I've tried all the Microsoft Workaround solutions:
> http://support.microsoft.com/kb/873160 (even if it doesn't apply 100%)
> http://support.microsoft.com/default.aspx?scid=kb;en-us;329332
> http://support.microsoft.com/default.aspx?scid=kb;en-us;816701
> http://support.microsoft.com/?kbid=816701
> The linked server has not changed according to the administrator.
> There is no firewall under either side of the severs (internal private
> network). After enabling DTC under the remote server, I've noticed
> that the queries take longer, but they continue returning the same
> error as indicated above.
> The servers have been configured with 'No authentication on DTC' so I
> can't imagine what the problem could be, I've also checked the routing
> (IP routes) between the two servers and I can't see any flaw, all
> traffic is internal. I say this because the servers host dual cards
> (internal and external networks) - but the external network is not
> being enabled. Bidirectional traceroutes show the same path.
> I've Googled the error messages and they all point to the same thing,
> but it appears not to work. I have other SQL servers under the same
> internal networks and I can run the OPENQUERY on them.
> Can anyone help me out here?
>
>
|||On Jan 7, 12:33Xpm, John Bell <jbellnewspo...@.hotmail.com> wrote:
> Hi
> The last two links you posted are the same!
> Have you tried DTCping?http://support.microsoft.com/kb/306843
> John
>
> "InvestorTrade" wrote:
>
>
>
>
> - Show quoted text -
Thank you!!! DTCPing helped to spot the problem - Bottom line - the
RPC Locator was shutdown under the remote server - the moment I
enabled it, it worked like a charm.

Error when issuing OPENQUERY

I'm running on a Windows 2003 server SQL Server 2000. I'm getting the
following error when trying to execute an OPENQUERY statement. I have
about 5 linked servers, and they all worked in the past. Now one of
them is giving me trouble when issuing the OPENQUERY statement with
the following error:
Server: Msg 7391, Level 16, State 1, Line 1
The operation could not be performed because the OLE DB provider
'SQLOLEDB' was unable to begin a distributed transaction.
[OLE/DB provider returned message: New transaction cannot enlist in
the specified transaction coordinator. ]
OLE DB error trace [OLE/DB Provider 'SQLOLEDB'
ITransactionJoin::JoinTransaction returned 0x8004d00a].
I've tried all the Microsoft Workaround solutions:
http://support.microsoft.com/kb/873160 (even if it doesn't apply 100%)
http://support.microsoft.com/default.aspx?scid=kb;en-us;329332
http://support.microsoft.com/default.aspx?scid=kb;en-us;816701
http://support.microsoft.com/?kbid=816701
The linked server has not changed according to the administrator.
There is no firewall under either side of the severs (internal private
network). After enabling DTC under the remote server, I've noticed
that the queries take longer, but they continue returning the same
error as indicated above.
The servers have been configured with 'No authentication on DTC' so I
can't imagine what the problem could be, I've also checked the routing
(IP routes) between the two servers and I can't see any flaw, all
traffic is internal. I say this because the servers host dual cards
(internal and external networks) - but the external network is not
being enabled. Bidirectional traceroutes show the same path.
I've Googled the error messages and they all point to the same thing,
but it appears not to work. I have other SQL servers under the same
internal networks and I can run the OPENQUERY on them.
Can anyone help me out here?Hi
The last two links you posted are the same!
Have you tried DTCping? http://support.microsoft.com/kb/306843
John
"InvestorTrade" wrote:
> I'm running on a Windows 2003 server SQL Server 2000. I'm getting the
> following error when trying to execute an OPENQUERY statement. I have
> about 5 linked servers, and they all worked in the past. Now one of
> them is giving me trouble when issuing the OPENQUERY statement with
> the following error:
> Server: Msg 7391, Level 16, State 1, Line 1
> The operation could not be performed because the OLE DB provider
> 'SQLOLEDB' was unable to begin a distributed transaction.
> [OLE/DB provider returned message: New transaction cannot enlist in
> the specified transaction coordinator. ]
> OLE DB error trace [OLE/DB Provider 'SQLOLEDB'
> ITransactionJoin::JoinTransaction returned 0x8004d00a].
>
> I've tried all the Microsoft Workaround solutions:
> http://support.microsoft.com/kb/873160 (even if it doesn't apply 100%)
> http://support.microsoft.com/default.aspx?scid=kb;en-us;329332
> http://support.microsoft.com/default.aspx?scid=kb;en-us;816701
> http://support.microsoft.com/?kbid=816701
> The linked server has not changed according to the administrator.
> There is no firewall under either side of the severs (internal private
> network). After enabling DTC under the remote server, I've noticed
> that the queries take longer, but they continue returning the same
> error as indicated above.
> The servers have been configured with 'No authentication on DTC' so I
> can't imagine what the problem could be, I've also checked the routing
> (IP routes) between the two servers and I can't see any flaw, all
> traffic is internal. I say this because the servers host dual cards
> (internal and external networks) - but the external network is not
> being enabled. Bidirectional traceroutes show the same path.
> I've Googled the error messages and they all point to the same thing,
> but it appears not to work. I have other SQL servers under the same
> internal networks and I can run the OPENQUERY on them.
> Can anyone help me out here?
>
>|||On Jan 7, 12:33=A0pm, John Bell <jbellnewspo...@.hotmail.com> wrote:
> Hi
> The last two links you posted are the same!
> Have you tried DTCping?http://support.microsoft.com/kb/306843
> John
>
> "InvestorTrade" wrote:
> > I'm running on a Windows 2003 server SQL Server 2000. =A0I'm getting the=
> > following error when trying to execute an OPENQUERY statement. =A0I have=
> > about 5 linked servers, and they all worked in the past. =A0Now one of
> > them is giving me trouble when issuing the OPENQUERY statement with
> > the following error:
> > Server: Msg 7391, Level 16, State 1, Line 1
> > The operation could not be performed because the OLE DB provider
> > 'SQLOLEDB' was unable to begin a distributed transaction.
> > [OLE/DB provider returned message: New transaction cannot enlist in
> > the specified transaction coordinator. ]
> > OLE DB error trace [OLE/DB Provider 'SQLOLEDB'
> > ITransactionJoin::JoinTransaction returned 0x8004d00a].
> > I've tried all the Microsoft Workaround solutions:
> >http://support.microsoft.com/kb/873160(even if it doesn't apply 100%)
> >http://support.microsoft.com/default.aspx?scid=3Dkb;en-us;329332
> >http://support.microsoft.com/default.aspx?scid=3Dkb;en-us;816701
> >http://support.microsoft.com/?kbid=3D816701
> > The linked server has not changed according to the administrator.
> > There is no firewall under either side of the severs (internal private
> > network). =A0After enabling DTC under the remote server, I've noticed
> > that the queries take longer, but they continue returning the same
> > error as indicated above.
> > The servers have been configured with 'No authentication on DTC' so I
> > can't imagine what the problem could be, I've also checked the routing
> > (IP routes) between the two servers and I can't see any flaw, all
> > traffic is internal. =A0I say this because the servers host dual cards
> > (internal and external networks) - but the external network is not
> > being enabled. =A0Bidirectional traceroutes show the same path.
> > I've Googled the error messages and they all point to the same thing,
> > but it appears not to work. =A0I have other SQL servers under the same
> > internal networks and I can run the OPENQUERY on them.
> > Can anyone help me out here... Hide quoted text -
> - Show quoted text -
Thank you!!! DTCPing helped to spot the problem - Bottom line - the
RPC Locator was shutdown under the remote server - the moment I
enabled it, it worked like a charm.

Error when issuing BACKUP LOG mydb with truncate_only

Hi,

Following error appears in the SQL Server error log when I execute BACKUP Log db with truncate_only using a stored procedure. The stored proc I am using is as follows:

CREATE procedure spm_tranlog as

declare @.DBName as Varchar(120)

select @.DBName = DB_name()

dump transaction @.DBName with truncate_only

GO

There are data import processes running in the night, before starting the processes we are executing spm_tranlog procedure to clear the transaction logs. The following error appears in log after executing the spm_tranlog:

“BACKUP failed to complete the command exec spm_tranlog”

This always happens after weekly server maintenance tasks. The scheduled maintenance tasks I am running are:Index rebuild, truncate log and shrinking database. There were no other processes running during that time when the spm_tranlog prodecure fail.

The Database size is 40GB, Log size is 80MB.

The database is in the simple recovery model.The database is in the simple recovery model.

I am running SQL Server 2000 (SP4) on windows server 2003.

Please help me to resolve this issue.

Thanks,

Roshan.

Hello Roshan,

Try this instead:

create procedure spm_tranlog

as

declare @.DBName asvarchar(120), @.sql asvarchar(200)

select @.DBName =DB_name()

select @.sql ='backup log '+ @.DBName +' with truncate_only'

execute(@.sql)
go

Hope this helps.

Jarret

|||

Hi Jarret,

Thanks for your reply. I have changed the DUMP TRANSACTION to BACKUP LOG in my stored proc, but still shows same error message.

Usualy the dump transaction (or Backup Log) fails only when server is backing up databases or shrinking.

My problem is Backup Log satement fails even there are no database backups running. This is really strange.

Thanks,

Roshan.

|||

Can you run the backup log statement directly without getting an error?

backup log DB_Name with truncate_only

Jarret

|||

No. its not allowing me to run the backup log statement directly.

Roshan.

|||

Can you post the error message you are getting and the exact statement you are running?

Are you sure you have permissions to do this? You need to be a sysadmin on the server or in the db_owner role of the database.

Jarret

|||

Hi Jarret,

I am receiving following error in the SQL server log: "BACKUP failed to complete the command exec spm_tranlog"

and I am running following stored proc:

CREATE procedure spm_tranlog as

/* 29/03/2006 RXP: Modified to get the database name using system function
* DB_name(), to avoid hardcoding database name.
*
*/

declare @.DBName as Varchar(120)

select @.DBName = DB_name()
dump transaction @.DBName with truncate_only
GO

This was running perfecctly for a long time, suddenly start creating problems. The user running this proc has sysadmin rights.

Thanks,

Roshan.

|||

How are you running the stored procedure, just 'exec spm_tranlog' from a new query window?

Bypassing the stored procedure, can you try to run this:

declare @.DBName as Varchar(120)
select @.DBName = DB_name()
dump transaction @.DBName with truncate_only

And also...

declare @.DBName as Varchar(120)
select @.DBName = DB_name()
backup log @.DBName with truncate_only

If these still don't work, post the error message(s) you get from each.

Jarret

|||You cant truncate the Log with SIMPLE PLAN in a DB. Because it is doing by itself.

Error when issuing BACKUP LOG mydb with truncate_only

Hi,

Following error appears in the SQL Server error log when I execute BACKUP Log db with truncate_only using a stored procedure. The stored proc I am using is as follows:

CREATE procedure spm_tranlog as

declare @.DBName as Varchar(120)

select @.DBName = DB_name()

dump transaction @.DBName with truncate_only

GO

There are data import processes running in the night, before starting the processes we are executing spm_tranlog procedure to clear the transaction logs. The following error appears in log after executing the spm_tranlog:

“BACKUP failed to complete the command exec spm_tranlog”

This always happens after weekly server maintenance tasks. The scheduled maintenance tasks I am running are:Index rebuild, truncate log and shrinking database. There were no other processes running during that time when the spm_tranlog prodecure fail.

The Database size is 40GB, Log size is 80MB.

The database is in the simple recovery model.The database is in the simple recovery model.

I am running SQL Server 2000 (SP4) on windows server 2003.

Please help me to resolve this issue.

Thanks,

Roshan.

Hello Roshan,

Try this instead:

create procedure spm_tranlog

as

declare @.DBName asvarchar(120), @.sql asvarchar(200)

select @.DBName =DB_name()

select @.sql ='backup log '+ @.DBName +' with truncate_only'

execute(@.sql)
go

Hope this helps.

Jarret

|||

Hi Jarret,

Thanks for your reply. I have changed the DUMP TRANSACTION to BACKUP LOG in my stored proc, but still shows same error message.

Usualy the dump transaction (or Backup Log) fails only when server is backing up databases or shrinking.

My problem is Backup Log satement fails even there are no database backups running. This is really strange.

Thanks,

Roshan.

|||

Can you run the backup log statement directly without getting an error?

backup log DB_Name with truncate_only

Jarret

|||

No. its not allowing me to run the backup log statement directly.

Roshan.

|||

Can you post the error message you are getting and the exact statement you are running?

Are you sure you have permissions to do this? You need to be a sysadmin on the server or in the db_owner role of the database.

Jarret

|||

Hi Jarret,

I am receiving following error in the SQL server log: "BACKUP failed to complete the command exec spm_tranlog"

and I am running following stored proc:

CREATE procedure spm_tranlog as

/* 29/03/2006 RXP: Modified to get the database name using system function
* DB_name(), to avoid hardcoding database name.
*
*/

declare @.DBName as Varchar(120)

select @.DBName = DB_name()
dump transaction @.DBName with truncate_only
GO

This was running perfecctly for a long time, suddenly start creating problems. The user running this proc has sysadmin rights.

Thanks,

Roshan.

|||

How are you running the stored procedure, just 'exec spm_tranlog' from a new query window?

Bypassing the stored procedure, can you try to run this:

declare @.DBName as Varchar(120)
select @.DBName = DB_name()
dump transaction @.DBName with truncate_only

And also...

declare @.DBName as Varchar(120)
select @.DBName = DB_name()
backup log @.DBName with truncate_only

If these still don't work, post the error message(s) you get from each.

Jarret

|||You cant truncate the Log with SIMPLE PLAN in a DB. Because it is doing by itself.

Error when issuing BACKUP LOG mydb with truncate_only

Hi,

Following error appears in the SQL Server error log when I execute BACKUP Log db with truncate_only using a stored procedure. The stored proc I am using is as follows:

CREATE procedure spm_tranlog as

declare @.DBName as Varchar(120)

select @.DBName = DB_name()

dump transaction @.DBName with truncate_only

GO

There are data import processes running in the night, before starting the processes we are executing spm_tranlog procedure to clear the transaction logs. The following error appears in log after executing the spm_tranlog:

“BACKUP failed to complete the command exec spm_tranlog”

This always happens after weekly server maintenance tasks. The scheduled maintenance tasks I am running are:Index rebuild, truncate log and shrinking database. There were no other processes running during that time when the spm_tranlog prodecure fail.

The Database size is 40GB, Log size is 80MB.

The database is in the simple recovery model.The database is in the simple recovery model.

I am running SQL Server 2000 (SP4) on windows server 2003.

Please help me to resolve this issue.

Thanks,

Roshan.

Hello Roshan,

Try this instead:

create procedure spm_tranlog

as

declare @.DBName asvarchar(120), @.sql asvarchar(200)

select @.DBName =DB_name()

select @.sql ='backup log '+ @.DBName +' with truncate_only'

execute(@.sql)
go

Hope this helps.

Jarret

|||

Hi Jarret,

Thanks for your reply. I have changed the DUMP TRANSACTION to BACKUP LOG in my stored proc, but still shows same error message.

Usualy the dump transaction (or Backup Log) fails only when server is backing up databases or shrinking.

My problem is Backup Log satement fails even there are no database backups running. This is really strange.

Thanks,

Roshan.

|||

Can you run the backup log statement directly without getting an error?

backup log DB_Name with truncate_only

Jarret

|||

No. its not allowing me to run the backup log statement directly.

Roshan.

|||

Can you post the error message you are getting and the exact statement you are running?

Are you sure you have permissions to do this? You need to be a sysadmin on the server or in the db_owner role of the database.

Jarret

|||

Hi Jarret,

I am receiving following error in the SQL server log: "BACKUP failed to complete the command exec spm_tranlog"

and I am running following stored proc:

CREATE procedure spm_tranlog as

/* 29/03/2006 RXP: Modified to get the database name using system function
* DB_name(), to avoid hardcoding database name.
*
*/

declare @.DBName as Varchar(120)

select @.DBName = DB_name()
dump transaction @.DBName with truncate_only
GO

This was running perfecctly for a long time, suddenly start creating problems. The user running this proc has sysadmin rights.

Thanks,

Roshan.

|||

How are you running the stored procedure, just 'exec spm_tranlog' from a new query window?

Bypassing the stored procedure, can you try to run this:

declare @.DBName as Varchar(120)
select @.DBName = DB_name()
dump transaction @.DBName with truncate_only

And also...

declare @.DBName as Varchar(120)
select @.DBName = DB_name()
backup log @.DBName with truncate_only

If these still don't work, post the error message(s) you get from each.

Jarret

|||You cant truncate the Log with SIMPLE PLAN in a DB. Because it is doing by itself.sql

Error when issuing BACKUP LOG mydb with truncate_only

Hi,

Following error appears in the SQL Server error log when I execute BACKUP Log db with truncate_only using a stored procedure. The stored proc I am using is as follows:

CREATE procedure spm_tranlog as

declare @.DBName as Varchar(120)

select @.DBName = DB_name()

dump transaction @.DBName with truncate_only

GO

There are data import processes running in the night, before starting the processes we are executing spm_tranlog procedure to clear the transaction logs. The following error appears in log after executing the spm_tranlog:

“BACKUP failed to complete the command exec spm_tranlog”

This always happens after weekly server maintenance tasks. The scheduled maintenance tasks I am running are: Index rebuild, truncate log and shrinking database. There were no other processes running during that time when the spm_tranlog prodecure fail.

The Database size is 40GB, Log size is 80MB.

The database is in the simple recovery model.The database is in the simple recovery model.

I am running SQL Server 2000 (SP4) on windows server 2003.

Please help me to resolve this issue.

Thanks,

Roshan.

Hello Roshan,

Try this instead:

create procedure spm_tranlog

as

declare @.DBName as varchar(120), @.sql as varchar(200)

select @.DBName = DB_name()

select @.sql = 'backup log ' + @.DBName + ' with truncate_only'

execute (@.sql)
go

Hope this helps.

Jarret

|||

Hi Jarret,

Thanks for your reply. I have changed the DUMP TRANSACTION to BACKUP LOG in my stored proc, but still shows same error message.

Usualy the dump transaction (or Backup Log) fails only when server is backing up databases or shrinking.

My problem is Backup Log satement fails even there are no database backups running. This is really strange.

Thanks,

Roshan.

|||

Can you run the backup log statement directly without getting an error?

backup log DB_Name with truncate_only

Jarret

|||

No. its not allowing me to run the backup log statement directly.

Roshan.

|||

Can you post the error message you are getting and the exact statement you are running?

Are you sure you have permissions to do this? You need to be a sysadmin on the server or in the db_owner role of the database.

Jarret

|||

Hi Jarret,

I am receiving following error in the SQL server log: "BACKUP failed to complete the command exec spm_tranlog"

and I am running following stored proc:

CREATE procedure spm_tranlog as

/* 29/03/2006 RXP: Modified to get the database name using system function
* DB_name(), to avoid hardcoding database name.
*
*/

declare @.DBName as Varchar(120)

select @.DBName = DB_name()
dump transaction @.DBName with truncate_only
GO

This was running perfecctly for a long time, suddenly start creating problems. The user running this proc has sysadmin rights.

Thanks,

Roshan.

|||

How are you running the stored procedure, just 'exec spm_tranlog' from a new query window?

Bypassing the stored procedure, can you try to run this:

declare @.DBName as Varchar(120)
select @.DBName = DB_name()
dump transaction @.DBName with truncate_only

And also...

declare @.DBName as Varchar(120)
select @.DBName = DB_name()
backup log @.DBName with truncate_only

If these still don't work, post the error message(s) you get from each.

Jarret

|||You cant truncate the Log with SIMPLE PLAN in a DB. Because it is doing by itself.