Showing posts with label maintenance. Show all posts
Showing posts with label maintenance. Show all posts

Wednesday, March 7, 2012

Data Base Maintenance Plan

I have set this to remove .trn files that are older than 4 days and it is no
t
working. I also did the same thing for .bak and it works fine for those. I
am not sure what else I need to do for this. Could someone please help me
out?Perhaps you have some databases for which you are trying to do log backup bu
t the database(s) is/are
in simple recovery mode?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Takia" <Takia@.discussions.microsoft.com> wrote in message
news:320A9D9B-BDBC-4C3B-802A-C61BA5E7F08A@.microsoft.com...
>I have set this to remove .trn files that are older than 4 days and it is n
ot
> working. I also did the same thing for .bak and it works fine for those.
I
> am not sure what else I need to do for this. Could someone please help me
> out?

Data Base Maintenance Plan

I have set this to remove .trn files that are older than 4 days and it is not
working. I also did the same thing for .bak and it works fine for those. I
am not sure what else I need to do for this. Could someone please help me
out?
Perhaps you have some databases for which you are trying to do log backup but the database(s) is/are
in simple recovery mode?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Takia" <Takia@.discussions.microsoft.com> wrote in message
news:320A9D9B-BDBC-4C3B-802A-C61BA5E7F08A@.microsoft.com...
>I have set this to remove .trn files that are older than 4 days and it is not
> working. I also did the same thing for .bak and it works fine for those. I
> am not sure what else I need to do for this. Could someone please help me
> out?

Data Base Maintenance Plan

I have set this to remove .trn files that are older than 4 days and it is not
working. I also did the same thing for .bak and it works fine for those. I
am not sure what else I need to do for this. Could someone please help me
out?Perhaps you have some databases for which you are trying to do log backup but the database(s) is/are
in simple recovery mode?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Takia" <Takia@.discussions.microsoft.com> wrote in message
news:320A9D9B-BDBC-4C3B-802A-C61BA5E7F08A@.microsoft.com...
>I have set this to remove .trn files that are older than 4 days and it is not
> working. I also did the same thing for .bak and it works fine for those. I
> am not sure what else I need to do for this. Could someone please help me
> out?

Sunday, February 19, 2012

Daily Maintenanec Plan

Good Day,
I am having a problem with an SQL server 2005 maintenance plan that updates
Statistics.
I keep receiving the following error:-
Executing the query "UPDATE STATISTICS [dbo].[STATSDATA8_27_2007]
WITH FULLSCAN
" failed with the following error: "Table 'STATSDATA8_27_2007' does not
exist.". Possible failure reasons: Problems with the query, "ResultSet"
property not set correctly, parameters not set correctly, or connection not
established correctly.
I am not sure how to resolve this and it seems to stop statistical updating.
Could anyone offer any help?
Kind Regards,
Paul.It seems that the table you want to automatically update its statistics is
not exist. You or someone else may be deleted it?
Be sure it still exists first.
--
Ekrem Önsoy
"Paul Johnson" <paul.johnson@.gaapweb.com> wrote in message
news:ufUwvys7HHA.1188@.TK2MSFTNGP04.phx.gbl...
> Good Day,
> I am having a problem with an SQL server 2005 maintenance plan that
> updates Statistics.
> I keep receiving the following error:-
> Executing the query "UPDATE STATISTICS [dbo].[STATSDATA8_27_2007]
> WITH FULLSCAN
> " failed with the following error: "Table 'STATSDATA8_27_2007' does not
> exist.". Possible failure reasons: Problems with the query, "ResultSet"
> property not set correctly, parameters not set correctly, or connection
> not established correctly.
> I am not sure how to resolve this and it seems to stop statistical
> updating. Could anyone offer any help?
> Kind Regards,
> Paul.
>|||Thank you for your reply.
I should have mentioned that the plan is updating statistics for all user
databases and so there is no database or table specifically specified. If
this table is not present, why would it attempt to update the statistics?
Thanks for any advice.
Regards,
Paul.
"Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
news:9BE37C2E-55DB-4EA3-ACAC-702118FF60B8@.microsoft.com...
> It seems that the table you want to automatically update its statistics is
> not exist. You or someone else may be deleted it?
> Be sure it still exists first.
> --
> Ekrem Önsoy
>
> "Paul Johnson" <paul.johnson@.gaapweb.com> wrote in message
> news:ufUwvys7HHA.1188@.TK2MSFTNGP04.phx.gbl...
>> Good Day,
>> I am having a problem with an SQL server 2005 maintenance plan that
>> updates Statistics.
>> I keep receiving the following error:-
>> Executing the query "UPDATE STATISTICS [dbo].[STATSDATA8_27_2007]
>> WITH FULLSCAN
>> " failed with the following error: "Table 'STATSDATA8_27_2007' does not
>> exist.". Possible failure reasons: Problems with the query, "ResultSet"
>> property not set correctly, parameters not set correctly, or connection
>> not established correctly.
>> I am not sure how to resolve this and it seems to stop statistical
>> updating. Could anyone offer any help?
>> Kind Regards,
>> Paul.
>>
>|||Well, I did not understand exactly what you meant by saying "plan updates
statistics for all user databases and there is no specipic tables nor
databases".
However, when you create a maintenance plan to update statistics
automatically, you select databases and tables to be updated. So, there you
have already selected those databases\tables... And then, it appears that
you drop one and the job arises an error because it can not find the object
which you chose to be updated.
--
Ekrem Önsoy
"Paul Johnson" <paul.johnson@.gaapweb.com> wrote in message
news:O1D49cv7HHA.980@.TK2MSFTNGP06.phx.gbl...
> Thank you for your reply.
> I should have mentioned that the plan is updating statistics for all user
> databases and so there is no database or table specifically specified. If
> this table is not present, why would it attempt to update the statistics?
> Thanks for any advice.
> Regards,
> Paul.
>
> "Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
> news:9BE37C2E-55DB-4EA3-ACAC-702118FF60B8@.microsoft.com...
>> It seems that the table you want to automatically update its statistics
>> is not exist. You or someone else may be deleted it?
>> Be sure it still exists first.
>> --
>> Ekrem Önsoy
>>
>> "Paul Johnson" <paul.johnson@.gaapweb.com> wrote in message
>> news:ufUwvys7HHA.1188@.TK2MSFTNGP04.phx.gbl...
>> Good Day,
>> I am having a problem with an SQL server 2005 maintenance plan that
>> updates Statistics.
>> I keep receiving the following error:-
>> Executing the query "UPDATE STATISTICS [dbo].[STATSDATA8_27_2007]
>> WITH FULLSCAN
>> " failed with the following error: "Table 'STATSDATA8_27_2007' does not
>> exist.". Possible failure reasons: Problems with the query, "ResultSet"
>> property not set correctly, parameters not set correctly, or connection
>> not established correctly.
>> I am not sure how to resolve this and it seems to stop statistical
>> updating. Could anyone offer any help?
>> Kind Regards,
>> Paul.
>>
>|||Thanks for your reply.
I am assuming that if I do not actually specify the database by selecting
"All databases" it would update the stats for all that are available. So if
I add a new database, I do not need to edit the plan, it would just update
stats for all databases.
Regards,
Paul.
"Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
news:4BFEB99B-50C0-4247-9E10-52BD5A6A4458@.microsoft.com...
> Well, I did not understand exactly what you meant by saying "plan updates
> statistics for all user databases and there is no specipic tables nor
> databases".
> However, when you create a maintenance plan to update statistics
> automatically, you select databases and tables to be updated. So, there
> you have already selected those databases\tables... And then, it appears
> that you drop one and the job arises an error because it can not find the
> object which you chose to be updated.
> --
> Ekrem Önsoy
>
> "Paul Johnson" <paul.johnson@.gaapweb.com> wrote in message
> news:O1D49cv7HHA.980@.TK2MSFTNGP06.phx.gbl...
>> Thank you for your reply.
>> I should have mentioned that the plan is updating statistics for all user
>> databases and so there is no database or table specifically specified. If
>> this table is not present, why would it attempt to update the statistics?
>> Thanks for any advice.
>> Regards,
>> Paul.
>>
>> "Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
>> news:9BE37C2E-55DB-4EA3-ACAC-702118FF60B8@.microsoft.com...
>> It seems that the table you want to automatically update its statistics
>> is not exist. You or someone else may be deleted it?
>> Be sure it still exists first.
>> --
>> Ekrem Önsoy
>>
>> "Paul Johnson" <paul.johnson@.gaapweb.com> wrote in message
>> news:ufUwvys7HHA.1188@.TK2MSFTNGP04.phx.gbl...
>> Good Day,
>> I am having a problem with an SQL server 2005 maintenance plan that
>> updates Statistics.
>> I keep receiving the following error:-
>> Executing the query "UPDATE STATISTICS [dbo].[STATSDATA8_27_2007]
>> WITH FULLSCAN
>> " failed with the following error: "Table 'STATSDATA8_27_2007' does not
>> exist.". Possible failure reasons: Problems with the query, "ResultSet"
>> property not set correctly, parameters not set correctly, or connection
>> not established correctly.
>> I am not sure how to resolve this and it seems to stop statistical
>> updating. Could anyone offer any help?
>> Kind Regards,
>> Paul.
>>
>>
>|||Can you try deleting the old one and creating a new one?
--
Ekrem Önsoy
"Paul Johnson" <paul.johnson@.gaapweb.com> wrote in message
news:OBh8V0w7HHA.1188@.TK2MSFTNGP04.phx.gbl...
> Thanks for your reply.
> I am assuming that if I do not actually specify the database by selecting
> "All databases" it would update the stats for all that are available. So
> if I add a new database, I do not need to edit the plan, it would just
> update stats for all databases.
> Regards,
> Paul.
> "Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
> news:4BFEB99B-50C0-4247-9E10-52BD5A6A4458@.microsoft.com...
>> Well, I did not understand exactly what you meant by saying "plan updates
>> statistics for all user databases and there is no specipic tables nor
>> databases".
>> However, when you create a maintenance plan to update statistics
>> automatically, you select databases and tables to be updated. So, there
>> you have already selected those databases\tables... And then, it appears
>> that you drop one and the job arises an error because it can not find the
>> object which you chose to be updated.
>> --
>> Ekrem Önsoy
>>
>> "Paul Johnson" <paul.johnson@.gaapweb.com> wrote in message
>> news:O1D49cv7HHA.980@.TK2MSFTNGP06.phx.gbl...
>> Thank you for your reply.
>> I should have mentioned that the plan is updating statistics for all
>> user databases and so there is no database or table specifically
>> specified. If this table is not present, why would it attempt to update
>> the statistics?
>> Thanks for any advice.
>> Regards,
>> Paul.
>>
>> "Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
>> news:9BE37C2E-55DB-4EA3-ACAC-702118FF60B8@.microsoft.com...
>> It seems that the table you want to automatically update its statistics
>> is not exist. You or someone else may be deleted it?
>> Be sure it still exists first.
>> --
>> Ekrem Önsoy
>>
>> "Paul Johnson" <paul.johnson@.gaapweb.com> wrote in message
>> news:ufUwvys7HHA.1188@.TK2MSFTNGP04.phx.gbl...
>> Good Day,
>> I am having a problem with an SQL server 2005 maintenance plan that
>> updates Statistics.
>> I keep receiving the following error:-
>> Executing the query "UPDATE STATISTICS [dbo].[STATSDATA8_27_2007]
>> WITH FULLSCAN
>> " failed with the following error: "Table 'STATSDATA8_27_2007' does
>> not exist.". Possible failure reasons: Problems with the query,
>> "ResultSet" property not set correctly, parameters not set correctly,
>> or connection not established correctly.
>> I am not sure how to resolve this and it seems to stop statistical
>> updating. Could anyone offer any help?
>> Kind Regards,
>> Paul.
>>
>>
>>
>|||Good Day,
I have recreated the maintenance plan but I still get a similar error:-
Failed:(-1073548784) Executing the query "UPDATE STATISTICS
[dbo].[STATSDATA8_30_2007] WITH FULLSCAN " failed with the following error:
"Table 'STATSDATA8_30_2007' does not exist.". Possible failure reasons:
Problems with the query, "ResultSet" property not set correctly, parameters
not set correctly, or connection not established correctly.
I am really not sure what is going on. I have not picked databases
individually, I just chose the all setting.
Paul
"Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
news:19F9B743-6704-4A02-91CA-B5C2EE1ABBAF@.microsoft.com...
> Can you try deleting the old one and creating a new one?
> --
> Ekrem Önsoy
>
> "Paul Johnson" <paul.johnson@.gaapweb.com> wrote in message
> news:OBh8V0w7HHA.1188@.TK2MSFTNGP04.phx.gbl...
>> Thanks for your reply.
>> I am assuming that if I do not actually specify the database by selecting
>> "All databases" it would update the stats for all that are available. So
>> if I add a new database, I do not need to edit the plan, it would just
>> update stats for all databases.
>> Regards,
>> Paul.
>> "Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
>> news:4BFEB99B-50C0-4247-9E10-52BD5A6A4458@.microsoft.com...
>> Well, I did not understand exactly what you meant by saying "plan
>> updates statistics for all user databases and there is no specipic
>> tables nor databases".
>> However, when you create a maintenance plan to update statistics
>> automatically, you select databases and tables to be updated. So, there
>> you have already selected those databases\tables... And then, it appears
>> that you drop one and the job arises an error because it can not find
>> the object which you chose to be updated.
>> --
>> Ekrem Önsoy
>>
>> "Paul Johnson" <paul.johnson@.gaapweb.com> wrote in message
>> news:O1D49cv7HHA.980@.TK2MSFTNGP06.phx.gbl...
>> Thank you for your reply.
>> I should have mentioned that the plan is updating statistics for all
>> user databases and so there is no database or table specifically
>> specified. If this table is not present, why would it attempt to update
>> the statistics?
>> Thanks for any advice.
>> Regards,
>> Paul.
>>
>> "Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
>> news:9BE37C2E-55DB-4EA3-ACAC-702118FF60B8@.microsoft.com...
>> It seems that the table you want to automatically update its
>> statistics is not exist. You or someone else may be deleted it?
>> Be sure it still exists first.
>> --
>> Ekrem Önsoy
>>
>> "Paul Johnson" <paul.johnson@.gaapweb.com> wrote in message
>> news:ufUwvys7HHA.1188@.TK2MSFTNGP04.phx.gbl...
>> Good Day,
>> I am having a problem with an SQL server 2005 maintenance plan that
>> updates Statistics.
>> I keep receiving the following error:-
>> Executing the query "UPDATE STATISTICS [dbo].[STATSDATA8_27_2007]
>> WITH FULLSCAN
>> " failed with the following error: "Table 'STATSDATA8_27_2007' does
>> not exist.". Possible failure reasons: Problems with the query,
>> "ResultSet" property not set correctly, parameters not set correctly,
>> or connection not established correctly.
>> I am not sure how to resolve this and it seems to stop statistical
>> updating. Could anyone offer any help?
>> Kind Regards,
>> Paul.
>>
>>
>>
>>
>

Friday, February 17, 2012

D.B. Maintenance

I am new to SQL Server. I'm running the initial install of SQL Server 2005 (no SP are installed, ver: 9.00.1399). I have not done any maintenance on my d.b since it's inception (about 3 months ago) and I'm concerned. It seems to be excessively large and I'm not sure about it's integrity. I tried to do some maintenance using the maintenance plan wizard. First of all, what is the best and easiest way to do periodic maintenance on the d.b. (i.e. reindexing, compacting, etc).? Secondly, in trying to use the maintenance plan wizard it failed in the end with the following:

Saving maintenance plan failed:

one or mor arguments are invalid

I'm at a loss as to what to do first. My Windows OS is Windows Server 2003 Standard SP2 completely updated as of today.

I was going to try and upgrade to SQL Server SP2 but that's a project and I'm not sure it will solve anything.

Any help would be greatly appreciated.

First point is to test and upgrade to SP2 in order to get all bug fixes for Maintenance plans.|||

First, you really should backup all of your databases and backup logs for all databases that are not in simple recovery. And do that right away. Then run DBCCs as soon as you can on all databases. There is no need to regularly run any "compacting". You want to size your data and log files to be the appropriate size as needed for daily operations and maintenance and that's it. In terms of reindexing, you want to check for fragmentation and then determine which reindexing operation is appropriate and proceed from there.

You'll probably have to mess with this for a bit to clean things up if you haven't done anything in 3 months - I hope it isn't a production server. Being that you may not have looked at much on that box, you would also want to go through your SQL error logs and the windows event logs to see if you have any other issues on the server that may need your attention.

No one can tell you the best way to do your maintenance as that has some dependencies on your system, the business needs, etc. A good place to start is by going through the System Administration chapter of the Operations Guide (it was written for 2000 but much of it applies to 2005) to get an idea of what all you should be doing and then after you define what you need to do you can explore how you will do it:

http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/sqlops4.mspx

-Sue

Tuesday, February 14, 2012

Customizing Subscription Maintenance

I would like to use my own subscription setup screens, but am having a little
trouble. I basically need to be able to grab a report and schedule it. As
far as I can tell, I think I only need the following tables:
ReportServer.dbo.Schedule, ReportServer.dbo.Subscriptions,
ReportServer.dbo.ReportSchedule w/ the corresponding Stored Procs CreateTask,
CreateSubscription, AddReportSchedule, respectively. I also need the
following from msdb: sysjobs, sysjobsteps, sysjobschedules. I've worked w/
the msdb tables before and have automated the process of creating scheduled
jobs, but am a noob when trying to do the same w/ the ReportServer db tables.
Is there any documentation out there on customizing these schedules (e.g.,
how the scheduleid or subscriptionid is created)?Ok...I don't think that it is possible to get around this one. Anyone have
any luck / information on doing what I want (see previous post).
What about customizing the screens then? All I want the user to be able to
see and have the ability to do is create and modify subscriptions for reports.
"Neo" wrote:
> I would like to use my own subscription setup screens, but am having a little
> trouble. I basically need to be able to grab a report and schedule it. As
> far as I can tell, I think I only need the following tables:
> ReportServer.dbo.Schedule, ReportServer.dbo.Subscriptions,
> ReportServer.dbo.ReportSchedule w/ the corresponding Stored Procs CreateTask,
> CreateSubscription, AddReportSchedule, respectively. I also need the
> following from msdb: sysjobs, sysjobsteps, sysjobschedules. I've worked w/
> the msdb tables before and have automated the process of creating scheduled
> jobs, but am a noob when trying to do the same w/ the ReportServer db tables.
>
> Is there any documentation out there on customizing these schedules (e.g.,
> how the scheduleid or subscriptionid is created)?
>