473,378 Members | 1,369 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

XP_SQLMaint

Dan
I am running SQL Server 2000 SP3 on Win2k Server. I have just built a
new maintenance plan that first backs up the database, then analyzes
it for allocation and rebuilds indexes. Below is what I am using:

exec xp_sqlmaint '-S SCDEV -U "sa" -P <my_sa_password> -D ScProd
-PlanName Web_DB_Backup
-BkUpDB <My_Path> -BkUpMedia DISK'

exec xp_sqlmaint '-S SCDEV -U "sa" -P "my_sa_password" -D SCProd -CkDB
-CkAl
-CkCat -RebldIdx 99 -HtmlRpt <my_path>\SCWeb_DB_Backup_Log.html"
-DelHtmlRpt 5days'

It seems that after I run this, the database size grew to 5x it's
regular size. I thought this had to do with the index rebuild. When
I tested it, it ran for nearly 2.5 hours. I checked the datafile and
it is ~40GB when it used to be ~8GB. I will have to try and shrink
the database to get it back to size, but why did the data file grow so
astronomically from a maintenance plan?

Any help would be greatly appreciated.
Jul 20 '05 #1
1 3120
do*****@amcad.com (Dan) wrote in message news:<bd**************************@posting.google. com>...
I am running SQL Server 2000 SP3 on Win2k Server. I have just built a
new maintenance plan that first backs up the database, then analyzes
it for allocation and rebuilds indexes. Below is what I am using:

exec xp_sqlmaint '-S SCDEV -U "sa" -P <my_sa_password> -D ScProd
-PlanName Web_DB_Backup
-BkUpDB <My_Path> -BkUpMedia DISK'

exec xp_sqlmaint '-S SCDEV -U "sa" -P "my_sa_password" -D SCProd -CkDB
-CkAl
-CkCat -RebldIdx 99 -HtmlRpt <my_path>\SCWeb_DB_Backup_Log.html"
-DelHtmlRpt 5days'

It seems that after I run this, the database size grew to 5x it's
regular size. I thought this had to do with the index rebuild. When
I tested it, it ran for nearly 2.5 hours. I checked the datafile and
it is ~40GB when it used to be ~8GB. I will have to try and shrink
the database to get it back to size, but why did the data file grow so
astronomically from a maintenance plan?

Any help would be greatly appreciated.


Probably because of "-RebldIdx 99", which specifies freespace of 99%
or fillfactor of 1%.

BOL:
-RebldIdx free_space
Specifies that indexes on tables in the target database should be
rebuilt by using the free_space percent value as the inverse of the
fill factor. For example, if free_space percentage is 30, then the
fill factor used is 70. If a free_space percentage value of 100 is
specified, then the indexes are rebuilt with the original fill factor
value.
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: DBAScott | last post by:
Can the only thing you do is delete backup files with xp_sqlmaint, or do you also have to backup the database?
2
by: Garry Clarke | last post by:
I have enabled the query governor on our SQL2000 SP2 server with a threshold of 3600. Now, some of the maintenance jobs fail due to the limit being to low (e.g. one of the user databases integrity...
2
by: jwbeaty | last post by:
Here's a weird one. I'm running SQL Server 7 and when I run a backup something weird happens. When I perform the backup via Enterprise Manager by right clicking on the database I want to...
6
by: jt | last post by:
Hi ng, we do have a MS-SQL Server in production use which I want to dump its contents nightly onto a ftp site. The ftp does not accept anonymous logins; can anyone point me in the appropiate...
0
by: guf | last post by:
Hi All, I have SQL Server 2000 sp3, Windows 2000 Server. I have a database which is used by an application server. I do several important jobs a day in the application server and never access my...
1
by: Steve Foster | last post by:
I have tried many variations (after reviewing other posts) and can not resolve the following issue: RUNNING SQL MAINTENANCE ---------------------------- SET ARITHABORT ON SET...
9
by: Trevor Best | last post by:
I have a maintenance plan on a client's site, there's only one database in the plan and it's set to backup db and log, this job fails consistently. The one step in the job contains this line: ...
0
by: Zac | last post by:
What is the method to execute backups from batch (.bat) files on the server running SQL Server. I have tried the sqlmaint command - doesn't seem to execute, looked into the xp_sqlmaint with no luck....
0
by: rclark30 | last post by:
Hello to everyone out there. I am a non SQL person TRAPPED in a nightmare! The long short is we have a CRM 3.0 database that is running in SQL 2005 on a Windows 2003 SP1 Server. (HP ProLiant ML350...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.