Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ninel
Posting Yak Master
141 Posts |
Posted - 2006-08-22 : 11:31:31
|
I have a web application that prompts a user for some info and creates databases on the fly with VB.NET.Multiple databases can be created in one day. I need to create a DTS package that will be scheduled to run daily. This dts gathers some info on each database that got created. For example, 5 databases were created.The DTS creates an email with some statistics in the body of the email and a csv file attachment of some info from the databases. At this point I haven't decided (or actually wasn't told by my manager) if the package should create:1. separate emails (in this cases 5 emails) with the csv file attached to each email and stats in the body OR 2. one email with 5 attachments (for each db) and stats of all 5 dbs in the body OR3. one email with one attachment, but 5 worksheets and stats of all 5 dbs in the body.Are all of these scenaries possible within a DTS package. Remember, I won't know how many databases were created. I'd have to figure that out dynamically.Thanks,Ninel |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-08-22 : 11:49:32
|
Sure it's possible.Would be simpler using t-sql though - depends if you have a sql server on which you are happy to use xp_sendmail or some other email accesible from t-sql.Probably would use vb.net rather than dts if it had to be an app.You can get the create date of the database from master..sysdatabases which you could use to key the email (watch out for tempdb).==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
|
|
|