Showing posts with label guru. Show all posts
Showing posts with label guru. Show all posts

Friday, March 23, 2012

Need DTS/VBScript guru

I am trying to write a DTS package at work that uses a loop to fire a query off against a different server/database at each loop iteration. Prior to the execute SQL task , I use ActiveX (VBScript) to change the Catalog and DataSource of the connection (created by drag and drop if icon). My Execute SQL task selects @.@.servername and getdate() just as a dummy query to make sure I am actually pointed at a different server.

While testing the properties of the connection using global variables and msgbox shows that the database (catalog) and server (data source) ip address is being changed, the result returned is always from the first server. I feel like I need to disconnect the connection object, change the parameters and then reconnect to the new server but there doesn't appear to be anyway to do this.

Anyone out there able to successfully change a connection object inthis manner??I figured it out myself but just in case anyone else has this problem:

In order to use activeX to change a connection object DataSource/Catalog (server/database) from one SQL server to another one (different physical box) via ActiveX Script task you must set the RESUABLE property to 0 rather than the value -1 as mine had defaulted to. Now it all works like a charm...

Wednesday, March 7, 2012

Need a guru

To all guru's:
I have something that sounds simple in theroy, but I haven't quite figured
out what I need to do to accomplish this. Simply put here is what I'd like t
o
do.
1. User logs into database/application
2. Upon login, update a table that contains the users login name (not
sysxlogins or sysusers) with the time of the login.
I've tried several update scripts, but none of them work. I think I'm at a
wall and hoping someone could provide a sample of what I could do to
accomplish this.If it's via an application, you could easily trigger a customised stored
procedure that logs username/date into a table.
i.e create sp to insert data , exec sp when logging in
--
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
___________________________________
"Big Ern" <BigErn@.discussions.microsoft.com> wrote in message
news:7F42AC1C-775B-4900-91B7-47CD4A3F13F0@.microsoft.com...
> To all guru's:
> I have something that sounds simple in theroy, but I haven't quite figured
> out what I need to do to accomplish this. Simply put here is what I'd like
to
> do.
> 1. User logs into database/application
> 2. Upon login, update a table that contains the users login name (not
> sysxlogins or sysusers) with the time of the login.
> I've tried several update scripts, but none of them work. I think I'm at a
> wall and hoping someone could provide a sample of what I could do to
> accomplish this.