05-02-08, 06:12 #1Registered User
- Join Date
- Nov 2007
Unanswered: Database maintenance plan without using the wizard
I need a way to create a database maintenance plan in SQL Server 2000, without using the wizard. So, I am looking for a way to create this plan either using TSQL or (even better) using VB6 code (maybe by using SQLDMO library). I want the end-user of my vb6 application to decide for the options of the plan (like scheduling or backup directory). Does anybody have any sample vb6 code for doing this?
Thanks in advance.
05-02-08, 09:10 #2Annie's Dog Walker
Provided Answers: 6
- Join Date
- Nov 2004
- on the wrong server
you can do all of this in T-SQL using the BACKUP command, DBCC CHECKDB and DBCC DBREINDEX. See BOL for details and command options. To allow users to configure options from the front end, you are going to have to use dynamic sql.If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry. Earnest Hemingway, A Farewell To Arms.