Showing posts with label contains. Show all posts
Showing posts with label contains. Show all posts

Friday, March 30, 2012

Jobs

I have created several jobs which contains several steps inside it. Now with the schedule it runs very frequently and more than 100 jobs are running almost simulteneously. so I want to limit the number of jobs running at a time say at a time I want to run 10 jobs after that other 10 set and s
How can I do it help me ou
Regards
SunilYou can adapt schedules, or you can create a wrapper job. This wrapper job
can start other jobs on each own step using the sp_start_job system SP.
--
Dejan Sarka, SQL Server MVP
Please reply only to the newsgroups.
"Sunil" <anonymous@.discussions.microsoft.com> wrote in message
news:9250860D-15DE-408D-A5A8-3CA7FAD56CC4@.microsoft.com...
> I have created several jobs which contains several steps inside it. Now
with the schedule it runs very frequently and more than 100 jobs are running
almost simulteneously. so I want to limit the number of jobs running at a
time say at a time I want to run 10 jobs after that other 10 set and so
>
> How can I do it help me out
> Regards,
> Sunil

Jobs

I have created several jobs which contains several steps inside it. Now with
the schedule it runs very frequently and more than 100 jobs are running alm
ost simulteneously. so I want to limit the number of jobs running at a time
say at a time I want to run
10 jobs after that other 10 set and so
How can I do it help me out
Regards,
SunilYou can adapt schedules, or you can create a wrapper job. This wrapper job
can start other jobs on each own step using the sp_start_job system SP.
Dejan Sarka, SQL Server MVP
Please reply only to the newsgroups.
"Sunil" <anonymous@.discussions.microsoft.com> wrote in message
news:9250860D-15DE-408D-A5A8-3CA7FAD56CC4@.microsoft.com...
quote:

> I have created several jobs which contains several steps inside it. Now

with the schedule it runs very frequently and more than 100 jobs are running
almost simulteneously. so I want to limit the number of jobs running at a
time say at a time I want to run 10 jobs after that other 10 set and so
quote:

>
> How can I do it help me out
> Regards,
> Sunil

JOB With SSIS Step Fails If Package Contains A Script Task

I have a Job Step defined to execute a SSIS Package. This SSIS package contains a Script Task. The Job fails with the message "Package execution failed. The step failed."

I am logging events in the package and when the packages gets to the Script Task the log reports "The script files failed to load". If I disable the Script Task from the package it executes fine.

Curiously, the package runs successfully with the Scritp task enabled using dtexecui and dtexec from the command line.

Only if I include the Package in a job step with the Script Task enabled does it fail.

Any help would be appreciated.I've no real idea about this Steve except to say have you got the script code pre-compiled? If so, try it without (and vica versa).

-Jamie|||

Sorry for not posting this sooner, Jamie...Yes, setting the Script Task "PrecompileScriptIntoBinaryCode" Property to True resolved the issue.

-Steve

|||hey - did you ever get this to work? Im having the same issue - its a SSIS pkg that ran on one box and I moved to another box (64 bit if that makes a diff) - any info is greatly apprecaited - thanks.|||

Juantana,

Yes, set your Script Task "PrecompileScriptIntoBinaryCode" Property=True and then open and close your script. Save, redeploy and it should work. Let me know if you have any questions.

-Steve

|||

Hi,

Inspite of putting the PrecompileScriptintoBinarycode Property = True, it is not working. Do you have any suggestions?

Thanks.

|||After settings Precompile to True, you need to open and close script editor(s) to actually precompile the script in the task. Then re-deploy the pockage to target system.|||Also remove all the break points in the code, having break points prevents from recompilation. I guess this issue would be fixed by SP2|||Just an FYI I had all my scripts set to PrecompileScriptIntoBinaryCode=True however when developing in 32bit and deploying to 64bit seemingly randomly I will get the "script failed to load" error. I just open the script and compile it again and save and that usually does the trick.|||

Also if the problem still persists and you keep getting the same error I am sure you are not taking the dtsx file from bin folder to execute. The file created by designer (Business Intelligence Development Studio) is only useful for debug and development mode. After building the solution one should use dtsx created in bin folder. This solution worked for me.

Thanks

Mohit

|||NOTE: I got this same error message with Precompile option set to True.

Problem was that a variable name script used was not passed in. Go figure|||

I have about 30 dtxs that I would like to recompile its scripts to solve this issue. I would like to avoid to open each package, then open each script in the package and do the save to recomplie.

Is there a way to recompile from the command line?

Thanks!

|||

Previously I said "randomly" but I think I have it figured out when this error occurs:

If I am working on a package, open a different package and copy a script object and paste into the one I am working on it will not work in 64-bit without a recompile (but will work in 32 bit).

|||

Chris Honcoop wrote:

Previously I said "randomly" but I think I have it figured out when this error occurs:

If I am working on a package, open a different package and copy a script object and paste into the one I am working on it will not work in 64-bit without a recompile (but will work in 32 bit).

Sounds like it might be a bug. Could you submit it at http://connect.microsoft.com?

-Jamie

|||

I too have similar doubt as that of Paulino. I've 50+ packages with 60+ script tasks. Is there any way, I can compile using a command in command prompt? Any help would be highly appreciated.

My Regards

JOB With SSIS Step Fails If Package Contains A Script Task

I have a Job Step defined to execute a SSIS Package. This SSIS package contains a Script Task. The Job fails with the message "Package execution failed. The step failed."

I am logging events in the package and when the packages gets to the Script Task the log reports "The script files failed to load". If I disable the Script Task from the package it executes fine.

Curiously, the package runs successfully with the Scritp task enabled using dtexecui and dtexec from the command line.

Only if I include the Package in a job step with the Script Task enabled does it fail.

Any help would be appreciated.I've no real idea about this Steve except to say have you got the script code pre-compiled? If so, try it without (and vica versa).

-Jamie|||

Sorry for not posting this sooner, Jamie...Yes, setting the Script Task "PrecompileScriptIntoBinaryCode" Property to True resolved the issue.

-Steve

|||hey - did you ever get this to work? Im having the same issue - its a SSIS pkg that ran on one box and I moved to another box (64 bit if that makes a diff) - any info is greatly apprecaited - thanks.|||

Juantana,

Yes, set your Script Task "PrecompileScriptIntoBinaryCode" Property=True and then open and close your script. Save, redeploy and it should work. Let me know if you have any questions.

-Steve

|||

Hi,

Inspite of putting the PrecompileScriptintoBinarycode Property = True, it is not working. Do you have any suggestions?

Thanks.

|||After settings Precompile to True, you need to open and close script editor(s) to actually precompile the script in the task. Then re-deploy the pockage to target system.|||Also remove all the break points in the code, having break points prevents from recompilation. I guess this issue would be fixed by SP2|||Just an FYI I had all my scripts set to PrecompileScriptIntoBinaryCode=True however when developing in 32bit and deploying to 64bit seemingly randomly I will get the "script failed to load" error. I just open the script and compile it again and save and that usually does the trick.|||

Also if the problem still persists and you keep getting the same error I am sure you are not taking the dtsx file from bin folder to execute. The file created by designer (Business Intelligence Development Studio) is only useful for debug and development mode. After building the solution one should use dtsx created in bin folder. This solution worked for me.

Thanks

Mohit

|||NOTE: I got this same error message with Precompile option set to True.

Problem was that a variable name script used was not passed in. Go figure|||

I have about 30 dtxs that I would like to recompile its scripts to solve this issue. I would like to avoid to open each package, then open each script in the package and do the save to recomplie.

Is there a way to recompile from the command line?

Thanks!

|||

Previously I said "randomly" but I think I have it figured out when this error occurs:

If I am working on a package, open a different package and copy a script object and paste into the one I am working on it will not work in 64-bit without a recompile (but will work in 32 bit).

|||

Chris Honcoop wrote:

Previously I said "randomly" but I think I have it figured out when this error occurs:

If I am working on a package, open a different package and copy a script object and paste into the one I am working on it will not work in 64-bit without a recompile (but will work in 32 bit).

Sounds like it might be a bug. Could you submit it at http://connect.microsoft.com?

-Jamie

sql

JOB With SSIS Step Fails If Package Contains A Script Task

I have a Job Step defined to execute a SSIS Package. This SSIS package contains a Script Task. The Job fails with the message "Package execution failed. The step failed."

I am logging events in the package and when the packages gets to the Script Task the log reports "The script files failed to load". If I disable the Script Task from the package it executes fine.

Curiously, the package runs successfully with the Scritp task enabled using dtexecui and dtexec from the command line.

Only if I include the Package in a job step with the Script Task enabled does it fail.

Any help would be appreciated.I've no real idea about this Steve except to say have you got the script code pre-compiled? If so, try it without (and vica versa).

-Jamie|||

Sorry for not posting this sooner, Jamie...Yes, setting the Script Task "PrecompileScriptIntoBinaryCode" Property to True resolved the issue.

-Steve

|||hey - did you ever get this to work? Im having the same issue - its a SSIS pkg that ran on one box and I moved to another box (64 bit if that makes a diff) - any info is greatly apprecaited - thanks.|||

Juantana,

Yes, set your Script Task "PrecompileScriptIntoBinaryCode" Property=True and then open and close your script. Save, redeploy and it should work. Let me know if you have any questions.

-Steve

|||

Hi,

Inspite of putting the PrecompileScriptintoBinarycode Property = True, it is not working. Do you have any suggestions?

Thanks.

|||After settings Precompile to True, you need to open and close script editor(s) to actually precompile the script in the task. Then re-deploy the pockage to target system.|||Also remove all the break points in the code, having break points prevents from recompilation. I guess this issue would be fixed by SP2|||Just an FYI I had all my scripts set to PrecompileScriptIntoBinaryCode=True however when developing in 32bit and deploying to 64bit seemingly randomly I will get the "script failed to load" error. I just open the script and compile it again and save and that usually does the trick.|||

Also if the problem still persists and you keep getting the same error I am sure you are not taking the dtsx file from bin folder to execute. The file created by designer (Business Intelligence Development Studio) is only useful for debug and development mode. After building the solution one should use dtsx created in bin folder. This solution worked for me.

Thanks

Mohit

|||NOTE: I got this same error message with Precompile option set to True.

Problem was that a variable name script used was not passed in. Go figure|||

I have about 30 dtxs that I would like to recompile its scripts to solve this issue. I would like to avoid to open each package, then open each script in the package and do the save to recomplie.

Is there a way to recompile from the command line?

Thanks!

|||

Previously I said "randomly" but I think I have it figured out when this error occurs:

If I am working on a package, open a different package and copy a script object and paste into the one I am working on it will not work in 64-bit without a recompile (but will work in 32 bit).

|||

Chris Honcoop wrote:

Previously I said "randomly" but I think I have it figured out when this error occurs:

If I am working on a package, open a different package and copy a script object and paste into the one I am working on it will not work in 64-bit without a recompile (but will work in 32 bit).

Sounds like it might be a bug. Could you submit it at http://connect.microsoft.com?

-Jamie

JOB With SSIS Step Fails If Package Contains A Script Task

I have a Job Step defined to execute a SSIS Package. This SSIS package contains a Script Task. The Job fails with the message "Package execution failed. The step failed."

I am logging events in the package and when the packages gets to the Script Task the log reports "The script files failed to load". If I disable the Script Task from the package it executes fine.

Curiously, the package runs successfully with the Scritp task enabled using dtexecui and dtexec from the command line.

Only if I include the Package in a job step with the Script Task enabled does it fail.

Any help would be appreciated.I've no real idea about this Steve except to say have you got the script code pre-compiled? If so, try it without (and vica versa).

-Jamie|||

Sorry for not posting this sooner, Jamie...Yes, setting the Script Task "PrecompileScriptIntoBinaryCode" Property to True resolved the issue.

-Steve

|||hey - did you ever get this to work? Im having the same issue - its a SSIS pkg that ran on one box and I moved to another box (64 bit if that makes a diff) - any info is greatly apprecaited - thanks.|||

Juantana,

Yes, set your Script Task "PrecompileScriptIntoBinaryCode" Property=True and then open and close your script. Save, redeploy and it should work. Let me know if you have any questions.

-Steve

|||

Hi,

Inspite of putting the PrecompileScriptintoBinarycode Property = True, it is not working. Do you have any suggestions?

Thanks.

|||After settings Precompile to True, you need to open and close script editor(s) to actually precompile the script in the task. Then re-deploy the pockage to target system.|||Also remove all the break points in the code, having break points prevents from recompilation. I guess this issue would be fixed by SP2|||Just an FYI I had all my scripts set to PrecompileScriptIntoBinaryCode=True however when developing in 32bit and deploying to 64bit seemingly randomly I will get the "script failed to load" error. I just open the script and compile it again and save and that usually does the trick.|||

Also if the problem still persists and you keep getting the same error I am sure you are not taking the dtsx file from bin folder to execute. The file created by designer (Business Intelligence Development Studio) is only useful for debug and development mode. After building the solution one should use dtsx created in bin folder. This solution worked for me.

Thanks

Mohit

|||NOTE: I got this same error message with Precompile option set to True.

Problem was that a variable name script used was not passed in. Go figure|||

I have about 30 dtxs that I would like to recompile its scripts to solve this issue. I would like to avoid to open each package, then open each script in the package and do the save to recomplie.

Is there a way to recompile from the command line?

Thanks!

|||

Previously I said "randomly" but I think I have it figured out when this error occurs:

If I am working on a package, open a different package and copy a script object and paste into the one I am working on it will not work in 64-bit without a recompile (but will work in 32 bit).

|||

Chris Honcoop wrote:

Previously I said "randomly" but I think I have it figured out when this error occurs:

If I am working on a package, open a different package and copy a script object and paste into the one I am working on it will not work in 64-bit without a recompile (but will work in 32 bit).

Sounds like it might be a bug. Could you submit it at http://connect.microsoft.com?

-Jamie

JOB With SSIS Step Fails If Package Contains A Script Task

I have a Job Step defined to execute a SSIS Package. This SSIS package contains a Script Task. The Job fails with the message "Package execution failed. The step failed."

I am logging events in the package and when the packages gets to the Script Task the log reports "The script files failed to load". If I disable the Script Task from the package it executes fine.

Curiously, the package runs successfully with the Scritp task enabled using dtexecui and dtexec from the command line.

Only if I include the Package in a job step with the Script Task enabled does it fail.

Any help would be appreciated.I've no real idea about this Steve except to say have you got the script code pre-compiled? If so, try it without (and vica versa).

-Jamie|||

Sorry for not posting this sooner, Jamie...Yes, setting the Script Task "PrecompileScriptIntoBinaryCode" Property to True resolved the issue.

-Steve

|||hey - did you ever get this to work? Im having the same issue - its a SSIS pkg that ran on one box and I moved to another box (64 bit if that makes a diff) - any info is greatly apprecaited - thanks.|||

Juantana,

Yes, set your Script Task "PrecompileScriptIntoBinaryCode" Property=True and then open and close your script. Save, redeploy and it should work. Let me know if you have any questions.

-Steve

|||

Hi,

Inspite of putting the PrecompileScriptintoBinarycode Property = True, it is not working. Do you have any suggestions?

Thanks.

|||After settings Precompile to True, you need to open and close script editor(s) to actually precompile the script in the task. Then re-deploy the pockage to target system.|||Also remove all the break points in the code, having break points prevents from recompilation. I guess this issue would be fixed by SP2|||Just an FYI I had all my scripts set to PrecompileScriptIntoBinaryCode=True however when developing in 32bit and deploying to 64bit seemingly randomly I will get the "script failed to load" error. I just open the script and compile it again and save and that usually does the trick.|||

Also if the problem still persists and you keep getting the same error I am sure you are not taking the dtsx file from bin folder to execute. The file created by designer (Business Intelligence Development Studio) is only useful for debug and development mode. After building the solution one should use dtsx created in bin folder. This solution worked for me.

Thanks

Mohit

|||NOTE: I got this same error message with Precompile option set to True.

Problem was that a variable name script used was not passed in. Go figure|||

I have about 30 dtxs that I would like to recompile its scripts to solve this issue. I would like to avoid to open each package, then open each script in the package and do the save to recomplie.

Is there a way to recompile from the command line?

Thanks!

|||

Previously I said "randomly" but I think I have it figured out when this error occurs:

If I am working on a package, open a different package and copy a script object and paste into the one I am working on it will not work in 64-bit without a recompile (but will work in 32 bit).

|||

Chris Honcoop wrote:

Previously I said "randomly" but I think I have it figured out when this error occurs:

If I am working on a package, open a different package and copy a script object and paste into the one I am working on it will not work in 64-bit without a recompile (but will work in 32 bit).

Sounds like it might be a bug. Could you submit it at http://connect.microsoft.com?

-Jamie

JOB With SSIS Step Fails If Package Contains A Script Task

I have a Job Step defined to execute a SSIS Package. This SSIS package contains a Script Task. The Job fails with the message "Package execution failed. The step failed."

I am logging events in the package and when the packages gets to the Script Task the log reports "The script files failed to load". If I disable the Script Task from the package it executes fine.

Curiously, the package runs successfully with the Scritp task enabled using dtexecui and dtexec from the command line.

Only if I include the Package in a job step with the Script Task enabled does it fail.

Any help would be appreciated.I've no real idea about this Steve except to say have you got the script code pre-compiled? If so, try it without (and vica versa).

-Jamie|||

Sorry for not posting this sooner, Jamie...Yes, setting the Script Task "PrecompileScriptIntoBinaryCode" Property to True resolved the issue.

-Steve

|||hey - did you ever get this to work? Im having the same issue - its a SSIS pkg that ran on one box and I moved to another box (64 bit if that makes a diff) - any info is greatly apprecaited - thanks.|||

Juantana,

Yes, set your Script Task "PrecompileScriptIntoBinaryCode" Property=True and then open and close your script. Save, redeploy and it should work. Let me know if you have any questions.

-Steve

|||

Hi,

Inspite of putting the PrecompileScriptintoBinarycode Property = True, it is not working. Do you have any suggestions?

Thanks.

|||After settings Precompile to True, you need to open and close script editor(s) to actually precompile the script in the task. Then re-deploy the pockage to target system.|||Also remove all the break points in the code, having break points prevents from recompilation. I guess this issue would be fixed by SP2|||Just an FYI I had all my scripts set to PrecompileScriptIntoBinaryCode=True however when developing in 32bit and deploying to 64bit seemingly randomly I will get the "script failed to load" error. I just open the script and compile it again and save and that usually does the trick.|||

Also if the problem still persists and you keep getting the same error I am sure you are not taking the dtsx file from bin folder to execute. The file created by designer (Business Intelligence Development Studio) is only useful for debug and development mode. After building the solution one should use dtsx created in bin folder. This solution worked for me.

Thanks

Mohit

|||NOTE: I got this same error message with Precompile option set to True.

Problem was that a variable name script used was not passed in. Go figure|||

I have about 30 dtxs that I would like to recompile its scripts to solve this issue. I would like to avoid to open each package, then open each script in the package and do the save to recomplie.

Is there a way to recompile from the command line?

Thanks!

|||

Previously I said "randomly" but I think I have it figured out when this error occurs:

If I am working on a package, open a different package and copy a script object and paste into the one I am working on it will not work in 64-bit without a recompile (but will work in 32 bit).

|||

Chris Honcoop wrote:

Previously I said "randomly" but I think I have it figured out when this error occurs:

If I am working on a package, open a different package and copy a script object and paste into the one I am working on it will not work in 64-bit without a recompile (but will work in 32 bit).

Sounds like it might be a bug. Could you submit it at http://connect.microsoft.com?

-Jamie

JOB With SSIS Step Fails If Package Contains A Script Task

I have a Job Step defined to execute a SSIS Package. This SSIS package contains a Script Task. The Job fails with the message "Package execution failed. The step failed."

I am logging events in the package and when the packages gets to the Script Task the log reports "The script files failed to load". If I disable the Script Task from the package it executes fine.

Curiously, the package runs successfully with the Scritp task enabled using dtexecui and dtexec from the command line.

Only if I include the Package in a job step with the Script Task enabled does it fail.

Any help would be appreciated.I've no real idea about this Steve except to say have you got the script code pre-compiled? If so, try it without (and vica versa).

-Jamie|||

Sorry for not posting this sooner, Jamie...Yes, setting the Script Task "PrecompileScriptIntoBinaryCode" Property to True resolved the issue.

-Steve

|||hey - did you ever get this to work? Im having the same issue - its a SSIS pkg that ran on one box and I moved to another box (64 bit if that makes a diff) - any info is greatly apprecaited - thanks.|||

Juantana,

Yes, set your Script Task "PrecompileScriptIntoBinaryCode" Property=True and then open and close your script. Save, redeploy and it should work. Let me know if you have any questions.

-Steve

|||

Hi,

Inspite of putting the PrecompileScriptintoBinarycode Property = True, it is not working. Do you have any suggestions?

Thanks.

|||After settings Precompile to True, you need to open and close script editor(s) to actually precompile the script in the task. Then re-deploy the pockage to target system.|||Also remove all the break points in the code, having break points prevents from recompilation. I guess this issue would be fixed by SP2|||Just an FYI I had all my scripts set to PrecompileScriptIntoBinaryCode=True however when developing in 32bit and deploying to 64bit seemingly randomly I will get the "script failed to load" error. I just open the script and compile it again and save and that usually does the trick.|||

Also if the problem still persists and you keep getting the same error I am sure you are not taking the dtsx file from bin folder to execute. The file created by designer (Business Intelligence Development Studio) is only useful for debug and development mode. After building the solution one should use dtsx created in bin folder. This solution worked for me.

Thanks

Mohit

|||NOTE: I got this same error message with Precompile option set to True.

Problem was that a variable name script used was not passed in. Go figure|||

I have about 30 dtxs that I would like to recompile its scripts to solve this issue. I would like to avoid to open each package, then open each script in the package and do the save to recomplie.

Is there a way to recompile from the command line?

Thanks!

|||

Previously I said "randomly" but I think I have it figured out when this error occurs:

If I am working on a package, open a different package and copy a script object and paste into the one I am working on it will not work in 64-bit without a recompile (but will work in 32 bit).

|||

Chris Honcoop wrote:

Previously I said "randomly" but I think I have it figured out when this error occurs:

If I am working on a package, open a different package and copy a script object and paste into the one I am working on it will not work in 64-bit without a recompile (but will work in 32 bit).

Sounds like it might be a bug. Could you submit it at http://connect.microsoft.com?

-Jamie

sql

JOB With SSIS Step Fails If Package Contains A Script Task

I have a Job Step defined to execute a SSIS Package. This SSIS package contains a Script Task. The Job fails with the message "Package execution failed. The step failed."

I am logging events in the package and when the packages gets to the Script Task the log reports "The script files failed to load". If I disable the Script Task from the package it executes fine.

Curiously, the package runs successfully with the Scritp task enabled using dtexecui and dtexec from the command line.

Only if I include the Package in a job step with the Script Task enabled does it fail.

Any help would be appreciated.I've no real idea about this Steve except to say have you got the script code pre-compiled? If so, try it without (and vica versa).

-Jamie|||

Sorry for not posting this sooner, Jamie...Yes, setting the Script Task "PrecompileScriptIntoBinaryCode" Property to True resolved the issue.

-Steve

|||hey - did you ever get this to work? Im having the same issue - its a SSIS pkg that ran on one box and I moved to another box (64 bit if that makes a diff) - any info is greatly apprecaited - thanks.|||

Juantana,

Yes, set your Script Task "PrecompileScriptIntoBinaryCode" Property=True and then open and close your script. Save, redeploy and it should work. Let me know if you have any questions.

-Steve

|||

Hi,

Inspite of putting the PrecompileScriptintoBinarycode Property = True, it is not working. Do you have any suggestions?

Thanks.

|||After settings Precompile to True, you need to open and close script editor(s) to actually precompile the script in the task. Then re-deploy the pockage to target system.|||Also remove all the break points in the code, having break points prevents from recompilation. I guess this issue would be fixed by SP2|||Just an FYI I had all my scripts set to PrecompileScriptIntoBinaryCode=True however when developing in 32bit and deploying to 64bit seemingly randomly I will get the "script failed to load" error. I just open the script and compile it again and save and that usually does the trick.|||

Also if the problem still persists and you keep getting the same error I am sure you are not taking the dtsx file from bin folder to execute. The file created by designer (Business Intelligence Development Studio) is only useful for debug and development mode. After building the solution one should use dtsx created in bin folder. This solution worked for me.

Thanks

Mohit

|||NOTE: I got this same error message with Precompile option set to True.

Problem was that a variable name script used was not passed in. Go figure|||

I have about 30 dtxs that I would like to recompile its scripts to solve this issue. I would like to avoid to open each package, then open each script in the package and do the save to recomplie.

Is there a way to recompile from the command line?

Thanks!

|||

Previously I said "randomly" but I think I have it figured out when this error occurs:

If I am working on a package, open a different package and copy a script object and paste into the one I am working on it will not work in 64-bit without a recompile (but will work in 32 bit).

|||

Chris Honcoop wrote:

Previously I said "randomly" but I think I have it figured out when this error occurs:

If I am working on a package, open a different package and copy a script object and paste into the one I am working on it will not work in 64-bit without a recompile (but will work in 32 bit).

Sounds like it might be a bug. Could you submit it at http://connect.microsoft.com?

-Jamie

job to read the zip file and insert db

Hi,
I need to grab the zip file on ftp server periodically,
and the zip file contains one text file, then I need to
insert the records into db, Iwould like to automate the
process. How can set it up?
ThanksHi,
Try using pkunzip and BCP IN utilities to perform this.
Thanks
Hari
MCDBA
"Jen" <anonymous@.discussions.microsoft.com> wrote in message
news:0f2101c3b476$4bfeb470$a001280a@.phx.gbl...
> Hi,
> I need to grab the zip file on ftp server periodically,
> and the zip file contains one text file, then I need to
> insert the records into db, Iwould like to automate the
> process. How can set it up?
> Thanks|||Jen,
You can use wzunzip.exe (WinZip command-line) to unzip the file. You can use
ftp -s <filename> to script the ftp (or use something like www.webdrive.com to
make the ftp server look like an NT drive). You can use bcp.exe or bulk insert
or dts to insert the records.
Pull it all together with a few lines of batch file.
> I need to grab the zip file on ftp server periodically,
> and the zip file contains one text file, then I need to
> insert the records into db, Iwould like to automate the
> process. How can set it up?
> Thanks
>
Neil Pike MVP/MCSE. Protech Computing Ltd
Reply here - no email
SQL FAQ (484 entries) see
http://forumsb.compuserve.com/gvforums/UK/default.asp?SRV=MSDevApps
(faqxxx.zip in lib 7)
or www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
or www.sqlserverfaq.com
or www.mssqlserver.com/faq

Friday, February 24, 2012

jdbc with datetime field - unwanted timezone conversion

I have a database which contains records each of which has a datetime field.
The database machine is set up as GMT. I access this data from a different
machine which is running in a different timezone (EST for example). The
value returned by the database appears to be offset by some value based on
the local machine's timezone. I just want the raw GMT value regardless of
what timezone the machine running the jdbc driver is running. Any
suggestions how I do this?
I'm using resultset.getTimestamp() and pushing that to a Calendar object if
that helps.
| Thread-Topic: jdbc with datetime field - unwanted timezone conversion
| thread-index: AcSMj5gnHbLf5bAYTqOU3MRZc9R5+Q==
| X-WBNR-Posting-Host: 209.63.42.209
| From: =?Utf-8?B?VmlydHVhbCBQcm9ncmFtbWVy?= <Virtual
Programmer@.discussions.microsoft.com>
| Subject: jdbc with datetime field - unwanted timezone conversion
| Date: Fri, 27 Aug 2004 16:43:03 -0700
| Lines: 10
| Message-ID: <32B0C910-3926-4060-A13F-4014058F720C@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.jdbcdriver
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.jdbcdriver:6281
| X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
|
| I have a database which contains records each of which has a datetime
field.
| The database machine is set up as GMT. I access this data from a
different
| machine which is running in a different timezone (EST for example). The
| value returned by the database appears to be offset by some value based
on
| the local machine's timezone. I just want the raw GMT value regardless
of
| what timezone the machine running the jdbc driver is running. Any
| suggestions how I do this?
|
| I'm using resultset.getTimestamp() and pushing that to a Calendar object
if
| that helps.
|
If you directly output the "resultset.getTimestamp()" before passing it to
the Calendar object, what is the value that is returned? Can you post the
code you are using to demonstrate this problem? If I change the Regional
Settings on my remote SQL Server to use GMT and then insert a date value, I
can query the information from a separate client machine (in a different
time zone) without a problem.
//create table datetest(col1 datetime)
//go
//insert datetest select getdate()
Class.forName("com.microsoft.jdbc.sqlserver.SQLSer verDriver" );
Connection connection =
DriverManager.getConnection("jdbc:microsoft:sqlser ver://remoteSQL:1433;datab
asename=jdbc", "sa", "password");
// Query the database
Statement stmt = connection.createStatement();
ResultSet rs = null;
rs = stmt.executeQuery("select col1 from datetest");
while (rs.next())
{
Timestamp ts = rs.getTimestamp(1);
System.out.println(ts);
}
rs.close();
stmt.close();
connection.close();
Carb Simien, MCSE MCDBA MCAD
Microsoft Developer Support - Web Data
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
|||Someone in our local user group has suggested what is going on and based on
the evidence, I think he's right (we just figured it out today). Essentially
the issue is this.
The date information is in a datetime field in a SQL Server 2000 database on
a different machine. As I read the docs on the datetime type, there is no
associated timezone. So, when the jdbc driver on my machine gets the value
from the remote database, it has to guess what the timezone is and makes the
assumption that the datetime field in the database server has the same
timezone as the server running the jdbc driver. Unfortunately, in our case,
that isn't true. I know that the value in the database is GMT. If I offset
the value received from the database by the number of milliseconds to GMT
based on the timezone on my machine (in my case, 6 hours from MDT to GMT),
then java shows the correct value.
Your code below is essentially what I did originally. It probably works
fine when you store the datetime from your machine to the remote server and
then it read it back or when all the machines are on the same timezone.
However, try writing the date from the database machine running GMT and then
it read it back on a different machine running a different timezone. Bet you
don't get the same time back.
Someone suggested I try using the getTimestamp() that has a second parameter
as a Calendar with the timezone of the datetime in the database (in my case,
I'd specify GMT). I haven't tried it yet, but the description in the
javadocs sounds promising. I do know that using a TimeZone object to get the
offset to GMT (don't forget to adjust for DST) and using Calendar.add() to
adjust the time seems to solve the problem though it feels kludgy.
Cheers
""Carb Simien [MSFT]"" wrote:

> --
> | Thread-Topic: jdbc with datetime field - unwanted timezone conversion
> | thread-index: AcSMj5gnHbLf5bAYTqOU3MRZc9R5+Q==
> | X-WBNR-Posting-Host: 209.63.42.209
> | From: =?Utf-8?B?VmlydHVhbCBQcm9ncmFtbWVy?= <Virtual
> Programmer@.discussions.microsoft.com>
> | Subject: jdbc with datetime field - unwanted timezone conversion
> | Date: Fri, 27 Aug 2004 16:43:03 -0700
> | Lines: 10
> | Message-ID: <32B0C910-3926-4060-A13F-4014058F720C@.microsoft.com>
> | MIME-Version: 1.0
> | Content-Type: text/plain;
> | charset="Utf-8"
> | Content-Transfer-Encoding: 7bit
> | X-Newsreader: Microsoft CDO for Windows 2000
> | Content-Class: urn:content-classes:message
> | Importance: normal
> | Priority: normal
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> | Newsgroups: microsoft.public.sqlserver.jdbcdriver
> | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> | Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
> | Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.jdbcdriver:6281
> | X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
> |
> | I have a database which contains records each of which has a datetime
> field.
> | The database machine is set up as GMT. I access this data from a
> different
> | machine which is running in a different timezone (EST for example). The
> | value returned by the database appears to be offset by some value based
> on
> | the local machine's timezone. I just want the raw GMT value regardless
> of
> | what timezone the machine running the jdbc driver is running. Any
> | suggestions how I do this?
> |
> | I'm using resultset.getTimestamp() and pushing that to a Calendar object
> if
> | that helps.
> |
> If you directly output the "resultset.getTimestamp()" before passing it to
> the Calendar object, what is the value that is returned? Can you post the
> code you are using to demonstrate this problem? If I change the Regional
> Settings on my remote SQL Server to use GMT and then insert a date value, I
> can query the information from a separate client machine (in a different
> time zone) without a problem.
> //create table datetest(col1 datetime)
> //go
> //insert datetest select getdate()
> Class.forName("com.microsoft.jdbc.sqlserver.SQLSer verDriver" );
> Connection connection =
> DriverManager.getConnection("jdbc:microsoft:sqlser ver://remoteSQL:1433;datab
> asename=jdbc", "sa", "password");
> // Query the database
> Statement stmt = connection.createStatement();
> ResultSet rs = null;
> rs = stmt.executeQuery("select col1 from datetest");
> while (rs.next())
> {
> Timestamp ts = rs.getTimestamp(1);
> System.out.println(ts);
> }
> rs.close();
> stmt.close();
> connection.close();
> Carb Simien, MCSE MCDBA MCAD
> Microsoft Developer Support - Web Data
> Please reply only to the newsgroups.
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Are you secure? For information about the Strategic Technology Protection
> Program and to order your FREE Security Tool Kit, please visit
> http://www.microsoft.com/security.
>