Showing posts with label folder. Show all posts
Showing posts with label folder. Show all posts

Monday, March 26, 2012

Scheduling a text file to be inserted to a database table

Hi there
New to SQL 2000 and i have a question regarding scheduling a task. I have a
text file that is being downloaded to a web folder from an AS400 system
three times a day. I want to then grab this file and insert and replace the
exisiting records in a database table.
What be the best way to do this? Stored Procedure?
Can you schedule stored procedures to be run at time specific intervals?
Any help appreciatedBJ
DTS Package
"bj" <orders@.seton.net.au> wrote in message
news:OifAtnhUGHA.5808@.TK2MSFTNGP12.phx.gbl...
> Hi there
> New to SQL 2000 and i have a question regarding scheduling a task. I have
> a text file that is being downloaded to a web folder from an AS400 system
> three times a day. I want to then grab this file and insert and replace
> the exisiting records in a database table.
> What be the best way to do this? Stored Procedure?
> Can you schedule stored procedures to be run at time specific intervals?
> Any help appreciated
>
>

Scheduling a legacy DTS package

I have a legacy DTS package on my test SQL Server 2005 in the Management\Legacy\Data Transformation Services\ folder. I can run the package, but how can I schedule it? this doesn't appear to be an option anymore like it was in 2000.

Thanks

Use the command-line option in SQL Agent and use DTSRun.

[I am assuming at this point that DTSRun is still distributed. Apologies if not]

-Jamie

|||

it is but it's called dtexec now, still doesn't work mind,

if I save the package as a .dts files and try to run it with

C:\>dtexec /f "c:\poval.dts"

I get:

--


Microsoft (R) SQL Server Execute Package Utility
Version 9.00.1399.06 for 32-bit
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.

Started: 14:32:26
Error: 2006-03-24 14:32:26.95
Code: 0xC0011007
Source: {F6D6F0F3-30A1-40F6-94B5-D14419672776}
Description: Unable to load the package as XML because of package does not ha
ve a valid XML format. A specific XML parser error will be posted.
End Error
Error: 2006-03-24 14:32:26.95
Code: 0xC0011002
Source: {F6D6F0F3-30A1-40F6-94B5-D14419672776}
Description: Failed to open package file "c:\poval.dts" due to error 0xC00CE5
08 "An invalid character was found in text content.". This happens when loading
a package and the file cannot be opened or loaded correctly into the XML docume
nt. This can be the result of either providing an incorrect file name was specif
ied when calling LoadPackage or the XML file was specified and has an incorrect
format.
End Error
Could not load package "c:\poval.dts" because of error 0xC0011002.
Description: Failed to open package file "c:\poval.dts" due to error 0xC00CE508
"An invalid character was found in text content.". This happens when loading a
package and the file cannot be opened or loaded correctly into the XML document.
This can be the result of either providing an incorrect file name was specified
when calling LoadPackage or the XML file was specified and has an incorrect for
mat.
Source: {F6D6F0F3-30A1-40F6-94B5-D14419672776}
Started: 14:32:26
Finished: 14:32:27
Elapsed: 0.218 seconds

-

This, I suspect, is because there are invalid characters somewhere in the package, although it's odd that it runs fine when I run it from the DTS designer itself? Therefore I must apologise to Microsoft for not having the foresight not to include any characters that may one day be invalid when I wrote the DTS package about 4 years ago....

and If I attempt to run it directly from the server using

C:\>dtexec /SQL POVal

I get:-

-


Microsoft (R) SQL Server Execute Package Utility
Version 9.00.1399.06 for 32-bit
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.

Started: 14:39:16
Could not load package "POVal" because of error 0xC001000A.
Description: The specified package could not be loaded from the SQL Server datab
ase.
Source:
Started: 14:39:16
Finished: 14:39:17
Elapsed: 0.484 seconds

Am I to assume from this that the legacy packages aren't stored in msdb , Can anyone tell me where my package is then!?

I've had enough today

|||

You cannot run a DTS2000 package with DTExec.exe. You need DTSRun.exe.

-Jamie

|||d'oh, cheers

Scheduling a job under SA

I've shceduled a job under sa account (I've changed the password
though),this job access local folder of the box running SQL server.I have
added sa to the sysadmin role and it dose have access to the local folder
..How is it possible as *sa* is a sql server account and how it has the
enough permissions to access local file system?
Thanks a lot
If the job is owned by a sysadmin, it's operating under the
security context of the service account for SQL Agent.
-Sue
On Mon, 8 Aug 2005 16:25:10 -0700, "J-T" <J-T@.nospam.com>
wrote:

>I've shceduled a job under sa account (I've changed the password
>though),this job access local folder of the box running SQL server.I have
>added sa to the sysadmin role and it dose have access to the local folder
>.How is it possible as *sa* is a sql server account and how it has the
>enough permissions to access local file system?
>Thanks a lot
>
|||Thanks a lot
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:e36gf11g82of53tigjia7dqobotkfvp5pt@.4ax.com...
> If the job is owned by a sysadmin, it's operating under the
> security context of the service account for SQL Agent.
> -Sue
> On Mon, 8 Aug 2005 16:25:10 -0700, "J-T" <J-T@.nospam.com>
> wrote:
>

Scheduling a job under SA

I've shceduled a job under sa account (I've changed the password
though),this job access local folder of the box running SQL server.I have
added sa to the sysadmin role and it dose have access to the local folder
.How is it possible as *sa* is a sql server account and how it has the
enough permissions to access local file system?
Thanks a lotIf the job is owned by a sysadmin, it's operating under the
security context of the service account for SQL Agent.
-Sue
On Mon, 8 Aug 2005 16:25:10 -0700, "J-T" <J-T@.nospam.com>
wrote:

>I've shceduled a job under sa account (I've changed the password
>though),this job access local folder of the box running SQL server.I have
>added sa to the sysadmin role and it dose have access to the local folder
>.How is it possible as *sa* is a sql server account and how it has the
>enough permissions to access local file system?
>Thanks a lot
>|||Thanks a lot
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:e36gf11g82of53tigjia7dqobotkfvp5pt@.
4ax.com...
> If the job is owned by a sysadmin, it's operating under the
> security context of the service account for SQL Agent.
> -Sue
> On Mon, 8 Aug 2005 16:25:10 -0700, "J-T" <J-T@.nospam.com>
> wrote:
>
>

Scheduling a job under SA

I've shceduled a job under sa account (I've changed the password
though:)),this job access local folder of the box running SQL server.I have
added sa to the sysadmin role and it dose have access to the local folder
.How is it possible as *sa* is a sql server account and how it has the
enough permissions to access local file system?
Thanks a lotIf the job is owned by a sysadmin, it's operating under the
security context of the service account for SQL Agent.
-Sue
On Mon, 8 Aug 2005 16:25:10 -0700, "J-T" <J-T@.nospam.com>
wrote:
>I've shceduled a job under sa account (I've changed the password
>though:)),this job access local folder of the box running SQL server.I have
>added sa to the sysadmin role and it dose have access to the local folder
>.How is it possible as *sa* is a sql server account and how it has the
>enough permissions to access local file system?
>Thanks a lot
>|||Thanks a lot
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:e36gf11g82of53tigjia7dqobotkfvp5pt@.4ax.com...
> If the job is owned by a sysadmin, it's operating under the
> security context of the service account for SQL Agent.
> -Sue
> On Mon, 8 Aug 2005 16:25:10 -0700, "J-T" <J-T@.nospam.com>
> wrote:
>>I've shceduled a job under sa account (I've changed the password
>>though:)),this job access local folder of the box running SQL server.I
>>have
>>added sa to the sysadmin role and it dose have access to the local folder
>>.How is it possible as *sa* is a sql server account and how it has the
>>enough permissions to access local file system?
>>Thanks a lot
>sql

Monday, March 12, 2012

Scheduled Job

Hi ,
I created a batch only to transfer the files from local server to share
folder on another server. I put the batch in the DTS package and scheduled it.
When I trace the job , the file have been copied but the "Status" of the
job still stick on "Executing Step 1 ..." and it no turn to success although
the file had been copied. What's wrong with that actually ?
Thanks ,
Travis
--
Travis TanHi ,
why u are making ur work complex .
U can transfer the files using file tranfer protocol task in DTC
package.
When the batch finishes tanfer sqlserver doesnt come to know the status
and it shows executing status.
from
Doller
Travis wrote:
> Hi ,
> I created a batch only to transfer the files from local server to share
> folder on another server. I put the batch in the DTS package and scheduled it.
> When I trace the job , the file have been copied but the "Status" of the
> job still stick on "Executing Step 1 ..." and it no turn to success although
> the file had been copied. What's wrong with that actually ?
> Thanks ,
> Travis
> --
> Travis Tan|||Travis wrote:
> Hi ,
> I created a batch only to transfer the files from local server to share
> folder on another server. I put the batch in the DTS package and scheduled it.
> When I trace the job , the file have been copied but the "Status" of the
> job still stick on "Executing Step 1 ..." and it no turn to success although
> the file had been copied. What's wrong with that actually ?
> Thanks ,
> Travis
>
Are you looking at the status in Enterprise Manager? In that case you
might need to refresh it to see the actual status.
Regards
Steen|||Hi Doller ,
Thanks for your info and I understand what you said. The actually process
in DTS was
1) Transfer The Files
2) UnZip The Files
3) Restore the transaction logs
Because the Transfer Files pending in "executing" so no Unzip process is
done. Means that no way for me to resolve that ?
Thanks ,
Travis
Travis Tan
"doller" wrote:
> Hi ,
> why u are making ur work complex .
> U can transfer the files using file tranfer protocol task in DTC
> package.
> When the batch finishes tanfer sqlserver doesnt come to know the status
> and it shows executing status.
> from
> Doller
>
> Travis wrote:
> > Hi ,
> >
> > I created a batch only to transfer the files from local server to share
> > folder on another server. I put the batch in the DTS package and scheduled it.
> >
> > When I trace the job , the file have been copied but the "Status" of the
> > job still stick on "Executing Step 1 ..." and it no turn to success although
> > the file had been copied. What's wrong with that actually ?
> >
> > Thanks ,
> > Travis
> >
> > --
> > Travis Tan
>