Showing posts with label agent. Show all posts
Showing posts with label agent. Show all posts

Monday, March 19, 2012

BIDS is not acceptable - to "heavy"

Hello everybody!

I have a question - is it possible to visualize an execution of the SSIS package when it is being run from SQL Agent? "Visualize" means to show a data-flow "live" - similair to the visualization provided by BI Dev.Studio when you run a package there, with coloured boxes, blinking etc.

I searched the Web but found nothing - neither MS-related nor utilities from third parties. Is it possible in any way?

Thanks in advance,

Andrey.

P.S. Parsing log-files is an option, but we would like to try first something less "painfull" and more universal...

To the best of my knowledge, no such tool exists.

Why not simply run the package from BIDS when you require the visualization?

|||

Just because we do not want to install BIDS in order to run a couple of SSIS packages. We thought of some utility ot "light-weight" version of it invoked when package is run.

And thanks for the information.

Regards,

A.G.

|||Yep, no tool exists, other than BIDS. Is the real-time log/output of the package not enough?|||

Thanks a lot! We will think about other solution - perhaps, log-based.

Regards,

A.G.

|||Sorry I couldn't help - good luck!|||

Hi:

I have had requests for such a UI too. Once you show users a package running in BIDS, they just love it, and want to see it running that way.

It is also a useful aid in Requirements and Design reviews.

Is there some place we can request Microsoft for a feature like this?

TIA

Kar

|||connect.microsoft.com|||Hello.

To be honest, I'm not sure that MS will implement your request ever. This tool is not interesting for marketing. It has no real sales potential.

Regards,
Andrey

Sunday, February 19, 2012

Best way to schedule a package to run during the day

Hi,

What is the best way to schedule a package to run every 30 minutes during the day. Would it be using SQL Agent Jobs? If so, what is the things I need to consider.

Thank you,

Aldo

Hi ya,

Yes it would be Sql Server Agent job. You would need to make the package and then deploy it to either Sql Server or File system. You will get errors if the Agent credentials running agent service is different then your package credentials. If that is the case search for either Sql Agent proxy or SSIS jobs not running in Sql Server agent and you will find loads of posts.

The rest is pretty easy. You would create a new job in agent and then for daily frequency put it as 30 minutes.

Hope this helps


Cheers

Rizwan

|||Thanks you!

Friday, February 10, 2012

Best way to backup a database,

Hi,

Does anyone have a preference on how they back up their database?

Currently I do it via a SQL Server Agent Job, that runs some T-SQL to backup the system database, and backup the user databases and transaction logs (where appropriate).

I was thinking about moving this to a VBScript for the reason that it will allow me to (easily) write to a log and email the relevant people (i.e. if a backup succeeds or fails).

Question is, in SQL (T-SQL), is there an easy way to write to a text file, and send out an email? (does sendmail require outlook to be installed on the server?)

Thanks again!.You can set up your backups through Enterprise Manager. When you enable a schedule for the backup, the backup is added as a job. For that job you can setup notifications eg mail and adding results to the application log.
To send mails, sql server needs a mapi compliant mail program, which can be Outlook.|||I do my backups with a T-SQL script. You can send emails from the script using xp_sendmail. Why write a text file log? You can write to a database table instead, which can provide a lot more functionality for a logviewer GUI.

Instead of doing incremental backups of my larger databases (which get progressively larger), I write a complete backup everyday to a network disk that has seperate folders for each day. I also do a shrink and translog truncate before the backup runs. Here's my script for the backup step:

DECLARE @.day_of_week VARCHAR(15),
@.server_name VARCHAR(25),
@.db_location_string VARCHAR(128),
@.log_location_string VARCHAR(128),
@.database_name VARCHAR(128)

DECLARE database_cursor CURSOR FOR
SELECT [name] as DBNAME FROM sysdatabases
WHERE [name] NOT IN ('master', 'model', 'msdb', 'tempdb')

SET @.day_of_week=DATENAME(dw, GETDATE())
SET @.server_name=@.@.SERVERNAME

OPEN database_cursor
FETCH NEXT FROM database_cursor INTO @.database_name

WHILE @.@.FETCH_STATUS=0
BEGIN
SET @.db_location_string='\\myServer\SQL Backups\' + @.day_of_week + '\SQL\' + @.server_name + '\' + @.database_name + '.bak'
SET @.log_location_string='\\myServer\SQL Backups\' + @.day_of_week + '\SQL\' + @.server_name + '\' + @.database_name + '_log.bak'
BACKUP DATABASE @.database_name TO DISK = @.db_location_string WITH NOINIT , NOUNLOAD , NAME = @.database_name, NOSKIP , STATS = 10, NOFORMAT
--BACKUP LOG @.database_name TO DISK = @.log_location_string WITH NOINIT , NOUNLOAD , NAME = @.database_name, NOSKIP , STATS = 10, NOFORMAT
FETCH NEXT FROM database_cursor INTO @.database_name
END
CLOSE database_cursor
DEALLOCATE database_cursor|||Oh, if you don;t have your server set up for SQL Mail, which is, frankly, a pain, you can add a VBScript step to your back job that sends mail using the CDONTS object.

Configure your backup step to on failure, go to the send mail step, otherwise skip it.|||Thanks for the advice.

All suggestions taken on board.|||bpdWork:

Thank you so much for sharing your sql script. I might be able to use that in a new backup plan I am working on. One question, however, and I know this is asking a lot. Do you have another script that will restore all these databases?

Thanks
Tom|||nevermind that last question, it was too easy!

Thanks
Tommy