Showing posts with label execute. Show all posts
Showing posts with label execute. Show all posts

Thursday, March 22, 2012

do anyone have an idea?

Hi there,

I have number of tasks in my control flow most of them are execute sql task. I want to update one of the column in my table when anyone of the task in the control get fails?

Please let me know if anyone have an idea how to do this.

Thanks and Regards

I think 'event handlers' can do that for you. I dont have specific examples now; but this forum has a lot of info on that.|||

Hi Salas,

You are right.I have done it by using event handler.

Thanks a lot.

Monday, March 19, 2012

DMO and .sql

hi
I juzz wanted to know if i can execute an .sql script using SQL-DMO. The .sql file is generated using Generate SQL Scripts from the console mode of SQL Server.... if so.. how do i proceed .
thankxHave you looked at methods ExecuteWithResults and/or ExecuteImmediate in BOL. I've used these in the past, I had to open up the script file and read it into a variable. Then pass the variable to one of these 2 functions. If using any of these be careful with 'GO' within the script file. In the past it would error on this, I don't know about 2000.

Friday, February 24, 2012

distribution agent error

Hi all,
I got this error in my distribution agent today it was
The process could not execute '{call sp_MSget_subscription_guid(25)}'
Can anebody tell me what caused the error and also what does the procedure
sp_MSget_subscription_guid actually do.
How can i avoid such errors in future.
Thanks in advance
Jacx
Can you run sp_lock on the subscriber database? See how many locks there
are.
Also enable logging as per this article and post the results back here.
http://support.microsoft.com/kb/312292
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Jacx" <Jacx@.discussions.microsoft.com> wrote in message
news:CEC339D5-E3A9-4369-B5D7-1B60854357CB@.microsoft.com...
> Hi all,
> I got this error in my distribution agent today it was
> The process could not execute '{call sp_MSget_subscription_guid(25)}'
> Can anebody tell me what caused the error and also what does the procedure
> sp_MSget_subscription_guid actually do.
> How can i avoid such errors in future.
> Thanks in advance
> Jacx

Sunday, February 19, 2012

Distributed transactions

Hi everyone!
My problem: I′m Apttempting to execute a Insert statement on a table in my
server with a SP from another. Like this:
INSERT INTO TABLE EXEC [TheOtherServer].[DataBase].dbo.stored_procedure
and I get this error message:
Server: Msg 7391, Level 16, State 1, Line 9
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].
My cuestion is: How can I configure the other server to allow distributed
transactions? and, Is this a solution or am I wrong?
Thanks a lotHi
You may wish to check that MS DTC is configured and working correctly.
http://support.microsoft.com/defaul...kb;en-us;329332
This may also help
http://support.microsoft.com/defaul...kb;en-us;306212
John
"Huacuz" wrote:

> Hi everyone!
> My problem: I′m Apttempting to execute a Insert statement on a table in m
y
> server with a SP from another. Like this:
> INSERT INTO TABLE EXEC [TheOtherServer].[DataBase].dbo.stored_procedure
> and I get this error message:
> Server: Msg 7391, Level 16, State 1, Line 9
> 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].
> My cuestion is: How can I configure the other server to allow distributed
> transactions? and, Is this a solution or am I wrong?
> Thanks a lot

Friday, February 17, 2012

Distributed transaction trough ODBC from MSSQL to Oracle

I lost few days to solve a problem regarding the connection to an Oracle database server (10) with goal to execute a distributed transaction.

The environment was:

Windows Server 2003 Standard

MSSQL Server 2000 Standard

Oracle 10g Production Edition

The connection was quite easy to make with the Microsoft driver, but the error was:

Server: Msg 7391, Level 16, State 1, Line 3

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

OLE DB error trace [OLE/DB Provider 'MSDAORA' ITransactionJoin::JoinTransaction returned 0x8004d01b].

I tried to use the oracle odbc driver, but all kinds of errors were raised, regarding the TNS name and stuff like this. The real cause was that when you create the linked server you must to check the “Allow inbound process” in the provider options.

The Oracle ODBC driver allow distributed transactions.

Would you please clarify where exactly that ""Allow inbound process" option needs to be checked? I am setting up a linked server with a Provider name as "Microsoft OLE DB for Oracle" and clicking "Provider Options..." button brings up a dialog that does NOT have "Allow inbound process" as one of the options to check.

Distributed transaction trough ODBC from MSSQL to Oracle

I lost few days to solve a problem regarding the connection to an Oracle database server (10) with goal to execute a distributed transaction.

The environment was:

Windows Server 2003 Standard

MSSQL Server 2000 Standard

Oracle 10g Production Edition

The connection was quite easy to make with the Microsoft driver, but the error was:

Server: Msg 7391, Level 16, State 1, Line 3

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

OLE DB error trace [OLE/DB Provider 'MSDAORA' ITransactionJoin::JoinTransaction returned 0x8004d01b].

I tried to use the oracle odbc driver, but all kinds of errors were raised, regarding the TNS name and stuff like this. The real cause was that when you create the linked server you must to check the “Allow inbound process” in the provider options.

The Oracle ODBC driver allow distributed transactions.

Would you please clarify where exactly that ""Allow inbound process" option needs to be checked? I am setting up a linked server with a Provider name as "Microsoft OLE DB for Oracle" and clicking "Provider Options..." button brings up a dialog that does NOT have "Allow inbound process" as one of the options to check.

distributed transaction MSQL<->oracle

I'm trying to execute this:
create table #tt (nro_parte_erp varchar(50))
declare @.query as varchar(4000)
declare @.estado as char
set @.estado=3D'1'
set @.query =3D'
select
nro_parte_erp=3D nro_parte
from openquery(desarrollo_baan,''
select
nro_parte,
from BAAN.ORDENES_102 a,baan.set_of_cim_102 b where
a=2Eorden_fab_1=3Db.orden_fab and estado_orden=3D'+@.estado+''') a
order by orden_fab_1,operacion'
insert into #tt
exec (@.query)
where desarrollo_baan is a linked server to oracle
but i receive this error:
No se puede realizar la operaci=F3n. El proveedor OLE DB 'MSDAORA' no
pudo iniciar una transacci=F3n distribuida.
Traza de error de OLE DB [OLE/DB Provider 'MSDAORA'
ITransactionJoin::JoinTransaction returned 0x8000d048].
in english something like
The operation could not be performed because the OLE DB provider
'OraOLEDB.Oracle' was unable to begin a distributed transaction.
Error Trace of OLE DB [OLE/DB Provider 'MSDAORA'
ITransactionJoin::JoinTransaction returned 0x8000d048].
And i'm sure that MSDTC is running and i tried re-creating my server.
Some body can help me?
Can you run a simple select statement via link server?
"jreategui@.gmail.com" wrote:

> I'm trying to execute this:
> create table #tt (nro_parte_erp varchar(50))
> declare @.query as varchar(4000)
> declare @.estado as char
> set @.estado='1'
> set @.query ='
> select
> nro_parte_erp= nro_parte
> from openquery(desarrollo_baan,''
> select
> nro_parte,
> from BAAN.ORDENES_102 a,baan.set_of_cim_102 b where
> a.orden_fab_1=b.orden_fab and estado_orden='+@.estado+''') a
> order by orden_fab_1,operacion'
> insert into #tt
> exec (@.query)
>
> where desarrollo_baan is a linked server to oracle
> but i receive this error:
> No se puede realizar la operación. El proveedor OLE DB 'MSDAORA' no
> pudo iniciar una transacción distribuida.
> Traza de error de OLE DB [OLE/DB Provider 'MSDAORA'
> ITransactionJoin::JoinTransaction returned 0x8000d048].
> in english something like
> The operation could not be performed because the OLE DB provider
> 'OraOLEDB.Oracle' was unable to begin a distributed transaction.
> Error Trace of OLE DB [OLE/DB Provider 'MSDAORA'
> ITransactionJoin::JoinTransaction returned 0x8000d048].
>
> And i'm sure that MSDTC is running and i tried re-creating my server.
>
> Some body can help me?
>
|||Yes, i tested the same code without the insert statment and it's run.
I mean, this code run perfect:
create table #tt (nro_parte_erp varchar(50))
declare @.query as varchar(4000)
declare @.estado as char
set @.estado='1'
set @.query ='
select
nro_parte_erp= nro_parte
from openquery(desarrollo_baan,''
select
nro_parte,
from BAAN.ORDENES_102 a,baan.set_of_cim_102 b where
a.orden_fab_1=b.orden_fab and estado_orden='+@.estado+''') a
order by orden_fab_1,operacion'
/*insert into #tt */
exec (@.query)
|||Looks like your problem is not with the link Server, b/c it is letting you
execute the command. Is the output less than varchar(50)? I have noticed that
sometimes when you use different software the output from exec(@.SQL) will not
get into the temp table. Try insert into a temp table and see if that works?
"jreategui@.gmail.com" wrote:
insert statment and it's run.
> I mean, this code run perfect:
> Yes, i tested the same code without the
> create table #tt (nro_parte_erp varchar(50))
> declare @.query as varchar(4000)
> declare @.estado as char
> set @.estado='1'
> set @.query ='
> select
> nro_parte_erp= nro_parte
>
> from openquery(desarrollo_baan,''
> select
> nro_parte,
> from BAAN.ORDENES_102 a,baan.set_of_cim_102 b where
> a.orden_fab_1=b.orden_fab and estado_orden='+@.estado+''') a
>
> order by orden_fab_1,operacion'
>
> /*insert into #tt */
> exec (@.query)
>
|||That's correct, the problem is not the linked server, the query run
perfect. The really problem is making the insert in the temp table with
the data that return the query to the linked server.
I tried making some manuals insert to the temp table and that work, but
with the linked server don't

distributed transaction MSQL<->oracle

I'm trying to execute this:
create table #tt (nro_parte_erp varchar(50))
declare @.query as varchar(4000)
declare @.estado as char
set @.estado=3D'1'
set @.query =3D'
select
nro_parte_erp=3D nro_parte
from openquery(desarrollo_baan,''
select
nro_parte,
from BAAN.ORDENES_102 a,baan.set_of_cim_102 b where
a=2Eorden_fab_1=3Db.orden_fab and estado_orden=3D'+@.estado+''') a
order by orden_fab_1,operacion'
insert into #tt
exec (@.query)
where desarrollo_baan is a linked server to oracle
but i receive this error:
No se puede realizar la operaci=F3n. El proveedor OLE DB 'MSDAORA' no
pudo iniciar una transacci=F3n distribuida.
Traza de error de OLE DB [OLE/DB Provider 'MSDAORA'
ITransactionJoin::JoinTransaction returned 0x8000d048].
in english something like
The operation could not be performed because the OLE DB provider
'OraOLEDB.Oracle' was unable to begin a distributed transaction.
Error Trace of OLE DB [OLE/DB Provider 'MSDAORA'
ITransactionJoin::JoinTransaction returned 0x8000d048].
And i'm sure that MSDTC is running and i tried re-creating my server.
Some body can help me'Can you run a simple select statement via link server?
"jreategui@.gmail.com" wrote:

> I'm trying to execute this:
> create table #tt (nro_parte_erp varchar(50))
> declare @.query as varchar(4000)
> declare @.estado as char
> set @.estado='1'
> set @.query ='
> select
> nro_parte_erp= nro_parte
> from openquery(desarrollo_baan,''
> select
> nro_parte,
> from BAAN.ORDENES_102 a,baan.set_of_cim_102 b where
> a.orden_fab_1=b.orden_fab and estado_orden='+@.estado+''') a
> order by orden_fab_1,operacion'
> insert into #tt
> exec (@.query)
>
> where desarrollo_baan is a linked server to oracle
> but i receive this error:
> No se puede realizar la operación. El proveedor OLE DB 'MSDAORA' no
> pudo iniciar una transacción distribuida.
> Traza de error de OLE DB [OLE/DB Provider 'MSDAORA'
> ITransactionJoin::JoinTransaction returned 0x8000d048].
> in english something like
> The operation could not be performed because the OLE DB provider
> 'OraOLEDB.Oracle' was unable to begin a distributed transaction.
> Error Trace of OLE DB [OLE/DB Provider 'MSDAORA'
> ITransactionJoin::JoinTransaction returned 0x8000d048].
>
> And i'm sure that MSDTC is running and i tried re-creating my server.
>
> Some body can help me'
>|||Yes, i tested the same code without the insert statment and it's run.
I mean, this code run perfect:
create table #tt (nro_parte_erp varchar(50))
declare @.query as varchar(4000)
declare @.estado as char
set @.estado='1'
set @.query ='
select
nro_parte_erp= nro_parte
from openquery(desarrollo_baan,''
select
nro_parte,
from BAAN.ORDENES_102 a,baan.set_of_cim_102 b where
a.orden_fab_1=b.orden_fab and estado_orden='+@.estado+''') a
order by orden_fab_1,operacion'
/*insert into #tt */
exec (@.query)|||Looks like your problem is not with the link Server, b/c it is letting you
execute the command. Is the output less than varchar(50)? I have noticed tha
t
sometimes when you use different software the output from exec(@.SQL) will no
t
get into the temp table. Try insert into a temp table and see if that works?
"jreategui@.gmail.com" wrote:
insert statment and it's run.
> I mean, this code run perfect:
> Yes, i tested the same code without the
> create table #tt (nro_parte_erp varchar(50))
> declare @.query as varchar(4000)
> declare @.estado as char
> set @.estado='1'
> set @.query ='
> select
> nro_parte_erp= nro_parte
>
> from openquery(desarrollo_baan,''
> select
> nro_parte,
> from BAAN.ORDENES_102 a,baan.set_of_cim_102 b where
> a.orden_fab_1=b.orden_fab and estado_orden='+@.estado+''') a
>
> order by orden_fab_1,operacion'
>
> /*insert into #tt */
> exec (@.query)
>|||That's correct, the problem is not the linked server, the query run
perfect. The really problem is making the insert in the temp table with
the data that return the query to the linked server.
I tried making some manuals insert to the temp table and that work, but
with the linked server don't

distributed transaction MSQL<->oracle

I'm trying to execute this:
create table #tt (nro_parte_erp varchar(50))
declare @.query as varchar(4000)
declare @.estado as char
set @.estado=3D'1'
set @.query =3D'
select
nro_parte_erp=3D nro_parte
from openquery(desarrollo_baan,''
select
nro_parte,
from BAAN.ORDENES_102 a,baan.set_of_cim_102 b where
a=2Eorden_fab_1=3Db.orden_fab and estado_orden=3D'+@.estado+''') a
order by orden_fab_1,operacion'
insert into #tt
exec (@.query)
where desarrollo_baan is a linked server to oracle
but i receive this error:
No se puede realizar la operaci=F3n. El proveedor OLE DB 'MSDAORA' no
pudo iniciar una transacci=F3n distribuida.
Traza de error de OLE DB [OLE/DB Provider 'MSDAORA'
ITransactionJoin::JoinTransaction returned 0x8000d048].
in english something like
The operation could not be performed because the OLE DB provider
'OraOLEDB.Oracle' was unable to begin a distributed transaction.
Error Trace of OLE DB [OLE/DB Provider 'MSDAORA'
ITransactionJoin::JoinTransaction returned 0x8000d048].
And i'm sure that MSDTC is running and i tried re-creating my server.
Some body can help me'Can you run a simple select statement via link server?
"jreategui@.gmail.com" wrote:
> I'm trying to execute this:
> create table #tt (nro_parte_erp varchar(50))
> declare @.query as varchar(4000)
> declare @.estado as char
> set @.estado='1'
> set @.query ='
> select
> nro_parte_erp= nro_parte
> from openquery(desarrollo_baan,''
> select
> nro_parte,
> from BAAN.ORDENES_102 a,baan.set_of_cim_102 b where
> a.orden_fab_1=b.orden_fab and estado_orden='+@.estado+''') a
> order by orden_fab_1,operacion'
> insert into #tt
> exec (@.query)
>
> where desarrollo_baan is a linked server to oracle
> but i receive this error:
> No se puede realizar la operación. El proveedor OLE DB 'MSDAORA' no
> pudo iniciar una transacción distribuida.
> Traza de error de OLE DB [OLE/DB Provider 'MSDAORA'
> ITransactionJoin::JoinTransaction returned 0x8000d048].
> in english something like
> The operation could not be performed because the OLE DB provider
> 'OraOLEDB.Oracle' was unable to begin a distributed transaction.
> Error Trace of OLE DB [OLE/DB Provider 'MSDAORA'
> ITransactionJoin::JoinTransaction returned 0x8000d048].
>
> And i'm sure that MSDTC is running and i tried re-creating my server.
>
> Some body can help me'
>|||Yes, i tested the same code without the insert statment and it's run.
I mean, this code run perfect:
create table #tt (nro_parte_erp varchar(50))
declare @.query as varchar(4000)
declare @.estado as char
set @.estado='1'
set @.query ='
select
nro_parte_erp= nro_parte
from openquery(desarrollo_baan,''
select
nro_parte,
from BAAN.ORDENES_102 a,baan.set_of_cim_102 b where
a.orden_fab_1=b.orden_fab and estado_orden='+@.estado+''') a
order by orden_fab_1,operacion'
/*insert into #tt */
exec (@.query)|||Looks like your problem is not with the link Server, b/c it is letting you
execute the command. Is the output less than varchar(50)? I have noticed that
sometimes when you use different software the output from exec(@.SQL) will not
get into the temp table. Try insert into a temp table and see if that works?
"jreategui@.gmail.com" wrote:
insert statment and it's run.
> I mean, this code run perfect:
> Yes, i tested the same code without the
> create table #tt (nro_parte_erp varchar(50))
> declare @.query as varchar(4000)
> declare @.estado as char
> set @.estado='1'
> set @.query ='
> select
> nro_parte_erp= nro_parte
>
> from openquery(desarrollo_baan,''
> select
> nro_parte,
> from BAAN.ORDENES_102 a,baan.set_of_cim_102 b where
> a.orden_fab_1=b.orden_fab and estado_orden='+@.estado+''') a
>
> order by orden_fab_1,operacion'
>
> /*insert into #tt */
> exec (@.query)
>|||That's correct, the problem is not the linked server, the query run
perfect. The really problem is making the insert in the temp table with
the data that return the query to the linked server.
I tried making some manuals insert to the temp table and that work, but
with the linked server don't

Tuesday, February 14, 2012

Distributed Transaction completed error

Hello,

I am running a package that has an Execute SQL Task, a Data Flow Task, and then an Execute SQL Task.

My Data Flow Task in set to run in a transaction (ReadCommitted). The first Execute SQL Task and the Data Flow Task run successfully. When the last Execute SQL Task runs, I get the error message:
"[Execute SQL Task] Error: Executing the query "select start_time from TRD_JOB_HISTORY where job_history_id = ?" failed with the following error: "Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly."

If I set the last Execute SQL Task's TransactionOption to 'Required' (to have it run in a transaction), the package runs successfully. Unfortunately, I don't want that statement to run in a transaction. If I set the last Execute SQL Task's TransactionOption to 'NotSupported', I get the same error message.

Is there anything I can set to have it use "the NULL transaction" or ignore transactions completely?

Thanks in advance,
Jessica
This is strange, it sounds as tho it should work.

Have you tried encapsulating the first Execute SQL Task and the data-flow task in a Sequence container and running the transaction over that Sequence container.

Which container instigates the transaction?
What happens if you set TransactionOption=Supported on the second Execute SQL Task?

-Jamie

DISTRIBUTED REQUEST

Sometimes when i try yo execute a distributed request , I am getting this
error
Impossible de démarre une transaction sur le fournisseur OLE DB 'SQLOLEDB'.
[OLE/DB provider returned message: Impossible de créer une nouvelle
transaction en raison d'un dépassement de capacité.]
Trace de l'erreur OLE DB [OLE/DB Provider 'SQLOLEDB'
ITransactionLocal::StartTransaction returned 0x8004d01d: ISOLEVEL=4096].
can you help me .Do you use connection pooling? Sounds like your connection pool has ran
out of connections and your settings disallow the creation of another
connection.
You can check this out easily by checking the # of active connections
with Enterprise manager and compare it to the max pool size.
/Jo
benamerk wrote:

> Sometimes when i try yo execute a distributed request , I am getting this
> error
> Impossible de démarre une transaction sur le fournisseur OLE DB 'SQLOLEDB
'.
> [OLE/DB provider returned message: Impossible de créer une nouvelle
> transaction en raison d'un dépassement de capacité.]
> Trace de l'erreur OLE DB [OLE/DB Provider 'SQLOLEDB'
> ITransactionLocal::StartTransaction returned 0x8004d01d: ISOLEVEL=4096].
> can you help me .