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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 BackUp TextReports

Author  Topic 

acko
Yak Posting Veteran

52 Posts

Posted - 2004-04-13 : 03:43:38
Hi
How can i make textreports after backup with t-sql without using Database Maintenance Plan.
thanks
alex

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-04-13 : 12:30:12
What kind of information do you want to write out? You can use xp_cmdshell to get to files.

Tara
Go to Top of Page

acko
Yak Posting Veteran

52 Posts

Posted - 2004-04-14 : 03:03:02
I would like the same informations just the DMPlan would create for me:

Microsoft (R) SQLMaint Utility (Unicode), Version Logged on to SQL Server 'AckoSQL' as 'Acko\sqlcluster' (trusted)
Starting maintenance plan 'MaintPlanFullBACKUPnaAcko' on 4/14/2004 1:30:01 AM
[1] Database Example: Database Backup...
Destination: [\\Acko\DbFull\Example_db_200404140130.BAK]

** Execution Time: 1 hrs, 6 mins, 59 secs **

[2] Database Example: Verifying Backup...

** Execution Time: 1 hrs, 0 mins, 12 secs **

[3] Database Example: Delete Old Backup Files...
1 file(s) deleted.

Deleting old text reports... 1 file(s) deleted.

End of maintenance plan 'MaintPlanFullBACKUPnaAcko' on 4/14/2004 3:37:13 AM
SQLMAINT.EXE Process Exit Code: 0 (Success)

----
Thanks
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-04-14 : 10:47:28
Create a stored procedure to do your backups.

In the stored procedure print a status statement with GETDATE() at whatever stage you desire to capture the datetime.

Either insert this into a table or print it.

If you PRINT, you can run from a SQL Agent Job and have the output written to a log file. The log file will hold the status of the backup and any print statement you have used.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page
   

- Advertisement -