dbTalk Databases Forums  

AcxtiveX in DTS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss AcxtiveX in DTS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
sanghun jung
 
Posts: n/a

Default AcxtiveX in DTS - 02-05-2004 , 09:29 AM






Hi there,
Background - Win2000 server, SQL2000 with SP3
I have a table with 10 columns. Each column has either 0
or 1. Values are changed everyday by users.
At night, A DTS kicks off and read the value, if 0 then do
nothing, if 1 then kick off another DTS package to update
some data. In ActiveX script, if it is 0, then skip this
part, not as a failure. Once it calls DTS, ActiveX reset
the value to 0 to the appropreate column.

Can ActiveX do this job? Can you show me sample of code
that will do this or any links that I may see some ActiveX
code?

Thanks in advance.
sanghun



Reply With Quote
  #2  
Old   
Valmir Meneses
 
Posts: n/a

Default RE: AcxtiveX in DTS - 02-05-2004 , 10:01 AM






Hi sanghun ,
Let me ask you something.
Why is this done in a DTS?
You have a SQL table and is going to update other SQL tables according to some business rule.
For the enunciate provided, this is a Stored Procedure suited task.
Please provide further information.
Bye,


----- sanghun jung wrote: -----

Hi there,
Background - Win2000 server, SQL2000 with SP3
I have a table with 10 columns. Each column has either 0
or 1. Values are changed everyday by users.
At night, A DTS kicks off and read the value, if 0 then do
nothing, if 1 then kick off another DTS package to update
some data. In ActiveX script, if it is 0, then skip this
part, not as a failure. Once it calls DTS, ActiveX reset
the value to 0 to the appropreate column.

Can ActiveX do this job? Can you show me sample of code
that will do this or any links that I may see some ActiveX
code?

Thanks in advance.
sanghun




Reply With Quote
  #3  
Old   
sanghun
 
Posts: n/a

Default RE: AcxtiveX in DTS - 02-05-2004 , 10:38 AM



Hi, Valmir
Thanks for your interesting on my problem.
First, some thing needs to read values(either 0 = no run
DTS, 1 = run DTS) from each column (about 10 columns) in
a "readme" table. Each column has different DTS that will
update tables. So "readme" table is the guy that tell you
what to run for tonight. Users set the switch during
office hours.

1. Stored Procedure, how can I make SP will read the
readme table and find out what DTSs need to run tonight?
2. All the DTSs do nothing but truncate prod-table and
copy all data from test-table when they execute.

I am a DBA newbie (about three months now), has not touch
SP yet. I will be glad to work on SP. If you can help me
out on this, I will appreciate it.

Thanks
Sanghun

Quote:
-----Original Message-----
Hi sanghun ,
Let me ask you something.
Why is this done in a DTS?
You have a SQL table and is going to update other SQL
tables according to some business rule.
For the enunciate provided, this is a Stored Procedure
suited task.
Please provide further information.
Bye,


----- sanghun jung wrote: -----

Hi there,
Background - Win2000 server, SQL2000 with SP3
I have a table with 10 columns. Each column has
either 0
or 1. Values are changed everyday by users.
At night, A DTS kicks off and read the value, if 0
then do
nothing, if 1 then kick off another DTS package to
update
some data. In ActiveX script, if it is 0, then skip
this
part, not as a failure. Once it calls DTS, ActiveX
reset
the value to 0 to the appropreate column.

Can ActiveX do this job? Can you show me sample of
code
that will do this or any links that I may see some
ActiveX
code?

Thanks in advance.
sanghun



.


Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: AcxtiveX in DTS - 02-05-2004 , 10:39 AM



I agree that for the most part of this it could be done using a Stored Proc.
The only thing is if the DTS packages do more than just push data between A
and B. They may have to read from the file system, call a batch file, do
string manipulation (TSQL is not very good at this).

Maybe a more detailed explanation with DDL etc is called for?

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Valmir Meneses" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi sanghun ,
Let me ask you something.
Why is this done in a DTS?
You have a SQL table and is going to update other SQL tables according to
some business rule.
For the enunciate provided, this is a Stored Procedure suited task.
Please provide further information.
Bye,


----- sanghun jung wrote: -----

Hi there,
Background - Win2000 server, SQL2000 with SP3
I have a table with 10 columns. Each column has either 0
or 1. Values are changed everyday by users.
At night, A DTS kicks off and read the value, if 0 then do
nothing, if 1 then kick off another DTS package to update
some data. In ActiveX script, if it is 0, then skip this
part, not as a failure. Once it calls DTS, ActiveX reset
the value to 0 to the appropreate column.

Can ActiveX do this job? Can you show me sample of code
that will do this or any links that I may see some ActiveX
code?

Thanks in advance.
sanghun






Reply With Quote
  #5  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: AcxtiveX in DTS - 02-05-2004 , 10:50 AM



In which case you can do all this without DTS although it will provide you
with a nice GUI

I would have something like

say you have a table with columns 1-10 and each could be set to 0 or 1)

IF (SELECT Count(*) FOM TABLE WHERE col1 = 1) >0 THEN
BEGIN
TSQL steps
END

IF (SELECT Count(*) FOM TABLE WHERE col2 = 1) >0 THEN
BEGIN
TSQL Steps
END

IF (SELECT Count(*) FOM TABLE WHERE col3 = 1) >0 THEN
BEGIN
TSQL Steps
END


The only difficulty comes if the other tables you manipulate are on a
different server. For this you can use a linked server or two.


--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"sanghun" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi, Valmir
Thanks for your interesting on my problem.
First, some thing needs to read values(either 0 = no run
DTS, 1 = run DTS) from each column (about 10 columns) in
a "readme" table. Each column has different DTS that will
update tables. So "readme" table is the guy that tell you
what to run for tonight. Users set the switch during
office hours.

1. Stored Procedure, how can I make SP will read the
readme table and find out what DTSs need to run tonight?
2. All the DTSs do nothing but truncate prod-table and
copy all data from test-table when they execute.

I am a DBA newbie (about three months now), has not touch
SP yet. I will be glad to work on SP. If you can help me
out on this, I will appreciate it.

Thanks
Sanghun

-----Original Message-----
Hi sanghun ,
Let me ask you something.
Why is this done in a DTS?
You have a SQL table and is going to update other SQL
tables according to some business rule.
For the enunciate provided, this is a Stored Procedure
suited task.
Please provide further information.
Bye,


----- sanghun jung wrote: -----

Hi there,
Background - Win2000 server, SQL2000 with SP3
I have a table with 10 columns. Each column has
either 0
or 1. Values are changed everyday by users.
At night, A DTS kicks off and read the value, if 0
then do
nothing, if 1 then kick off another DTS package to
update
some data. In ActiveX script, if it is 0, then skip
this
part, not as a failure. Once it calls DTS, ActiveX
reset
the value to 0 to the appropreate column.

Can ActiveX do this job? Can you show me sample of
code
that will do this or any links that I may see some
ActiveX
code?

Thanks in advance.
sanghun



.




Reply With Quote
  #6  
Old   
sanghun
 
Posts: n/a

Default Re: AcxtiveX in DTS - 02-05-2004 , 11:56 AM



Two DBs (prod and test) are reside on same SQL server.
This is dealing with pure SQL tables. As I said Test
tables to Prod tables.

Can we send email each other for further advice?
sang_h_jung (AT) uhc (DOT) com
Sanghun
Quote:
-----Original Message-----
In which case you can do all this without DTS although it
will provide you
with a nice GUI

I would have something like

say you have a table with columns 1-10 and each could be
set to 0 or 1)

IF (SELECT Count(*) FOM TABLE WHERE col1 = 1) >0 THEN
BEGIN
TSQL steps
END

IF (SELECT Count(*) FOM TABLE WHERE col2 = 1) >0 THEN
BEGIN
TSQL Steps
END

IF (SELECT Count(*) FOM TABLE WHERE col3 = 1) >0 THEN
BEGIN
TSQL Steps
END


The only difficulty comes if the other tables you
manipulate are on a
different server. For this you can use a linked server
or two.


--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"sanghun" <anonymous (AT) discussions (DOT) microsoft.com> wrote in
message
news:a24901c3ec06$820c02d0$a101280a (AT) phx (DOT) gbl...
Hi, Valmir
Thanks for your interesting on my problem.
First, some thing needs to read values(either 0 = no run
DTS, 1 = run DTS) from each column (about 10 columns) in
a "readme" table. Each column has different DTS that
will
update tables. So "readme" table is the guy that tell
you
what to run for tonight. Users set the switch during
office hours.

1. Stored Procedure, how can I make SP will read the
readme table and find out what DTSs need to run tonight?
2. All the DTSs do nothing but truncate prod-table and
copy all data from test-table when they execute.

I am a DBA newbie (about three months now), has not
touch
SP yet. I will be glad to work on SP. If you can help
me
out on this, I will appreciate it.

Thanks
Sanghun

-----Original Message-----
Hi sanghun ,
Let me ask you something.
Why is this done in a DTS?
You have a SQL table and is going to update other SQL
tables according to some business rule.
For the enunciate provided, this is a Stored Procedure
suited task.
Please provide further information.
Bye,


----- sanghun jung wrote: -----

Hi there,
Background - Win2000 server, SQL2000 with SP3
I have a table with 10 columns. Each column has
either 0
or 1. Values are changed everyday by users.
At night, A DTS kicks off and read the value, if 0
then do
nothing, if 1 then kick off another DTS package to
update
some data. In ActiveX script, if it is 0, then
skip
this
part, not as a failure. Once it calls DTS, ActiveX
reset
the value to 0 to the appropreate column.

Can ActiveX do this job? Can you show me sample
of
code
that will do this or any links that I may see some
ActiveX
code?

Thanks in advance.
sanghun



.



.


Reply With Quote
  #7  
Old   
Sanghun
 
Posts: n/a

Default RE: AcxtiveX in DTS - 02-05-2004 , 11:59 AM



Yes, that it.
This is dealing with pure SQL tables, test tables to prod
tables.
You got me correct! I can give you specific info. but I
would like to use email. Is that okay with you?
sang_h_jung (AT) uhc (DOT) com
Send me short email please, this way I can get yours.

Thanks
Sanghun
Quote:
-----Original Message-----
Hi sanghun,
Please validate my understanding of your necessity.

1. read record in readme
2. If col_1 = 1
Update Table A (or set flag to update Table A
after hours)
Update Table B (or set flag to update Table B
after hours)
Update Col_1 to 0

3. If col_2 = 1
Update Table C (or set flag to update Table C
after hours)
Update Table D (or set flag to update Table D
after hours)
Update Col_2 to 0

and so on...

8. After Hours... I read the flags and run the Truncate
and Update command.

All this is done within SQL Tables ? Is that it?



----- sanghun wrote: -----

Hi, Valmir
Thanks for your interesting on my problem.
First, some thing needs to read values(either 0 = no
run
DTS, 1 = run DTS) from each column (about 10
columns) in
a "readme" table. Each column has different DTS
that will
update tables. So "readme" table is the guy that
tell you
what to run for tonight. Users set the switch
during
office hours.

1. Stored Procedure, how can I make SP will read the
readme table and find out what DTSs need to run
tonight?
2. All the DTSs do nothing but truncate prod-table
and
copy all data from test-table when they execute.

I am a DBA newbie (about three months now), has not
touch
SP yet. I will be glad to work on SP. If you can
help me
out on this, I will appreciate it.

Thanks
Sanghun

-----Original Message-----
Hi sanghun ,
Let me ask you something.
Why is this done in a DTS?
You have a SQL table and is going to update other
SQL
tables according to some business rule.
For the enunciate provided, this is a Stored
Procedure
suited task.
Please provide further information.
Bye,
----- sanghun jung wrote: -----
Hi there,
Background - Win2000 server, SQL2000 with SP3
I have a table with 10 columns. Each column
has
either 0
or 1. Values are changed everyday by users.
At night, A DTS kicks off and read the value,
if 0
then do
nothing, if 1 then kick off another DTS
package to
update
some data. In ActiveX script, if it is 0, then
skip
this
part, not as a failure. Once it calls DTS,
ActiveX
reset
the value to 0 to the appropreate column.
Can ActiveX do this job? Can you show me
sample of
code
that will do this or any links that I may see
some
ActiveX
code?
Thanks in advance.
sanghun
.

.


Reply With Quote
  #8  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: AcxtiveX in DTS - 02-05-2004 , 01:41 PM



Then my example holds good.

BTW Test and Production databases should not be on the same server.

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"sanghun" <sang_h_jung (AT) uhc (DOT) com> wrote

Quote:
Two DBs (prod and test) are reside on same SQL server.
This is dealing with pure SQL tables. As I said Test
tables to Prod tables.

Can we send email each other for further advice?
sang_h_jung (AT) uhc (DOT) com
Sanghun
-----Original Message-----
In which case you can do all this without DTS although it
will provide you
with a nice GUI

I would have something like

say you have a table with columns 1-10 and each could be
set to 0 or 1)

IF (SELECT Count(*) FOM TABLE WHERE col1 = 1) >0 THEN
BEGIN
TSQL steps
END

IF (SELECT Count(*) FOM TABLE WHERE col2 = 1) >0 THEN
BEGIN
TSQL Steps
END

IF (SELECT Count(*) FOM TABLE WHERE col3 = 1) >0 THEN
BEGIN
TSQL Steps
END


The only difficulty comes if the other tables you
manipulate are on a
different server. For this you can use a linked server
or two.


--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"sanghun" <anonymous (AT) discussions (DOT) microsoft.com> wrote in
message
news:a24901c3ec06$820c02d0$a101280a (AT) phx (DOT) gbl...
Hi, Valmir
Thanks for your interesting on my problem.
First, some thing needs to read values(either 0 = no run
DTS, 1 = run DTS) from each column (about 10 columns) in
a "readme" table. Each column has different DTS that
will
update tables. So "readme" table is the guy that tell
you
what to run for tonight. Users set the switch during
office hours.

1. Stored Procedure, how can I make SP will read the
readme table and find out what DTSs need to run tonight?
2. All the DTSs do nothing but truncate prod-table and
copy all data from test-table when they execute.

I am a DBA newbie (about three months now), has not
touch
SP yet. I will be glad to work on SP. If you can help
me
out on this, I will appreciate it.

Thanks
Sanghun

-----Original Message-----
Hi sanghun ,
Let me ask you something.
Why is this done in a DTS?
You have a SQL table and is going to update other SQL
tables according to some business rule.
For the enunciate provided, this is a Stored Procedure
suited task.
Please provide further information.
Bye,


----- sanghun jung wrote: -----

Hi there,
Background - Win2000 server, SQL2000 with SP3
I have a table with 10 columns. Each column has
either 0
or 1. Values are changed everyday by users.
At night, A DTS kicks off and read the value, if 0
then do
nothing, if 1 then kick off another DTS package to
update
some data. In ActiveX script, if it is 0, then
skip
this
part, not as a failure. Once it calls DTS, ActiveX
reset
the value to 0 to the appropreate column.

Can ActiveX do this job? Can you show me sample
of
code
that will do this or any links that I may see some
ActiveX
code?

Thanks in advance.
sanghun



.



.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.