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

Friday, March 30, 2012

Problems with TRIGGER

I still have problems with my TRIGGER (T-SQL) to update a table. I will read some information from INSERTD table and create a String to execute EXEC(@.sSQL), I’m creating a dynamic SQL because the name of then table I’ll update is in the INSERTED table, the problem I have is that : I read a date from the INSERTED table (31/08/2007 12:15:30) and write this date into then update table, but the date change to this : 31/08/2007 12:16:00 above is part of the trigger that do this :

SELECT @.TipoConta = Tipo, @.Inscricao = Inscricao, @.MesAno = Mes_Ref, @.DataPagam = Data_Quitacao, @.ValorPago = Valor_Pago, @.LiberMult = Libera_Multa FROM INSERTED

SET @.YearTable = Right(@.MesAno, 4)

SET @.MyTable = 'LEITURAS_VALORES_' + @.YearTable

set @.sSQL =

'UPDATE ' +

@.MyTable +

' SET ' +

'VALOR_PAGO = ' + str(@.ValorPago, 12, 2) +

', DATA_SITUACAO = ''' + Convert(char(10), @.DataPagam, 103) + ' ' + Convert(char(8), @.DataPagam, 114) + '''' +

', SITUACAO = '''+ @.Situacao + '''' +

', LIB_MULTA = ' + str(@.LiberMult, 2) +

' WHERE ' +

'INSCRICAO = ' + str(@.Inscricao, 8) +

'AND MES_ANO = ''' + @.AuxVar + ''''

exec (@.sSQL)

@.DataPagam is the date I’m reading from INSERTED

The problem is in the code : ', DATA_SITUACAO = ''' + Convert(char(10), @.DataPagam, 103) + ' ' + Convert(char(8), @.DataPagam, 114) + '''' +

Date format (dd/mm/yyyy hh:mmTongue Tieds) we use here in Brazil

Any one can help me,

Thanks, very much

Try something like this:

', DATA_SITUACAO = CAST(''' + Convert(char(10), @.DataPagam, 103) + ' ' + Convert(char(8), @.DataPagam, 114) + ''' AS DATETIME) '
|||

It could be that your installation is set to us_english which has a dateformat of MDY.


In your trigger, try setting SET DATEFORMAT DMY at the start.


HTH!

|||

I put ''' AS DATETIME) '

Error Source :

.NetSqlCliente Data Provider

Error Message :

Incorrect syntax near then keyword 'AS'

|||

I have already done it : SET DATEFORMAT DMY in my TRIGGER

Thanks

Problems with TRIGGER

I still have problems with my TRIGGER (T-SQL) to update a table. I will read some information from INSERTD table and create a String to execute EXEC(@.sSQL), I’m creating a dynamic SQL because the name of then table I’ll update is in the INSERTED table, the problem I have is that : I read a date from the INSERTED table (31/08/2007 12:15:30) and write this date into then update table, but the date change to this : 31/08/2007 12:16:00 above is part of the trigger that do this :

SELECT @.TipoConta = Tipo, @.Inscricao = Inscricao, @.MesAno = Mes_Ref, @.DataPagam = Data_Quitacao, @.ValorPago = Valor_Pago, @.LiberMult = Libera_Multa FROM INSERTED

SET @.YearTable = Right(@.MesAno, 4)

SET @.MyTable = 'LEITURAS_VALORES_' + @.YearTable

set @.sSQL =

'UPDATE ' +

@.MyTable +

' SET ' +

'VALOR_PAGO = ' + str(@.ValorPago, 12, 2) +

', DATA_SITUACAO = ''' + Convert(char(10), @.DataPagam, 103) + ' ' + Convert(char(8), @.DataPagam, 114) + '''' +

', SITUACAO = '''+ @.Situacao + '''' +

', LIB_MULTA = ' + str(@.LiberMult, 2) +

' WHERE ' +

'INSCRICAO = ' + str(@.Inscricao, 8) +

'AND MES_ANO = ''' + @.AuxVar + ''''

exec (@.sSQL)

@.DataPagam is the date I’m reading from INSERTED

The problem is in the code : ', DATA_SITUACAO = ''' + Convert(char(10), @.DataPagam, 103) + ' ' + Convert(char(8), @.DataPagam, 114) + '''' +

Date format (dd/mm/yyyy hh:mmTongue Tieds) we use here in Brazil

Any one can help me,

Thanks, very much

Try something like this:

', DATA_SITUACAO = CAST(''' + Convert(char(10), @.DataPagam, 103) + ' ' + Convert(char(8), @.DataPagam, 114) + ''' AS DATETIME) '
|||

It could be that your installation is set to us_english which has a dateformat of MDY.


In your trigger, try setting SET DATEFORMAT DMY at the start.


HTH!

|||

I put ''' AS DATETIME) '

Error Source :

.NetSqlCliente Data Provider

Error Message :

Incorrect syntax near then keyword 'AS'

|||

I have already done it : SET DATEFORMAT DMY in my TRIGGER

Thanks

Problems with tempdb log.

Hi, I am trying to execute a process on a server that is running sql
server 2000 sp3. When i try to execute the process displays this error:
Error: 9002, Severity: 17, State: 6
The log file for database 'tempdb' is full. Back up the transaction log
for the database to free up some log space.
I check the tempdb log and is ok, i create a secundary file on another
disk and it still display the error. I drop and recreate the second file
and the error continues.
The process i executed by a cognos software.
The server has enought free space.
Do you know what could be the reason of this error.
Thanks a lot for your help.
*** Sent via Developersdex http://www.codecomments.com ***Can you check for open transactions?
dbcc opentran
go
AMB
"MariaGuzman" wrote:

> Hi, I am trying to execute a process on a server that is running sql
> server 2000 sp3. When i try to execute the process displays this error:
> Error: 9002, Severity: 17, State: 6
> The log file for database 'tempdb' is full. Back up the transaction log
> for the database to free up some log space.
> I check the tempdb log and is ok, i create a secundary file on another
> disk and it still display the error. I drop and recreate the second file
> and the error continues.
> The process i executed by a cognos software.
> The server has enought free space.
> Do you know what could be the reason of this error.
> Thanks a lot for your help.
>
>
>
> *** Sent via Developersdex http://www.codecomments.com ***
>|||Better to read this.
Why is tempdb full, and how can I prevent this from happening?
http://www.aspfaq.com/show.asp?id=2446
AMB
P.S. Thanks god I do not have to pay to Aaron every time I post a link from
his oustanding web site.
"Alejandro Mesa" wrote:
[vbcol=seagreen]
> Can you check for open transactions?
> dbcc opentran
> go
>
> AMB
> "MariaGuzman" wrote:
>sql

Problems with tempdb log.

Hi, I am trying to execute a process on a server that is running sql
server 2000 sp3. When i try to execute the process displays this error:
Error: 9002, Severity: 17, State: 6
The log file for database 'tempdb' is full. Back up the transaction log
for the database to free up some log space.
I check the tempdb log and is ok, i create a secundary file on another
disk and it still display the error. I drop and recreate the second file
and the error continues.
The process i executed by a cognos software.
The server has enought free space.
Do you know what could be the reason of this error.
Thanks a lot for your help.
*** Sent via Developersdex http://www.developersdex.com ***Can you check for open transactions?
dbcc opentran
go
AMB
"MariaGuzman" wrote:
> Hi, I am trying to execute a process on a server that is running sql
> server 2000 sp3. When i try to execute the process displays this error:
> Error: 9002, Severity: 17, State: 6
> The log file for database 'tempdb' is full. Back up the transaction log
> for the database to free up some log space.
> I check the tempdb log and is ok, i create a secundary file on another
> disk and it still display the error. I drop and recreate the second file
> and the error continues.
> The process i executed by a cognos software.
> The server has enought free space.
> Do you know what could be the reason of this error.
> Thanks a lot for your help.
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
>|||Better to read this.
Why is tempdb full, and how can I prevent this from happening?
http://www.aspfaq.com/show.asp?id=2446
AMB
P.S. Thanks god I do not have to pay to Aaron every time I post a link from
his oustanding web site.
"Alejandro Mesa" wrote:
> Can you check for open transactions?
> dbcc opentran
> go
>
> AMB
> "MariaGuzman" wrote:
> > Hi, I am trying to execute a process on a server that is running sql
> > server 2000 sp3. When i try to execute the process displays this error:
> >
> > Error: 9002, Severity: 17, State: 6
> > The log file for database 'tempdb' is full. Back up the transaction log
> > for the database to free up some log space.
> >
> > I check the tempdb log and is ok, i create a secundary file on another
> > disk and it still display the error. I drop and recreate the second file
> > and the error continues.
> >
> > The process i executed by a cognos software.
> >
> > The server has enought free space.
> >
> > Do you know what could be the reason of this error.
> >
> > Thanks a lot for your help.
> >
> >
> >
> >
> >
> >
> > *** Sent via Developersdex http://www.developersdex.com ***
> >

Problems with tempdb log.

Hi, I am trying to execute a process on a server that is running sql
server 2000 sp3. When i try to execute the process displays this error:
Error: 9002, Severity: 17, State: 6
The log file for database 'tempdb' is full. Back up the transaction log
for the database to free up some log space.
I check the tempdb log and is ok, i create a secundary file on another
disk and it still display the error. I drop and recreate the second file
and the error continues.
The process i executed by a cognos software.
The server has enought free space.
Do you know what could be the reason of this error.
Thanks a lot for your help.
*** Sent via Developersdex http://www.codecomments.com ***
Can you check for open transactions?
dbcc opentran
go
AMB
"MariaGuzman" wrote:

> Hi, I am trying to execute a process on a server that is running sql
> server 2000 sp3. When i try to execute the process displays this error:
> Error: 9002, Severity: 17, State: 6
> The log file for database 'tempdb' is full. Back up the transaction log
> for the database to free up some log space.
> I check the tempdb log and is ok, i create a secundary file on another
> disk and it still display the error. I drop and recreate the second file
> and the error continues.
> The process i executed by a cognos software.
> The server has enought free space.
> Do you know what could be the reason of this error.
> Thanks a lot for your help.
>
>
>
> *** Sent via Developersdex http://www.codecomments.com ***
>
|||Better to read this.
Why is tempdb full, and how can I prevent this from happening?
http://www.aspfaq.com/show.asp?id=2446
AMB
P.S. Thanks god I do not have to pay to Aaron every time I post a link from
his oustanding web site.
"Alejandro Mesa" wrote:
[vbcol=seagreen]
> Can you check for open transactions?
> dbcc opentran
> go
>
> AMB
> "MariaGuzman" wrote:

Monday, March 12, 2012

Problems with insert trigger

HI,

I have this trigger which execute an sp for emailing.
This should happen when a user add a new record, now what happens is that when a user insert a new record it sends an email with the record before.

example.
I added record 100, i get an email with record 99.

the trigger is this
CREATE TRIGGER KRS_email_insert ON dbo.KRS_KRFID
after INSERT
AS

SET NOCOUNT ON

DECLARE @.From varchar(100)
DECLARE @.To varchar(100)
DECLARE @.Subject varchar(100)
DECLARE @.Body varchar(4000)

SELECT @.From = 'Klachtenregistratiesysteem',
@.To = i.email,
@.Subject ='nieuwe melding onder volgnummer '+ cast(i.volgnummer as varchar),
@.Body = '<style type="text/css">
<!--
.style1 {color: #FF0000}
body {
background-color: #FFFFFF;
}
-->
</style>
<p>
<table width="*" border="0">
<tr>
<td colspan="2">Geachte '+M.NAAM+',<br>U heeft een klachtregistratieformulier ingevuld bij het Klachtenregistratiesysteem, uw klacht is in het systeem opgeslagen onder volgnummer: <span class="style1">'+ cast(i.volgnummer as varchar)+'<br><br><br></span>
klik <a href="http://links.10026.com/?link=http://web01/Support/KRS_KRFID/ShowKRS_KRFIDRecord2.aspx?KRS_KRFID='+ cast(i.volgnummer as varchar)+'">hier</a> voor meer details<br><br></td>
</tr>
<tr>
<td width="*" bgcolor="#CCCCCC"><div align="right">Onderwerp:</div></td>
<td width="*" bgcolor="#FFFFCC"><div align="left">'+i.onderwerp +'</div></td>
</tr>
<tr>
<td width="*" bgcolor="#CCCCCC"><div align="right">Probleemomschrijving:</div></td>
<td width="*" bgcolor="#FFFFCC"><div align="left">'+i.probleemomschrijving +'</div></td>
</tr>
<tr>
<td width="*" bgcolor="#CCCCCC"><div align="right">Melddatum:</div></td>
<td width="*" bgcolor="#FFFFCC"><div align="left">'+cast(i.melddatum as varchar) +'</div></td>
</tr>
<tr>
<td width="*" bgcolor="#CCCCCC"><div align="right">Evaluatiedatum:</div></td>
<td width="*" bgcolor="#FFFFCC"><div align="left">'+cast(i.evaluatiedatum as varchar) +'</div></td>
</tr>
<tr>
<td width="*" bgcolor="#CCCCCC"><div align="right"></div></td>
<td width="*" bgcolor="#FFFFCC"><div align="left"></div></td>
</tr>
<tr>
<td colspan="2"><div align="right"><br><br><br></div> <div align="left">LET OP: Deze e-mail is verzonden door een automatische mailbox, vragen die u naar deze mailbox stuurt worden niet beantwoord. <br>
Voor vragen of opmerkingen kunt u terecht bij het Editor, telefoon: -1793 of via email: <a href="http://links.10026.com/?link=mailto:Test@.test.com?subject=Vragen en/of info over CompanyKlachtenregistratiesysteem">Test@.test.com</a>. </div></td>
</tr>
</table>
<p> </p>'
FROM KRS_KRFID i, MAN_MEDEWERKERS m
WHERE MELDDATUM < GETDATE()and m.uid = i.melder
EXEC sp_send_cdosysmail @.From, @.To, @.Subject, @.Body

SET NOCOUNT OFF



Can someone tell me what is wrong here!!
Cheers WimI guess you should use 'inserted' virtual table to see which record was inserted into the table and base your mail on that. Check 'inserted', 'deleted' virtual tables in SQL Server documentation on triggers. mojza|||Hi Mojza,

I tried that but i doesn't send anything.
Have to find a workaround!

problems with import using DTS

OK this is a strange one.

I'm using the DTS to import a csv file into a table sql server. The test works fine but when I go to execute I get an error saying theirs a conversion problem with one of the fields in the csv file and the db field. The first one was a column called price which in the csv file takes the format $3.99 etc, the corresponding field type in the db is 'Money'.

So to make it happy I just removed the association between them and tried it again. This time I got another conversion error on a Field called 'Weight' ie 1.3, the corresponding field in the db is of type Decimal.?@.#$$#%

Why won't DTS accept these conversions they look correct to me.

Please help.I think you should use the Microsoft Text Driver instead of OLEDB to import CVS, and sometimes SQL Server have problem taking money from CVS or other sources try Numeric for money and integer for Decimals. Hope this helps.

Kind regards,
Gift Peddie

Friday, March 9, 2012

Problems with executing ssis package by job

Hi All,
I have created ssis package and am trying to execute it using sql
server agent job.
The problem is, that the job failes to find or load the package. It
tries to run it from the server side and failes to find it. I don't
really understand how can I publish the package on the server from the
client side.
Thanks in advance.Qwert wrote:
> Hi All,
> I have created ssis package and am trying to execute it using sql
> server agent job.
> The problem is, that the job failes to find or load the package. It
> tries to run it from the server side and failes to find it. I don't
> really understand how can I publish the package on the server from the
> client side.
> Thanks in advance.
Hi
Have you saved your package in SQL Server ?
from file menu in Microsoft Visual Studio select Save copy of package
as and save your package in SQL Server.
or
Connect to intergation service in Management studio and import package.
Regards
Amish Shah
http://shahamishm.tripod.com
Regards
Amish Shah|||Qwert wrote:
> Hi All,
> I have created ssis package and am trying to execute it using sql
> server agent job.
> The problem is, that the job failes to find or load the package. It
> tries to run it from the server side and failes to find it. I don't
> really understand how can I publish the package on the server from the
> client side.
> Thanks in advance.
Hi
Have you saved your package in SQL Server ?
from file menu in Microsoft Visual Studio select Save copy of package
as and save your package in SQL Server.
or
Connect to intergation service in Management studio and import package.
Regards
Amish Shah
http://shahamishm.tripod.com
Regards
Amish Shah|||amish wrote:
> Hi
> Have you saved your package in SQL Server ?
> from file menu in Microsoft Visual Studio select Save copy of package
> as and save your package in SQL Server.
> or
> Connect to intergation service in Management studio and import package.
>
> Regards
> Amish Shah
> http://shahamishm.tripod.com
>
> Regards
> Amish Shah
Hi, thanks for replying,
Yes I tried both things, what I get is
Executed as user: CLUSTERNET\admin. The package could not be loaded.
The step failed.
Yours Qwert

Problems with DTS package. Access denied

Hi,

I made a DTS-package and it works when I execute it manually, but when it is
run by the SQL Server Agent, it fails.

I have use the guide to create a maintenance plan. That doesn't work so good
either. It runs Optimizations, but not integrity checks or backups (probably
because integrity checks failed).

The following from the log file:
Executed as user: HT-DOMAIN\INTRAB-SQL. ...:

DTSStep_DTSExecuteSQLTask_2 DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_2
DTSRun OnStart: DTSStep_DTSExecuteSQLTask_1 DTSRun OnFinish:
DTSStep_DTSExecuteSQLTask_1 DTSRun OnStart: DTSStep_DTSDataPumpTask_1
DTSRun OnStart: DTSStep_DTSDataPumpTask_3 DTSRun OnError:
DTSStep_DTSDataPumpTask_1,

Error = -2147024891 (80070005) Error string: Access is denied.
Error source: Microsoft Data Transformation Services (DTS) Package
Help file: sqldts80.hlp Help context: 1100 Error Detail Records:
Error: -2147024891 (80070005); Provider Error: 0 (0) Error string:
Access is denied. Error source: Microsoft Data Transformation
Services (DTS) Package Help file: sqldts80.hlp Help context:
1100 Error: -2147024891 (80070005); Provider Error: 0 (0)
Error string: Cannot open a log file of specified name. Access is denied.
Error source: Micr... Process Exit Code 1. The step failed.

Log-file endeth here....

My "data-sources"/Connections is set up to use sql-server
authentication where I enter superuser name+password, not windows
authentication.

If I browse around using SQL-EM:
Under Security - Logins HT-DOMAIN\intrab-sql:
Tab General: Grant Access
Tab Server Roles: System Administrators
Tab Database Access: checkmark at Mbestil, user=dbo; database roles
for mbestil = public + db_owner

I also have som problems identifying where the package fails. I have given
the individual "steps"/"transformations" some pretty good names, but in the
log-file it still shows the "old" names.

The DTS package empties a table, then fills it by copying data from another
table in another database on another server.

Anyone with some useful tips ?

/jimIn the services management you will find SQL Agent is
configured with a user account on the operating system.
What OS are you on?

This OS account needs the appropriate DB access that is
equivalent to yours when running interactively.

Once this is fixed, because SQL Agent handles the automated
tasks, your backups, reorganisations, maintenance plans,
DTS tasks and anything else you need to automate in
the environment should have no problems in running
unattended.

Hope this helps.

Pete Brown
Falls Creek
Oz

"Jim Andersen" <jimVK@.officeconsult.dk> wrote in message
news:btdvco$1ad$1@.sunsite.dk...
> Hi,
> I made a DTS-package and it works when I execute it manually, but when it
is
> run by the SQL Server Agent, it fails.
> I have use the guide to create a maintenance plan. That doesn't work so
good
> either. It runs Optimizations, but not integrity checks or backups
(probably
> because integrity checks failed).
> The following from the log file:

...[trim]...

> Log-file endeth here....
> My "data-sources"/Connections is set up to use sql-server
> authentication where I enter superuser name+password, not windows
> authentication.
> If I browse around using SQL-EM:
> Under Security - Logins HT-DOMAIN\intrab-sql:
> Tab General: Grant Access
> Tab Server Roles: System Administrators
> Tab Database Access: checkmark at Mbestil, user=dbo; database roles
> for mbestil = public + db_owner
> I also have som problems identifying where the package fails. I have given
> the individual "steps"/"transformations" some pretty good names, but in
the
> log-file it still shows the "old" names.
> The DTS package empties a table, then fills it by copying data from
another
> table in another database on another server.
> Anyone with some useful tips ?
> /jim|||mountain man wrote:
> In the services management you will find SQL Agent is
> configured with a user account on the operating system.

Found it.

> What OS are you on?

Will check (not at problem site right now)

> This OS account needs the appropriate DB access that is
> equivalent to yours when running interactively.

Why ? I can understand it, when it comes to the backup, etc. But I have
supplied the name and password in the Connection properties in the DTS
package. And I _think_ (will have to check) that it actually empties the
table (first step in the package).

> Once this is fixed, because SQL Agent handles the automated
> tasks, your backups, reorganisations, maintenance plans,
> DTS tasks and anything else you need to automate in
> the environment should have no problems in running
> unattended.

I sure hope it has some kind of domino-effect :-)

> Hope this helps.

Me too. Will get back.
thx
Jim

> "Jim Andersen" <jimVK@.officeconsult.dk> wrote in message
> news:btdvco$1ad$1@.sunsite.dk...
>> Hi,
>>
>> I made a DTS-package and it works when I execute it manually, but
>> when it is run by the SQL Server Agent, it fails.
>>
>> I have use the guide to create a maintenance plan. That doesn't work
>> so good either. It runs Optimizations, but not integrity checks or
>> backups (probably because integrity checks failed).
>>
>> The following from the log file:
> ...[trim]...
>> Log-file endeth here....
>>
>> My "data-sources"/Connections is set up to use sql-server
>> authentication where I enter superuser name+password, not windows
>> authentication.
>>
>> If I browse around using SQL-EM:
>> Under Security - Logins HT-DOMAIN\intrab-sql:
>> Tab General: Grant Access
>> Tab Server Roles: System Administrators
>> Tab Database Access: checkmark at Mbestil, user=dbo; database roles
>> for mbestil = public + db_owner
>>
>> I also have som problems identifying where the package fails. I have
>> given the individual "steps"/"transformations" some pretty good
>> names, but in the log-file it still shows the "old" names.
>>
>> The DTS package empties a table, then fills it by copying data from
>> another table in another database on another server.
>>
>> Anyone with some useful tips ?
>>
>> /jim|||"Jim Andersen" <jimVK@.officeconsult.dk> wrote in message
news:btgjk3$r7u$1@.sunsite.dk...
> mountain man wrote:

> > This OS account needs the appropriate DB access that is
> > equivalent to yours when running interactively.
> Why ? I can understand it, when it comes to the backup, etc.

I believe all tasks run via SQL Agent will try to use the SQL Agent
user account nominated in the services detail.

> But I have
> supplied the name and password in the Connection properties in the DTS
> package. And I _think_ (will have to check) that it actually empties the
> table (first step in the package).

Also check the name of the owner (you, admin?) of the automated package.
The SQL Agent account needs to have equivalent access on the database end.

> > Hope this helps.
> Me too. Will get back.

Good luck with it Jim. Sometimes it is a little fiddly getting SQL Agent
up and running for the first time. Also, there have been a multitude of
threads in here in the past concerning this very issue.

So if the MS doco is not conducive to the solution, try an advance google
through the mssql newsgroups only, for the term "SQL Agent". If all else
fails write back.

Pete Brown
Falls Creek
Oz|||mountain man wrote:
> "Jim Andersen" <jimVK@.officeconsult.dk> wrote in message
> news:btgjk3$r7u$1@.sunsite.dk...
>> mountain man wrote:
>>> This OS account needs the appropriate DB access that is
>>> equivalent to yours when running interactively.
>>
>> Why ? I can understand it, when it comes to the backup, etc.
> I believe all tasks run via SQL Agent will try to use the SQL Agent
> user account nominated in the services detail.
>> But I have
>> supplied the name and password in the Connection properties in the
>> DTS package. And I _think_ (will have to check) that it actually
>> empties the table (first step in the package).
> Also check the name of the owner (you, admin?) of the automated
> package. The SQL Agent account needs to have equivalent access on the
> database end.

User JIM is now system administrator equivalent on the server. I split the
package in 3 parts to avoid any misunderstandings about workflow. All
packages are owned by JIM

Pack1 copies data from a remote server table to local table X.
Pack2 massages data from local table X and copies it to another local table
Y.
Pack3 copies some other data from remote server to another local table.

And then 3 jobs in sql server agent, 1 minute apart (each task takes a
second or 2).
It is Pack2 that fails. "Error string: Cannot open a log file of specified
name. Access is denied."
What does that mean ?

All packages run fine when I execute them manually.

I would have expected it to be either pack1 or 3. But now I think I'm gonna
change pack3 so it reads AND massages data from the remote server table to
local table Y.

It just puzzles me...

/jim|||"Jim Andersen" <jimVK@.officeconsult.dk> wrote in message news:<bu5svi$s7t$1@.sunsite.dk>...
> mountain man wrote:
> > "Jim Andersen" <jimVK@.officeconsult.dk> wrote in message
> > news:btgjk3$r7u$1@.sunsite.dk...
> >> mountain man wrote:
> >>> This OS account needs the appropriate DB access that is
> >>> equivalent to yours when running interactively.
> >>
> >> Why ? I can understand it, when it comes to the backup, etc.
> > I believe all tasks run via SQL Agent will try to use the SQL Agent
> > user account nominated in the services detail.
> >> But I have
> >> supplied the name and password in the Connection properties in the
> >> DTS package. And I _think_ (will have to check) that it actually
> >> empties the table (first step in the package).
> > Also check the name of the owner (you, admin?) of the automated
> > package. The SQL Agent account needs to have equivalent access on the
> > database end.
> User JIM is now system administrator equivalent on the server. I split the
> package in 3 parts to avoid any misunderstandings about workflow. All
> packages are owned by JIM
> Pack1 copies data from a remote server table to local table X.
> Pack2 massages data from local table X and copies it to another local table
> Y.
> Pack3 copies some other data from remote server to another local table.
> And then 3 jobs in sql server agent, 1 minute apart (each task takes a
> second or 2).
> It is Pack2 that fails. "Error string: Cannot open a log file of specified
> name. Access is denied."
> What does that mean ?
> All packages run fine when I execute them manually.
> I would have expected it to be either pack1 or 3. But now I think I'm gonna
> change pack3 so it reads AND massages data from the remote server table to
> local table Y.
> It just puzzles me...
> /jim

You might find this KB article useful - it gives quite a lot of detail
on how scheduled DTS packages are executed, and which security
contexts are relevant:

http://support.microsoft.com/defaul...4&Product=sql2k

Simon

Problems with droping and creating tables

Hi
The case:
User execute a bat file that executes a sql script. This script drops a
number of tables, generate new tables and fills the new tables with data.
The problem:
The new tables that's created is created with the user executing the scripts
as owner, not dbo. Initially dbo was owner of the tables that where dropped.
The user is member of a a.d security group that is granted as a login on the
SQL server, and is dbo on the database in question.
If we run the script from a user that is member of the local admin group on
the server, SQL server sysadmin and dbo on the database, dbo is owner of the
new tables.
How can I resolve this issue? When the script is executed by the user I want
dbo to be owner of the table, specially since the user is member of a group
that is dbo on the specific database.
/A.What version of SQL Server?
If 2005, then specify the desired schema for the user in question.
If 2000, then make sure that your users specify the apropriate owner when they create the table, as
in:
CREATE TABLE dbo.myTable(...)
Also, just fyi (a remark about terminology):
> The user is member of a a.d security group that is granted as a login on the SQL server, and is
> dbo on the database in question.
Only one login can be the dbo. Other logins can have users who in the database have the db_owner
role, whcih gives the same permission as dbo has.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Andy.I" <Andy.I@.community.nospam> wrote in message
news:44DA00F1-BEA7-49CE-B7A5-E23D79077293@.microsoft.com...
> Hi
> The case:
> User execute a bat file that executes a sql script. This script drops a number of tables, generate
> new tables and fills the new tables with data.
> The problem:
> The new tables that's created is created with the user executing the scripts as owner, not dbo.
> Initially dbo was owner of the tables that where dropped.
> The user is member of a a.d security group that is granted as a login on the SQL server, and is
> dbo on the database in question.
> If we run the script from a user that is member of the local admin group on the server, SQL server
> sysadmin and dbo on the database, dbo is owner of the new tables.
> How can I resolve this issue? When the script is executed by the user I want dbo to be owner of
> the table, specially since the user is member of a group that is dbo on the specific database.
> /A.|||Thanks
I'll give it a try.
/A
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OMYDKMLEIHA.3548@.TK2MSFTNGP06.phx.gbl...
> What version of SQL Server?
> If 2005, then specify the desired schema for the user in question.
> If 2000, then make sure that your users specify the apropriate owner when
> they create the table, as in:
> CREATE TABLE dbo.myTable(...)
>
> Also, just fyi (a remark about terminology):
>> The user is member of a a.d security group that is granted as a login on
>> the SQL server, and is dbo on the database in question.
> Only one login can be the dbo. Other logins can have users who in the
> database have the db_owner role, whcih gives the same permission as dbo
> has.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Andy.I" <Andy.I@.community.nospam> wrote in message
> news:44DA00F1-BEA7-49CE-B7A5-E23D79077293@.microsoft.com...
>> Hi
>> The case:
>> User execute a bat file that executes a sql script. This script drops a
>> number of tables, generate new tables and fills the new tables with data.
>> The problem:
>> The new tables that's created is created with the user executing the
>> scripts as owner, not dbo. Initially dbo was owner of the tables that
>> where dropped.
>> The user is member of a a.d security group that is granted as a login on
>> the SQL server, and is dbo on the database in question.
>> If we run the script from a user that is member of the local admin group
>> on the server, SQL server sysadmin and dbo on the database, dbo is owner
>> of the new tables.
>> How can I resolve this issue? When the script is executed by the user I
>> want dbo to be owner of the table, specially since the user is member of
>> a group that is dbo on the specific database.
>> /A.
>

Wednesday, March 7, 2012

Problems with carating Stored Procedure from ADO

Hi
I try to create SP from ADO. Open connection and excecute queries.
con.Execute "SET QUOTED_IDENTIFIER OFF "
con.Execute "SET ansinull ON"
con.Execute TextProc
TextProc content
"
create procedure BISSGetDllName (
@.ID_MESS numeric(10) = 0,
@.SwiftOperType int = 0,
@.IsAction int=1
) as
Begin
declare
@.ret int,
@.MessageType int,
@.AccBalance1 int,
@.urgency varchar(1)
select
@.MessageType = MessageType
from BISSHead
where ID_MESS = @.ID_MESS
select @.urgency='s'
from BISSMess
where
ID_MESS=@.ID_MESS and
NumOfField='203B' and
convert(int,ContextOfField)=1
if @.MessageType= 202
begin
if exists(select 1 from BISSMess where ID_MESS=@.ID_MESS and
NumOfField ='58E')
select '_trbis202.dll','TrBIS2202'+@.urgency+'NR'
else
select '_trbis202.dll','TrBIS2202'+@.urgency
return 1
end
else if @.MessageType= 103
begin
declare @.IsTax int
exec @.ret=BISSIsTax @.ID_MESS, @.IsTax output
if @.ret<>1
return @.ret
if @.IsTax=1
begin
select '_trbistax.dll','TrBISTax'+@.urgency
return 1
end
/*select @.AccBalance1 = convert(int,substring(KorrAccount,1,4))
from BISSMessAddition
where ID_MESS = @.ID_MESS
*/
/*if exists(select 1
from ReportSetup
where
Code = 29 and
Amount1=0 and
AccBalance1<>@.AccBalance1
) */
begin
if exists(select 1 from BISSMess where ID_MESS=@.ID_MESS and
NumOfField ='57E')
select '_trbiss100.dll','TrBIS100'+@.urgency+'NR'
else
select '_trbiss100.dll','TrBIS100'+@.urgency
return 1
end
end
return -1221
end
"
ADO sad [SYBASE][OLE DB Sybase provider]Value has not been specified for
parameter 1.
May bee ADO find parametrs in Create query.. and want values for parametrs.
How could execute this query...
You need to bind to the return parameter.
Michael
"Dmitry" <Savtchin@.st.by> wrote in message
news:OhPrMFaxEHA.3976@.TK2MSFTNGP09.phx.gbl...
> Hi
> I try to create SP from ADO. Open connection and excecute queries.
> con.Execute "SET QUOTED_IDENTIFIER OFF "
> con.Execute "SET ansinull ON"
> con.Execute TextProc
> TextProc content
> "
> create procedure BISSGetDllName (
> @.ID_MESS numeric(10) = 0,
> @.SwiftOperType int = 0,
> @.IsAction int=1
> ) as
> Begin
> declare
> @.ret int,
> @.MessageType int,
> @.AccBalance1 int,
> @.urgency varchar(1)
> select
> @.MessageType = MessageType
> from BISSHead
> where ID_MESS = @.ID_MESS
> select @.urgency='s'
> from BISSMess
> where
> ID_MESS=@.ID_MESS and
> NumOfField='203B' and
> convert(int,ContextOfField)=1
> if @.MessageType= 202
> begin
> if exists(select 1 from BISSMess where ID_MESS=@.ID_MESS and
> NumOfField ='58E')
> select '_trbis202.dll','TrBIS2202'+@.urgency+'NR'
> else
> select '_trbis202.dll','TrBIS2202'+@.urgency
> return 1
> end
> else if @.MessageType= 103
> begin
> declare @.IsTax int
> exec @.ret=BISSIsTax @.ID_MESS, @.IsTax output
> if @.ret<>1
> return @.ret
> if @.IsTax=1
> begin
> select '_trbistax.dll','TrBISTax'+@.urgency
> return 1
> end
> /*select @.AccBalance1 = convert(int,substring(KorrAccount,1,4))
> from BISSMessAddition
> where ID_MESS = @.ID_MESS
> */
> /*if exists(select 1
> from ReportSetup
> where
> Code = 29 and
> Amount1=0 and
> AccBalance1<>@.AccBalance1
> ) */
> begin
> if exists(select 1 from BISSMess where ID_MESS=@.ID_MESS and
> NumOfField ='57E')
> select '_trbiss100.dll','TrBIS100'+@.urgency+'NR'
> else
> select '_trbiss100.dll','TrBIS100'+@.urgency
> return 1
> end
>
> end
> return -1221
> end
> "
> ADO sad [SYBASE][OLE DB Sybase provider]Value has not been specified for
> parameter 1.
> May bee ADO find parametrs in Create query.. and want values for
parametrs.
> How could execute this query...
>
>

Problems with carating Stored Procedure from ADO

Hi
I try to create SP from ADO. Open connection and excecute queries.
con.Execute "SET QUOTED_IDENTIFIER OFF "
con.Execute "SET ansinull ON"
con.Execute TextProc
TextProc content
"
create procedure BISSGetDllName (
@.ID_MESS numeric(10) = 0,
@.SwiftOperType int = 0,
@.IsAction int=1
) as
Begin
declare
@.ret int,
@.MessageType int,
@.AccBalance1 int,
@.urgency varchar(1)
select
@.MessageType = MessageType
from BISSHead
where ID_MESS = @.ID_MESS
select @.urgency='s'
from BISSMess
where
ID_MESS=@.ID_MESS and
NumOfField='203B' and
convert(int,ContextOfField)=1
if @.MessageType= 202
begin
if exists(select 1 from BISSMess where ID_MESS=@.ID_MESS and
NumOfField ='58E')
select '_trbis202.dll','TrBIS2202'+@.urgency+'NR'
else
select '_trbis202.dll','TrBIS2202'+@.urgency
return 1
end
else if @.MessageType= 103
begin
declare @.IsTax int
exec @.ret=BISSIsTax @.ID_MESS, @.IsTax output
if @.ret<>1
return @.ret
if @.IsTax=1
begin
select '_trbistax.dll','TrBISTax'+@.urgency
return 1
end
/*select @.AccBalance1 = convert(int,substring(KorrAccount,1,4))
from BISSMessAddition
where ID_MESS = @.ID_MESS
*/
/*if exists(select 1
from ReportSetup
where
Code = 29 and
Amount1=0 and
AccBalance1<>@.AccBalance1
) */
begin
if exists(select 1 from BISSMess where ID_MESS=@.ID_MESS and
NumOfField ='57E')
select '_trbiss100.dll','TrBIS100'+@.urgency+'NR'
else
select '_trbiss100.dll','TrBIS100'+@.urgency
return 1
end
end
return -1221
end
"
ADO sad [SYBASE][OLE DB Sybase provider]Value has not been specified
for
parameter 1.
May bee ADO find parametrs in Create query.. and want values for parametrs.
How could execute this query...You need to bind to the return parameter.
Michael
"Dmitry" <Savtchin@.st.by> wrote in message
news:OhPrMFaxEHA.3976@.TK2MSFTNGP09.phx.gbl...
> Hi
> I try to create SP from ADO. Open connection and excecute queries.
> con.Execute "SET QUOTED_IDENTIFIER OFF "
> con.Execute "SET ansinull ON"
> con.Execute TextProc
> TextProc content
> "
> create procedure BISSGetDllName (
> @.ID_MESS numeric(10) = 0,
> @.SwiftOperType int = 0,
> @.IsAction int=1
> ) as
> Begin
> declare
> @.ret int,
> @.MessageType int,
> @.AccBalance1 int,
> @.urgency varchar(1)
> select
> @.MessageType = MessageType
> from BISSHead
> where ID_MESS = @.ID_MESS
> select @.urgency='s'
> from BISSMess
> where
> ID_MESS=@.ID_MESS and
> NumOfField='203B' and
> convert(int,ContextOfField)=1
> if @.MessageType= 202
> begin
> if exists(select 1 from BISSMess where ID_MESS=@.ID_MESS and
> NumOfField ='58E')
> select '_trbis202.dll','TrBIS2202'+@.urgency+'NR'
> else
> select '_trbis202.dll','TrBIS2202'+@.urgency
> return 1
> end
> else if @.MessageType= 103
> begin
> declare @.IsTax int
> exec @.ret=BISSIsTax @.ID_MESS, @.IsTax output
> if @.ret<>1
> return @.ret
> if @.IsTax=1
> begin
> select '_trbistax.dll','TrBISTax'+@.urgency
> return 1
> end
> /*select @.AccBalance1 = convert(int,substring(KorrAccount,1,4))
> from BISSMessAddition
> where ID_MESS = @.ID_MESS
> */
> /*if exists(select 1
> from ReportSetup
> where
> Code = 29 and
> Amount1=0 and
> AccBalance1<>@.AccBalance1
> ) */
> begin
> if exists(select 1 from BISSMess where ID_MESS=@.ID_MESS and
> NumOfField ='57E')
> select '_trbiss100.dll','TrBIS100'+@.urgency+'NR'
> else
> select '_trbiss100.dll','TrBIS100'+@.urgency
> return 1
> end
>
> end
> return -1221
> end
> "
> ADO sad [SYBASE][OLE DB Sybase provider]Value has not been specifi
ed for
> parameter 1.
> May bee ADO find parametrs in Create query.. and want values for
parametrs.
> How could execute this query...
>
>

Problems with carating Stored Procedure from ADO

Hi
I try to create SP from ADO. Open connection and excecute queries.
con.Execute "SET QUOTED_IDENTIFIER OFF "
con.Execute "SET ansinull ON"
con.Execute TextProc
TextProc content
"
create procedure BISSGetDllName (
@.ID_MESS numeric(10) = 0,
@.SwiftOperType int = 0,
@.IsAction int=1
) as
Begin
/************************************************** ********
@.ID_MESS - message
@.SwiftOperType - operation
@.IsAction - action or rollback?
************************************************** *******/
declare
@.ret int,
@.MessageType int,
@.AccBalance1 int,
@.urgency varchar(1)
select
@.MessageType = MessageType
from BISSHead
where ID_MESS = @.ID_MESS
select @.urgency='s'
from BISSMess
where
ID_MESS=@.ID_MESS and
NumOfField='203B' and
convert(int,ContextOfField)=1
/*BIS aaieianeee */
if @.MessageType= 202
begin
if exists(select 1 from BISSMess where ID_MESS=@.ID_MESS and
NumOfField ='58E')
select '_trbis202.dll','TrBIS2202'+@.urgency+'NR'
else
select '_trbis202.dll','TrBIS2202'+@.urgency
return 1
end
else if @.MessageType= 103
begin
/*BIS iaeiae*/
declare @.IsTax int
exec @.ret=BISSIsTax @.ID_MESS, @.IsTax output
if @.ret<>1
return @.ret
if @.IsTax=1
begin
select '_trbistax.dll','TrBISTax'+@.urgency
return 1
end
/*select @.AccBalance1 = convert(int,substring(KorrAccount,1,4))
from BISSMessAddition
where ID_MESS = @.ID_MESS
*/
/*BIS eeeaioneee*/
/*if exists(select 1
from ReportSetup
where
Code = 29 and
Amount1=0 and
AccBalance1<>@.AccBalance1
) */
begin
if exists(select 1 from BISSMess where ID_MESS=@.ID_MESS and
NumOfField ='57E')
select '_trbiss100.dll','TrBIS100'+@.urgency+'NR'
else
select '_trbiss100.dll','TrBIS100'+@.urgency
return 1
end
end
return -1221
end
"
ADO sad [SYBASE][OLE DB Sybase provider]Value has not been specified for
parameter 1.
May bee ADO find parametrs in Create query.. and want values for parametrs.
How could execute this query...
Please don't multi-post. And stop using a Sybase provider if you're
connecting to SQL Server! http://www.aspfaq.com/2126
"Dmitry" <Savtchin@.st.by> wrote in message
news:u2irvPaxEHA.3096@.TK2MSFTNGP14.phx.gbl...
> Hi
> I try to create SP from ADO. Open connection and excecute queries.
> con.Execute "SET QUOTED_IDENTIFIER OFF "
> con.Execute "SET ansinull ON"
> con.Execute TextProc
> TextProc content
> "
> create procedure BISSGetDllName (
> @.ID_MESS numeric(10) = 0,
> @.SwiftOperType int = 0,
> @.IsAction int=1
> ) as
> Begin
> /************************************************** ********
> @.ID_MESS - message
> @.SwiftOperType - operation
> @.IsAction - action or rollback?
>
> ************************************************** *******/
> declare
> @.ret int,
> @.MessageType int,
> @.AccBalance1 int,
> @.urgency varchar(1)
> select
> @.MessageType = MessageType
> from BISSHead
> where ID_MESS = @.ID_MESS
> select @.urgency='s'
> from BISSMess
> where
> ID_MESS=@.ID_MESS and
> NumOfField='203B' and
> convert(int,ContextOfField)=1
> /*BIS aaieianeee */
> if @.MessageType= 202
> begin
> if exists(select 1 from BISSMess where ID_MESS=@.ID_MESS and
> NumOfField ='58E')
> select '_trbis202.dll','TrBIS2202'+@.urgency+'NR'
> else
> select '_trbis202.dll','TrBIS2202'+@.urgency
> return 1
> end
> else if @.MessageType= 103
> begin
> /*BIS iaeiae*/
> declare @.IsTax int
> exec @.ret=BISSIsTax @.ID_MESS, @.IsTax output
> if @.ret<>1
> return @.ret
> if @.IsTax=1
> begin
> select '_trbistax.dll','TrBISTax'+@.urgency
> return 1
> end
> /*select @.AccBalance1 = convert(int,substring(KorrAccount,1,4))
> from BISSMessAddition
> where ID_MESS = @.ID_MESS
> */
> /*BIS eeeaioneee*/
> /*if exists(select 1
> from ReportSetup
> where
> Code = 29 and
> Amount1=0 and
> AccBalance1<>@.AccBalance1
> ) */
> begin
> if exists(select 1 from BISSMess where ID_MESS=@.ID_MESS and
> NumOfField ='57E')
> select '_trbiss100.dll','TrBIS100'+@.urgency+'NR'
> else
> select '_trbiss100.dll','TrBIS100'+@.urgency
> return 1
> end
>
> end
> return -1221
> end
> "
> ADO sad [SYBASE][OLE DB Sybase provider]Value has not been specified for
> parameter 1.
> May bee ADO find parametrs in Create query.. and want values for
parametrs.
> How could execute this query...
>

Problems with carating Stored Procedure from ADO

Hi
I try to create SP from ADO. Open connection and excecute queries.
con.Execute "SET QUOTED_IDENTIFIER OFF "
con.Execute "SET ansinull ON"
con.Execute TextProc
TextProc content
"
create procedure BISSGetDllName (
@.ID_MESS numeric(10) = 0,
@.SwiftOperType int = 0,
@.IsAction int=1
) as
Begin
/ ****************************************
******************
@.ID_MESS - message
@.SwiftOperType - operation
@.IsAction - action or rollback?
****************************************
*****************/
declare
@.ret int,
@.MessageType int,
@.AccBalance1 int,
@.urgency varchar(1)
select
@.MessageType = MessageType
from BISSHead
where ID_MESS = @.ID_MESS
select @.urgency='s'
from BISSMess
where
ID_MESS=@.ID_MESS and
NumOfField='203B' and
convert(int,ContextOfField)=1
/*BIS aaieianeee */
if @.MessageType= 202
begin
if exists(select 1 from BISSMess where ID_MESS=@.ID_MESS and
NumOfField ='58E')
select '_trbis202.dll','TrBIS2202'+@.urgency+'NR'
else
select '_trbis202.dll','TrBIS2202'+@.urgency
return 1
end
else if @.MessageType= 103
begin
/*BIS iaeiae*/
declare @.IsTax int
exec @.ret=BISSIsTax @.ID_MESS, @.IsTax output
if @.ret<>1
return @.ret
if @.IsTax=1
begin
select '_trbistax.dll','TrBISTax'+@.urgency
return 1
end
/*select @.AccBalance1 = convert(int,substring(KorrAccount,1,4))
from BISSMessAddition
where ID_MESS = @.ID_MESS
*/
/*BIS eeeaioneee*/
/*if exists(select 1
from ReportSetup
where
Code = 29 and
Amount1=0 and
AccBalance1<>@.AccBalance1
) */
begin
if exists(select 1 from BISSMess where ID_MESS=@.ID_MESS and
NumOfField ='57E')
select '_trbiss100.dll','TrBIS100'+@.urgency+'NR'
else
select '_trbiss100.dll','TrBIS100'+@.urgency
return 1
end
end
return -1221
end
"
ADO sad [SYBASE][OLE DB Sybase provider]Value has not been specified
for
parameter 1.
May bee ADO find parametrs in Create query.. and want values for parametrs.
How could execute this query...Please don't multi-post. And stop using a Sybase provider if you're
connecting to SQL Server! http://www.aspfaq.com/2126
"Dmitry" <Savtchin@.st.by> wrote in message
news:u2irvPaxEHA.3096@.TK2MSFTNGP14.phx.gbl...
> Hi
> I try to create SP from ADO. Open connection and excecute queries.
> con.Execute "SET QUOTED_IDENTIFIER OFF "
> con.Execute "SET ansinull ON"
> con.Execute TextProc
> TextProc content
> "
> create procedure BISSGetDllName (
> @.ID_MESS numeric(10) = 0,
> @.SwiftOperType int = 0,
> @.IsAction int=1
> ) as
> Begin
> / ****************************************
******************
> @.ID_MESS - message
> @.SwiftOperType - operation
> @.IsAction - action or rollback?
>
> ****************************************
*****************/
> declare
> @.ret int,
> @.MessageType int,
> @.AccBalance1 int,
> @.urgency varchar(1)
> select
> @.MessageType = MessageType
> from BISSHead
> where ID_MESS = @.ID_MESS
> select @.urgency='s'
> from BISSMess
> where
> ID_MESS=@.ID_MESS and
> NumOfField='203B' and
> convert(int,ContextOfField)=1
> /*BIS aaieianeee */
> if @.MessageType= 202
> begin
> if exists(select 1 from BISSMess where ID_MESS=@.ID_MESS and
> NumOfField ='58E')
> select '_trbis202.dll','TrBIS2202'+@.urgency+'NR'
> else
> select '_trbis202.dll','TrBIS2202'+@.urgency
> return 1
> end
> else if @.MessageType= 103
> begin
> /*BIS iaeiae*/
> declare @.IsTax int
> exec @.ret=BISSIsTax @.ID_MESS, @.IsTax output
> if @.ret<>1
> return @.ret
> if @.IsTax=1
> begin
> select '_trbistax.dll','TrBISTax'+@.urgency
> return 1
> end
> /*select @.AccBalance1 = convert(int,substring(KorrAccount,1,4))
> from BISSMessAddition
> where ID_MESS = @.ID_MESS
> */
> /*BIS eeeaioneee*/
> /*if exists(select 1
> from ReportSetup
> where
> Code = 29 and
> Amount1=0 and
> AccBalance1<>@.AccBalance1
> ) */
> begin
> if exists(select 1 from BISSMess where ID_MESS=@.ID_MESS and
> NumOfField ='57E')
> select '_trbiss100.dll','TrBIS100'+@.urgency+'NR'
> else
> select '_trbiss100.dll','TrBIS100'+@.urgency
> return 1
> end
>
> end
> return -1221
> end
> "
> ADO sad [SYBASE][OLE DB Sybase provider]Value has not been specifi
ed for
> parameter 1.
> May bee ADO find parametrs in Create query.. and want values for
parametrs.
> How could execute this query...
>

Problems with carating Stored Procedure from ADO

Hi
I try to create SP from ADO. Open connection and excecute queries.
con.Execute "SET QUOTED_IDENTIFIER OFF "
con.Execute "SET ansinull ON"
con.Execute TextProc
TextProc content
"
create procedure BISSGetDllName (
@.ID_MESS numeric(10) = 0,
@.SwiftOperType int = 0,
@.IsAction int=1
) as
Begin
/**********************************************************
@.ID_MESS - message
@.SwiftOperType - operation
@.IsAction - action or rollback?
*********************************************************/
declare
@.ret int,
@.MessageType int,
@.AccBalance1 int,
@.urgency varchar(1)
select
@.MessageType = MessageType
from BISSHead
where ID_MESS = @.ID_MESS
select @.urgency='s'
from BISSMess
where
ID_MESS=@.ID_MESS and
NumOfField='203B' and
convert(int,ContextOfField)=1
/*BIS aaieianeee */
if @.MessageType= 202
begin
if exists(select 1 from BISSMess where ID_MESS=@.ID_MESS and
NumOfField ='58E')
select '_trbis202.dll','TrBIS2202'+@.urgency+'NR'
else
select '_trbis202.dll','TrBIS2202'+@.urgency
return 1
end
else if @.MessageType= 103
begin
/*BIS iaeiae*/
declare @.IsTax int
exec @.ret=BISSIsTax @.ID_MESS, @.IsTax output
if @.ret<>1
return @.ret
if @.IsTax=1
begin
select '_trbistax.dll','TrBISTax'+@.urgency
return 1
end
/*select @.AccBalance1 = convert(int,substring(KorrAccount,1,4))
from BISSMessAddition
where ID_MESS = @.ID_MESS
*/
/*BIS eeeaioneee*/
/*if exists(select 1
from ReportSetup
where
Code = 29 and
Amount1=0 and
AccBalance1<>@.AccBalance1
) */
begin
if exists(select 1 from BISSMess where ID_MESS=@.ID_MESS and
NumOfField ='57E')
select '_trbiss100.dll','TrBIS100'+@.urgency+'NR'
else
select '_trbiss100.dll','TrBIS100'+@.urgency
return 1
end
end
return -1221
end
"
ADO sad [SYBASE][OLE DB Sybase provider]Value has not been specified for
parameter 1.
May bee ADO find parametrs in Create query.. and want values for parametrs.
How could execute this query...Please don't multi-post. And stop using a Sybase provider if you're
connecting to SQL Server! http://www.aspfaq.com/2126
"Dmitry" <Savtchin@.st.by> wrote in message
news:u2irvPaxEHA.3096@.TK2MSFTNGP14.phx.gbl...
> Hi
> I try to create SP from ADO. Open connection and excecute queries.
> con.Execute "SET QUOTED_IDENTIFIER OFF "
> con.Execute "SET ansinull ON"
> con.Execute TextProc
> TextProc content
> "
> create procedure BISSGetDllName (
> @.ID_MESS numeric(10) = 0,
> @.SwiftOperType int = 0,
> @.IsAction int=1
> ) as
> Begin
> /**********************************************************
> @.ID_MESS - message
> @.SwiftOperType - operation
> @.IsAction - action or rollback?
>
> *********************************************************/
> declare
> @.ret int,
> @.MessageType int,
> @.AccBalance1 int,
> @.urgency varchar(1)
> select
> @.MessageType = MessageType
> from BISSHead
> where ID_MESS = @.ID_MESS
> select @.urgency='s'
> from BISSMess
> where
> ID_MESS=@.ID_MESS and
> NumOfField='203B' and
> convert(int,ContextOfField)=1
> /*BIS aaieianeee */
> if @.MessageType= 202
> begin
> if exists(select 1 from BISSMess where ID_MESS=@.ID_MESS and
> NumOfField ='58E')
> select '_trbis202.dll','TrBIS2202'+@.urgency+'NR'
> else
> select '_trbis202.dll','TrBIS2202'+@.urgency
> return 1
> end
> else if @.MessageType= 103
> begin
> /*BIS iaeiae*/
> declare @.IsTax int
> exec @.ret=BISSIsTax @.ID_MESS, @.IsTax output
> if @.ret<>1
> return @.ret
> if @.IsTax=1
> begin
> select '_trbistax.dll','TrBISTax'+@.urgency
> return 1
> end
> /*select @.AccBalance1 = convert(int,substring(KorrAccount,1,4))
> from BISSMessAddition
> where ID_MESS = @.ID_MESS
> */
> /*BIS eeeaioneee*/
> /*if exists(select 1
> from ReportSetup
> where
> Code = 29 and
> Amount1=0 and
> AccBalance1<>@.AccBalance1
> ) */
> begin
> if exists(select 1 from BISSMess where ID_MESS=@.ID_MESS and
> NumOfField ='57E')
> select '_trbiss100.dll','TrBIS100'+@.urgency+'NR'
> else
> select '_trbiss100.dll','TrBIS100'+@.urgency
> return 1
> end
>
> end
> return -1221
> end
> "
> ADO sad [SYBASE][OLE DB Sybase provider]Value has not been specified for
> parameter 1.
> May bee ADO find parametrs in Create query.. and want values for
parametrs.
> How could execute this query...
>

Monday, February 20, 2012

Problems Using Temporary Tables

I am declaring a temp table in control flow via Execute SQL task. I then want to use that table as a source in a data task, keep it alive going back to control flow and use it as a destination in another data task following. I am having trouble just getting the first data flow to access that temp table.

In my Execute SQL task, I'm creating a simple temp table. After executing that task, I can head to the data task and change my OLE DB Source to point to that temp table, but I recieve an error about an invalid table name when I attempt to map columns or hit "OK."

Is there something else I need to do to use that temp table as a source or can I only reference it through SQL queries?

Thank you.

I have found them to be unreliable and problematic to use in SSIS. The meta-data issues during dev. for example are a real pain, and the difficulty of controlling the lifetime of the temp tables is another.

I am now using table variables where I previously used temp tables. Table variables are typically faster for small row counts but slower with greater row counts. Unfortunately, I am using them for greater row counts and my sql statement went from 5 1/2 minutes to 8 1/2 minutes for about 250,000 rows.

|||How would I go about doing that though? I would like to try it out even though I'm aware of the limited success.
|||

Well, you've been warned :)

It's my understanding that the only thing you can do to SSIS to specifically facilitate the use of temp tables is to set the "retain same connection" property to "true" for the connection that is used to create the temp table, and then use that connection for all references to the table.

Ken

|||

Although you can use temporary tables in tempdb (#MyTempTable) by setting RetainSameConnection, you might prefer creating a temporary table in an ordinary database (MyTempTable), without setting RetainSameConnection:

Create the table ahead of time. Truncate it before using it on each invocation.

Cheers/Kristian

|||

kenambrose wrote:

Well, you've been warned :)

It's my understanding that the only thing you can do to SSIS to specifically facilitate the use of temp tables is to set the "retain same connection" property to "true" for the connection that is used to create the temp table, and then use that connection for all references to the table.

Ken

Right, I've seen this answer before, and actually did this. It allowed me to see the temp table after executing the task (as #TempTable_0283817, or something similar) but when I select it, I recieve an error.

I will reply later with the specific error in a few hours when I can get to the SQL box.
|||Here is the error message that pops up when I try to map columns to the temp table I chose from the drop down.

TITLE: Microsoft Visual Studio

Error at Data Flow Task [OLE DB Destination [340]]: An OLE DB error has occurred. Error code: 0x80040E37.

Error at Data Flow Task [OLE DB Destination [340]]: Opening a rowset for "[dbo].[#TestTable_000000002219]" failed. Check that the object exists in the database.

ADDITIONAL INFORMATION:

Exception from HRESULT: 0xC02020E8 (Microsoft.SqlServer.DTSPipelineWrap)

BUTTONS:

OK

|||

Yes that works of course but then the SSIS user context needs "create object" and "write" permissions on the source data server (unless you are willing to suffer the performance disaster of heterogenerous joins). Bad and/or impossible for most extraction scenarios.....

Ken

|||That's what the staging database is for in most extract scenarios, I find that even creating tempdb tables on the source systems are seldom OK.

Either way, by having an authorized user creating the table before SSIS runs, it's enough to give the SSIS context insert/delete rights.

Cheers/Kristian|||

Kristian Wedberg wrote:

That's what the staging database is for in most extract scenarios, I find that even creating tempdb tables on the source systems are seldom OK.

Either way, by having an authorized user creating the table before SSIS runs, it's enough to give the SSIS context insert/delete rights.

Cheers/Kristian

When you say "staging database" are you referring to an object in the SSIS package or is that just a general term?

Basically, what I want to do is run through the entire input file, validate it, and record any errors I find before inserting any DB records.
|||

In my use of temp tables and the OLE DB Source or Destination I have resorted to using the Advanced Editor where you can create the columns and mappings "by hand". An easy way to see how to set them up is to create a table in your dev db that looks like your temp table. Set up the source or destination using that table and map your columns. Then open up the Advanced Editor.

One thing I found with temp tables. Of course you know about the RetainSameConnection setting. I was using the same connection to create the temp table, fill it, then open it so that I could write to another table on the same connection. Where I write to another table on the same connection I had to create a new separate connection and use it to write to the other table. Otherwise it seemed the viability of the temp table was uncertain when I run a second parallel data flow task where that temp table would be used as well.

Put another way, I use one connection to create the temp table, fill it and read from it. I do not use that same connection to write or read from any other tables. This may not be effecient but it was the only way I could get things to work in parallel.

Hope this helps,
David Martin

|||We are loading data from several source systems simultaneously. Each system generates a set of identical files using the Raw Data File destination. All extracts share common load procedures that pick up the generated Raw Data files through an expression variable. It's a pretty slick way around temp tables and seems to work pretty fast. Would be nicer if there was a Recordset source and we didn't have to create the file on the server but for now there isn't one. You may want to look at that approach as a way around temporary tables.|||

Martin is absolutely right. Raw files are akin to temp tables.

He is correct that there is no recordset source (and with good reason) but you can build one yourself as explined here: http://blogs.conchango.com/jamiethomson/archive/2006/01/04/2540.aspx

You can't append to a recordset destination unfortunately. If you think that would be nice functionality to have then vote for it here: http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=6831c0b9-ef74-4132-a137-b073a950d3fd

-Jamie

|||I meant "staging database" as a general term, i.e. it's often useful for the SSIS part to have access to a database where it can write and read arbitrary tables, even if that database is different from both your source database and your target database.|||

<< we didn't have to create the file on the server >>

That's fine if:

a: Your package runs local to your source data (very rare I expect)

or

b: You do not need to reference temp data structures in the queries that populate the raw data files.

But when you need the functionality of temporary data structures when working with queries that reference remote source data, it's either heterogenerous joins (death to performance) or table variables.

Ken

Problems Using Temporary Tables

I am declaring a temp table in control flow via Execute SQL task. I then want to use that table as a source in a data task, keep it alive going back to control flow and use it as a destination in another data task following. I am having trouble just getting the first data flow to access that temp table.

In my Execute SQL task, I'm creating a simple temp table. After executing that task, I can head to the data task and change my OLE DB Source to point to that temp table, but I recieve an error about an invalid table name when I attempt to map columns or hit "OK."

Is there something else I need to do to use that temp table as a source or can I only reference it through SQL queries?

Thank you.

I have found them to be unreliable and problematic to use in SSIS. The meta-data issues during dev. for example are a real pain, and the difficulty of controlling the lifetime of the temp tables is another.

I am now using table variables where I previously used temp tables. Table variables are typically faster for small row counts but slower with greater row counts. Unfortunately, I am using them for greater row counts and my sql statement went from 5 1/2 minutes to 8 1/2 minutes for about 250,000 rows.

|||How would I go about doing that though? I would like to try it out even though I'm aware of the limited success.|||

Well, you've been warned :)

It's my understanding that the only thing you can do to SSIS to specifically facilitate the use of temp tables is to set the "retain same connection" property to "true" for the connection that is used to create the temp table, and then use that connection for all references to the table.

Ken

|||

Although you can use temporary tables in tempdb (#MyTempTable) by setting RetainSameConnection, you might prefer creating a temporary table in an ordinary database (MyTempTable), without setting RetainSameConnection:

Create the table ahead of time. Truncate it before using it on each invocation.

Cheers/Kristian

|||

kenambrose wrote:

Well, you've been warned :)

It's my understanding that the only thing you can do to SSIS to specifically facilitate the use of temp tables is to set the "retain same connection" property to "true" for the connection that is used to create the temp table, and then use that connection for all references to the table.

Ken

Right, I've seen this answer before, and actually did this. It allowed me to see the temp table after executing the task (as #TempTable_0283817, or something similar) but when I select it, I recieve an error.

I will reply later with the specific error in a few hours when I can get to the SQL box.|||Here is the error message that pops up when I try to map columns to the temp table I chose from the drop down.

TITLE: Microsoft Visual Studio

Error at Data Flow Task [OLE DB Destination [340]]: An OLE DB error has occurred. Error code: 0x80040E37.

Error at Data Flow Task [OLE DB Destination [340]]: Opening a rowset for "[dbo].[#TestTable_000000002219]" failed. Check that the object exists in the database.

ADDITIONAL INFORMATION:

Exception from HRESULT: 0xC02020E8 (Microsoft.SqlServer.DTSPipelineWrap)

BUTTONS:

OK|||

Yes that works of course but then the SSIS user context needs "create object" and "write" permissions on the source data server (unless you are willing to suffer the performance disaster of heterogenerous joins). Bad and/or impossible for most extraction scenarios.....

Ken

|||That's what the staging database is for in most extract scenarios, I find that even creating tempdb tables on the source systems are seldom OK.

Either way, by having an authorized user creating the table before SSIS runs, it's enough to give the SSIS context insert/delete rights.

Cheers/Kristian|||

Kristian Wedberg wrote:

That's what the staging database is for in most extract scenarios, I find that even creating tempdb tables on the source systems are seldom OK.

Either way, by having an authorized user creating the table before SSIS runs, it's enough to give the SSIS context insert/delete rights.

Cheers/Kristian

When you say "staging database" are you referring to an object in the SSIS package or is that just a general term?

Basically, what I want to do is run through the entire input file, validate it, and record any errors I find before inserting any DB records.|||

In my use of temp tables and the OLE DB Source or Destination I have resorted to using the Advanced Editor where you can create the columns and mappings "by hand". An easy way to see how to set them up is to create a table in your dev db that looks like your temp table. Set up the source or destination using that table and map your columns. Then open up the Advanced Editor.

One thing I found with temp tables. Of course you know about the RetainSameConnection setting. I was using the same connection to create the temp table, fill it, then open it so that I could write to another table on the same connection. Where I write to another table on the same connection I had to create a new separate connection and use it to write to the other table. Otherwise it seemed the viability of the temp table was uncertain when I run a second parallel data flow task where that temp table would be used as well.

Put another way, I use one connection to create the temp table, fill it and read from it. I do not use that same connection to write or read from any other tables. This may not be effecient but it was the only way I could get things to work in parallel.

Hope this helps,
David Martin

|||We are loading data from several source systems simultaneously. Each system generates a set of identical files using the Raw Data File destination. All extracts share common load procedures that pick up the generated Raw Data files through an expression variable. It's a pretty slick way around temp tables and seems to work pretty fast. Would be nicer if there was a Recordset source and we didn't have to create the file on the server but for now there isn't one. You may want to look at that approach as a way around temporary tables.|||

Martin is absolutely right. Raw files are akin to temp tables.

He is correct that there is no recordset source (and with good reason) but you can build one yourself as explined here: http://blogs.conchango.com/jamiethomson/archive/2006/01/04/2540.aspx

You can't append to a recordset destination unfortunately. If you think that would be nice functionality to have then vote for it here: http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=6831c0b9-ef74-4132-a137-b073a950d3fd

-Jamie

|||I meant "staging database" as a general term, i.e. it's often useful for the SSIS part to have access to a database where it can write and read arbitrary tables, even if that database is different from both your source database and your target database.|||

<< we didn't have to create the file on the server >>

That's fine if:

a: Your package runs local to your source data (very rare I expect)

or

b: You do not need to reference temp data structures in the queries that populate the raw data files.

But when you need the functionality of temporary data structures when working with queries that reference remote source data, it's either heterogenerous joins (death to performance) or table variables.

Ken

Problems Using Temporary Tables

I am declaring a temp table in control flow via Execute SQL task. I then want to use that table as a source in a data task, keep it alive going back to control flow and use it as a destination in another data task following. I am having trouble just getting the first data flow to access that temp table.

In my Execute SQL task, I'm creating a simple temp table. After executing that task, I can head to the data task and change my OLE DB Source to point to that temp table, but I recieve an error about an invalid table name when I attempt to map columns or hit "OK."

Is there something else I need to do to use that temp table as a source or can I only reference it through SQL queries?

Thank you.

I have found them to be unreliable and problematic to use in SSIS. The meta-data issues during dev. for example are a real pain, and the difficulty of controlling the lifetime of the temp tables is another.

I am now using table variables where I previously used temp tables. Table variables are typically faster for small row counts but slower with greater row counts. Unfortunately, I am using them for greater row counts and my sql statement went from 5 1/2 minutes to 8 1/2 minutes for about 250,000 rows.

|||How would I go about doing that though? I would like to try it out even though I'm aware of the limited success.|||

Well, you've been warned :)

It's my understanding that the only thing you can do to SSIS to specifically facilitate the use of temp tables is to set the "retain same connection" property to "true" for the connection that is used to create the temp table, and then use that connection for all references to the table.

Ken

|||

Although you can use temporary tables in tempdb (#MyTempTable) by setting RetainSameConnection, you might prefer creating a temporary table in an ordinary database (MyTempTable), without setting RetainSameConnection:

Create the table ahead of time. Truncate it before using it on each invocation.

Cheers/Kristian

|||

kenambrose wrote:

Well, you've been warned :)

It's my understanding that the only thing you can do to SSIS to specifically facilitate the use of temp tables is to set the "retain same connection" property to "true" for the connection that is used to create the temp table, and then use that connection for all references to the table.

Ken

Right, I've seen this answer before, and actually did this. It allowed me to see the temp table after executing the task (as #TempTable_0283817, or something similar) but when I select it, I recieve an error.

I will reply later with the specific error in a few hours when I can get to the SQL box.|||Here is the error message that pops up when I try to map columns to the temp table I chose from the drop down.

TITLE: Microsoft Visual Studio

Error at Data Flow Task [OLE DB Destination [340]]: An OLE DB error has occurred. Error code: 0x80040E37.

Error at Data Flow Task [OLE DB Destination [340]]: Opening a rowset for "[dbo].[#TestTable_000000002219]" failed. Check that the object exists in the database.

ADDITIONAL INFORMATION:

Exception from HRESULT: 0xC02020E8 (Microsoft.SqlServer.DTSPipelineWrap)

BUTTONS:

OK|||

Yes that works of course but then the SSIS user context needs "create object" and "write" permissions on the source data server (unless you are willing to suffer the performance disaster of heterogenerous joins). Bad and/or impossible for most extraction scenarios.....

Ken

|||That's what the staging database is for in most extract scenarios, I find that even creating tempdb tables on the source systems are seldom OK.

Either way, by having an authorized user creating the table before SSIS runs, it's enough to give the SSIS context insert/delete rights.

Cheers/Kristian|||

Kristian Wedberg wrote:

That's what the staging database is for in most extract scenarios, I find that even creating tempdb tables on the source systems are seldom OK.

Either way, by having an authorized user creating the table before SSIS runs, it's enough to give the SSIS context insert/delete rights.

Cheers/Kristian

When you say "staging database" are you referring to an object in the SSIS package or is that just a general term?

Basically, what I want to do is run through the entire input file, validate it, and record any errors I find before inserting any DB records.|||

In my use of temp tables and the OLE DB Source or Destination I have resorted to using the Advanced Editor where you can create the columns and mappings "by hand". An easy way to see how to set them up is to create a table in your dev db that looks like your temp table. Set up the source or destination using that table and map your columns. Then open up the Advanced Editor.

One thing I found with temp tables. Of course you know about the RetainSameConnection setting. I was using the same connection to create the temp table, fill it, then open it so that I could write to another table on the same connection. Where I write to another table on the same connection I had to create a new separate connection and use it to write to the other table. Otherwise it seemed the viability of the temp table was uncertain when I run a second parallel data flow task where that temp table would be used as well.

Put another way, I use one connection to create the temp table, fill it and read from it. I do not use that same connection to write or read from any other tables. This may not be effecient but it was the only way I could get things to work in parallel.

Hope this helps,
David Martin

|||We are loading data from several source systems simultaneously. Each system generates a set of identical files using the Raw Data File destination. All extracts share common load procedures that pick up the generated Raw Data files through an expression variable. It's a pretty slick way around temp tables and seems to work pretty fast. Would be nicer if there was a Recordset source and we didn't have to create the file on the server but for now there isn't one. You may want to look at that approach as a way around temporary tables.|||

Martin is absolutely right. Raw files are akin to temp tables.

He is correct that there is no recordset source (and with good reason) but you can build one yourself as explined here: http://blogs.conchango.com/jamiethomson/archive/2006/01/04/2540.aspx

You can't append to a recordset destination unfortunately. If you think that would be nice functionality to have then vote for it here: http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=6831c0b9-ef74-4132-a137-b073a950d3fd

-Jamie

|||I meant "staging database" as a general term, i.e. it's often useful for the SSIS part to have access to a database where it can write and read arbitrary tables, even if that database is different from both your source database and your target database.|||

<< we didn't have to create the file on the server >>

That's fine if:

a: Your package runs local to your source data (very rare I expect)

or

b: You do not need to reference temp data structures in the queries that populate the raw data files.

But when you need the functionality of temporary data structures when working with queries that reference remote source data, it's either heterogenerous joins (death to performance) or table variables.

Ken

Problems using Linked Server.

Hi, I have a process that execute a query that is created on a linked
server. This process is scheduled in a job. Every Time the job runs
report this error:
Executed as user: domain\servicesaccount. OLE DB provider 'SQLOLEDB'
reported an error. [SQLSTATE 42000] (Error 7399) OLE DB error trace
[OLE/DB Provider 'SQLOLEDB' IDBInitialize::Initialize returned
0x80004005: ]. [SQLSTATE 01000] (Error 7300) [SQLSTATE 01000] (Error
7312). The step failed.
Do some body know how can I solve the problem?
Thanks a lot for your help.
*** Sent via Developersdex http://www.developersdex.com ***Error 0x80004005 is access denied so you'd want to start by
checking the permissions for the login accounts used in the
security mapping for the linked server.
-Sue
On Mon, 23 Jan 2006 07:25:51 -0800, MariaGuzman
<marisa@.devdex.com> wrote:
>Hi, I have a process that execute a query that is created on a linked
>server. This process is scheduled in a job. Every Time the job runs
>report this error:
>Executed as user: domain\servicesaccount. OLE DB provider 'SQLOLEDB'
>reported an error. [SQLSTATE 42000] (Error 7399) OLE DB error trace
>[OLE/DB Provider 'SQLOLEDB' IDBInitialize::Initialize returned
>0x80004005: ]. [SQLSTATE 01000] (Error 7300) [SQLSTATE 01000] (Error
>7312). The step failed.
>Do some body know how can I solve the problem?
>Thanks a lot for your help.
>*** Sent via Developersdex http://www.developersdex.com ***

Problems using Linked Server.

Hi, I have a process that execute a query that is created on a linked
server. This process is scheduled in a job. Every Time the job runs
report this error:
Executed as user: domain\servicesaccount. OLE DB provider 'SQLOLEDB'
reported an error. [SQLSTATE 42000] (Error 7399) OLE DB error trace
[OLE/DB Provider 'SQLOLEDB' IDBInitialize::Initialize returned
0x80004005: ]. [SQLSTATE 01000] (Error 7300) [SQLSTATE 01000] (E
rror
7312). The step failed.
Do some body know how can I solve the problem?
Thanks a lot for your help.
*** Sent via Developersdex http://www.codecomments.com ***Error 0x80004005 is access denied so you'd want to start by
checking the permissions for the login accounts used in the
security mapping for the linked server.
-Sue
On Mon, 23 Jan 2006 07:25:51 -0800, MariaGuzman
<marisa@.devdex.com> wrote:

>Hi, I have a process that execute a query that is created on a linked
>server. This process is scheduled in a job. Every Time the job runs
>report this error:
>Executed as user: domain\servicesaccount. OLE DB provider 'SQLOLEDB'
>reported an error. [SQLSTATE 42000] (Error 7399) OLE DB error trace
>[OLE/DB Provider 'SQLOLEDB' IDBInitialize::Initialize returned
>0x80004005: ]. [SQLSTATE 01000] (Error 7300) [SQLSTATE 01000] (
Error
>7312). The step failed.
>Do some body know how can I solve the problem?
>Thanks a lot for your help.
>*** Sent via Developersdex http://www.codecomments.com ***