Showing posts with label saved. Show all posts
Showing posts with label saved. Show all posts

Monday, March 26, 2012

Running a local package

Is it possible to make a local package run everytime a record is saved to my
database?
Hi
I am not sure what you mean by local package, but you could run a DTS
package run a trigger, although it may not be advisable. Depending on what
you really want to do, there may be some other method.
John
"johnfli" <john@.here.com> wrote in message
news:u8OqaWu4EHA.1392@.tk2msftngp13.phx.gbl...
> Is it possible to make a local package run everytime a record is saved to
> my
> database?
>
|||I have a DTS package that is currently set every 30 min. that goes through
the database and any fields that has blank fields, it makes them NULL.
I was wondering if there was a way to have it run through and do that every
time a user enters in a new record.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:u2RPDtu4EHA.4028@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> Hi
> I am not sure what you mean by local package, but you could run a DTS
> package run a trigger, although it may not be advisable. Depending on what
> you really want to do, there may be some other method.
> John
> "johnfli" <john@.here.com> wrote in message
> news:u8OqaWu4EHA.1392@.tk2msftngp13.phx.gbl...
to
>
|||You could use Check Constraints to disallow empty strings. That would fail
the insert or update. The other option would be to code triggers that would
replace undesireable data.
Sincerely,
Anthony Thomas

"johnfli" <john@.here.com> wrote in message
news:%23%23$JCUv4EHA.2196@.TK2MSFTNGP14.phx.gbl...
I have a DTS package that is currently set every 30 min. that goes through
the database and any fields that has blank fields, it makes them NULL.
I was wondering if there was a way to have it run through and do that every
time a user enters in a new record.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:u2RPDtu4EHA.4028@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> Hi
> I am not sure what you mean by local package, but you could run a DTS
> package run a trigger, although it may not be advisable. Depending on what
> you really want to do, there may be some other method.
> John
> "johnfli" <john@.here.com> wrote in message
> news:u8OqaWu4EHA.1392@.tk2msftngp13.phx.gbl...
to
>
|||Hi
I think the best way to do this would be to change the insert statement to
use NULLIF(). Failing that you can use an instead of trigger to do the same
thing.
John
"johnfli" <john@.here.com> wrote in message
news:%23%23$JCUv4EHA.2196@.TK2MSFTNGP14.phx.gbl...
>I have a DTS package that is currently set every 30 min. that goes through
> the database and any fields that has blank fields, it makes them NULL.
> I was wondering if there was a way to have it run through and do that
> every
> time a user enters in a new record.
>
>
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:u2RPDtu4EHA.4028@.TK2MSFTNGP15.phx.gbl...
> to
>
sql

Running a local package

Is it possible to make a local package run everytime a record is saved to my
database?Hi
I am not sure what you mean by local package, but you could run a DTS
package run a trigger, although it may not be advisable. Depending on what
you really want to do, there may be some other method.
John
"johnfli" <john@.here.com> wrote in message
news:u8OqaWu4EHA.1392@.tk2msftngp13.phx.gbl...
> Is it possible to make a local package run everytime a record is saved to
> my
> database?
>|||I have a DTS package that is currently set every 30 min. that goes through
the database and any fields that has blank fields, it makes them NULL.
I was wondering if there was a way to have it run through and do that every
time a user enters in a new record.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:u2RPDtu4EHA.4028@.TK2MSFTNGP15.phx.gbl...
> Hi
> I am not sure what you mean by local package, but you could run a DTS
> package run a trigger, although it may not be advisable. Depending on what
> you really want to do, there may be some other method.
> John
> "johnfli" <john@.here.com> wrote in message
> news:u8OqaWu4EHA.1392@.tk2msftngp13.phx.gbl...
> > Is it possible to make a local package run everytime a record is saved
to
> > my
> > database?
> >
> >
>|||You could use Check Constraints to disallow empty strings. That would fail
the insert or update. The other option would be to code triggers that would
replace undesireable data.
Sincerely,
Anthony Thomas
"johnfli" <john@.here.com> wrote in message
news:%23%23$JCUv4EHA.2196@.TK2MSFTNGP14.phx.gbl...
I have a DTS package that is currently set every 30 min. that goes through
the database and any fields that has blank fields, it makes them NULL.
I was wondering if there was a way to have it run through and do that every
time a user enters in a new record.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:u2RPDtu4EHA.4028@.TK2MSFTNGP15.phx.gbl...
> Hi
> I am not sure what you mean by local package, but you could run a DTS
> package run a trigger, although it may not be advisable. Depending on what
> you really want to do, there may be some other method.
> John
> "johnfli" <john@.here.com> wrote in message
> news:u8OqaWu4EHA.1392@.tk2msftngp13.phx.gbl...
> > Is it possible to make a local package run everytime a record is saved
to
> > my
> > database?
> >
> >
>|||Hi
I think the best way to do this would be to change the insert statement to
use NULLIF(). Failing that you can use an instead of trigger to do the same
thing.
John
"johnfli" <john@.here.com> wrote in message
news:%23%23$JCUv4EHA.2196@.TK2MSFTNGP14.phx.gbl...
>I have a DTS package that is currently set every 30 min. that goes through
> the database and any fields that has blank fields, it makes them NULL.
> I was wondering if there was a way to have it run through and do that
> every
> time a user enters in a new record.
>
>
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:u2RPDtu4EHA.4028@.TK2MSFTNGP15.phx.gbl...
>> Hi
>> I am not sure what you mean by local package, but you could run a DTS
>> package run a trigger, although it may not be advisable. Depending on
>> what
>> you really want to do, there may be some other method.
>> John
>> "johnfli" <john@.here.com> wrote in message
>> news:u8OqaWu4EHA.1392@.tk2msftngp13.phx.gbl...
>> > Is it possible to make a local package run everytime a record is saved
> to
>> > my
>> > database?
>> >
>> >
>>
>

Friday, March 23, 2012

rundts from within a stored procedure

I saved a dts package as a structured storage file and put it in a directory.

I'm trying to call and run it with the following stored procedure-

CREATE PROCEDURE run_dts AS

DECLARE @.object int
DECLARE @.hr int

--create a package object
EXEC @.hr = sp_OACreate 'DTS.Package', @.object OUTPUT
if @.hr <> 0
BEGIN
print 'error create DTS.Package'
RETURN
END

EXEC @.hr = sp_OAMethod @.object, 'LoadFromStorageFile',
NULL, '\\server\directory\billing.dts', ''
IF @.hr <> 0
BEGIN
print 'error LoadFromStorageFile'
RETURN
END

EXEC @.hr = sp_OAMethod @.object, 'Execute'
IF @.hr <> 0
BEGIN
print 'Execute failed'
RETURN
END
GO

If I run this from query analyzer, it gives me "The command(s) completed successfully," but the dts doesn't run?

Any ideas?try checking the permission context\owner of the the stored procedure vs. that of the DTS package.

Tuesday, March 20, 2012

Run saved DTS package in 2005

I have saved a DTS Package, in sql serv 2005. How do i run it ? I cant fiqure it outLiar.

You do not have a saved DTS package in 2005. 2005 does not support DTS packages.

Shame on you for trying to decieve people!|||You need to make sure the DTS runtime has been installed.

http://msdn2.microsoft.com/en-us/library/ms143706(SQL.90).aspx|||Blindman -- must be

When talking about dts i was referring to the equivalent, guess that was to much logic for you to handle|||I have saved a DTS Package, in sql serv 2005. How do i run it ? I cant fiqure it out

Manually or scheduled?

In the BI Dev Studio you just right click to run. If you run as a job, then just choose the package when you set up the job step(s).|||Blindman -- must be

When talking about dts i was referring to the equivalent, guess that was to much logic for you to handleBlind leading the blind. You need to be clear, because you can access SQL 2000 database from the 2005 Management studio and even see a list of DTS packages, but you can't edit or run them.

Thus, the need for clarity...

Wednesday, March 7, 2012

Run all .sql files in a folder

I have created scripts to create approximately 200 tables. I have all of
these .sql files saved in a folder on a server. Is there a way to execute o
r
run all of the files at once in this folder instead of running them one at a
time?
ThanksYou could write a batch file - use a 'for' loop and call osql passing the
file path and other appropriate parameters.
"bbasile" wrote:

> I have created scripts to create approximately 200 tables. I have all of
> these .sql files saved in a folder on a server. Is there a way to execute
or
> run all of the files at once in this folder instead of running them one at
a
> time?
> Thanks|||Sounds good. Are there any examples out there I could take a look at?
"KH" wrote:
> You could write a batch file - use a 'for' loop and call osql passing the
> file path and other appropriate parameters.
>
> "bbasile" wrote:
>|||that's exactly what I was going to suggest.
another way would be to use the OA methods and FileSystemObjects to load
each of the files and then execute them.
> You could write a batch file - use a 'for' loop and call osql passing the
> file path and other appropriate parameters.
>
> "bbasile" wrote:
>
new

RUN A SAVED SSIS Package in 2005

I saved a SSIS ( data Import package in SQL SERV 2005)
how can i run it??I'm also interested to know. is it a must to have at least standard edition in order to run a SSIS (.dtsx file) package? Is it possible to use an alternative to execute it on ad hoc basis?