Showing posts with label properly. Show all posts
Showing posts with label properly. Show all posts

Saturday, February 25, 2012

DB Maintenance Plans on MSDE not functioning properly

When building a Database Maintenance Plan on MSDE to backup user databases,
I'm finding that the "Remove files older than:..." option is not available,
nor does it save the Complete Backup schedule that I define. Does MSDE have
some functionality limitations beyond the performance limitations placed on
it and the lack of SQL tools? I thought those two things were the only
differences.Hi,
Regarding this:
1)Just check whether the sqlmaint.exe is available in the Binn folder of
the MSDE install.
2) Also wanted to inform you that you can run sqlmaint.exe as a command
line utility and in a batch file and schedule the batch file in Windows
Scheduler and it will do the same tasks as the Database maintainence plans.
Also it has some pretty cool features which you can try out using Books
Online.
Attached is an example of how to run it from command line as a batch file.
I have taken Northwind as an example. You need to change the server name
and set the appropriate path in the batch file and run.
Hope this helps you in running the maintainence plans.
Regards,
Himadri|||Thanks. The issue is that I want to take advantage of the ease of use
provided the database maintenance plan wizard, so using the a command line
utility is a step in the wrong direction for what I'm doing. The
sqlmaint.exe file is available. It's not that the database maintenance plan
wizard doesn't come up at all. It's a matter of the options I listed
previously not working.
"Himadri Sarkar" <hssarkar@.microsoft.com> wrote in message
news:LefzspG3DHA.1512@.cpmsftngxa07.phx.gbl...
quote:

> Hi,
> Regarding this:
> 1)Just check whether the sqlmaint.exe is available in the Binn folder of
> the MSDE install.
> 2) Also wanted to inform you that you can run sqlmaint.exe as a command
> line utility and in a batch file and schedule the batch file in Windows
> Scheduler and it will do the same tasks as the Database maintainence

plans.
quote:

> Also it has some pretty cool features which you can try out using Books
> Online.
> Attached is an example of how to run it from command line as a batch file.
> I have taken Northwind as an example. You need to change the server name
> and set the appropriate path in the batch file and run.
> Hope this helps you in running the maintainence plans.
> Regards,
> Himadri
|||Yes there is more than a workaround. It is described at:
http://mcse.ms/arch/72/2003/4/739692|||Hi,
I believe you are running into a specific problem related to MSDE sp2
because prior releases of MSDE did not include sqlmaint. In sp2 we added
sqlmaint to MSDE allowing us to create database maintenance plans however
sometimes the registry key for default backups is not added.
To resolve the problem you need to do two things:
1) create a default backup folder (optional)
2) Add the reg key
HKLM\software\microsoft\mssqlserver\mssq
lserver\backupdirectory and point
it to the folder where you want your default backups to go.
Please try the steps and let me know whether it resolves the issue or not.

DB Maintenance Plans on MSDE not functioning properly

When building a Database Maintenance Plan on MSDE to backup user databases,
I'm finding that the "Remove files older than:..." option is not available,
nor does it save the Complete Backup schedule that I define. Does MSDE have
some functionality limitations beyond the performance limitations placed on
it and the lack of SQL tools? I thought those two things were the only
differences.--=_NextPart_0001_FD68E59B
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hi,
Regarding this:
1)Just check whether the sqlmaint.exe is available in the Binn folder of
the MSDE install.
2) Also wanted to inform you that you can run sqlmaint.exe as a command
line utility and in a batch file and schedule the batch file in Windows
Scheduler and it will do the same tasks as the Database maintainence plans.
Also it has some pretty cool features which you can try out using Books
Online.
Attached is an example of how to run it from command line as a batch file.
I have taken Northwind as an example. You need to change the server name
and set the appropriate path in the batch file and run.
Hope this helps you in running the maintainence plans.
Regards,
Himadri
--=_NextPart_0001_FD68E59B
Content-Type: application/octet-stream; name="DBMaintainence.bat"
Content-Transfer-Encoding: base64
cmVtIFJ1bm5pbmcgRGF0YWJhc2UgbWFpbnRhaW5lbmNlIGZvciBOb3J0aHdpbmQNCnBhdXNlDQpz
cWxtYWludCAtUyAiaHNzYXJrYXIxLTJrIiAtRCBOb3J0aHdpbmQgLUNrREIgLUNrQWwgLUNrVHh0
QWwgLUNrQ2F0IC1IdG1sUnB0ICJDOlxNeVJlcG9ydHNcTkhDX2Noay5odG0iIC1VcGRPcHRpU3Rh
dHMgMTUgLVJtVW51c2VkU3BhY2UgMTEwIDEwIC1Ca1VwREIgIkQ6XE1TU1FMN1xCQUNLVVAiIC1C
a1VwTWVkaWEgRElTSyAtQ3JCa1N1YkRpciAtRGVsQmtVcHMgMndlZWtzIC1Ca1VwT25seUlmQ2xl
YW4gLVZyZnlCYWNrdXAgDQo=--=_NextPart_0001_FD68E59B--|||Thanks. The issue is that I want to take advantage of the ease of use
provided the database maintenance plan wizard, so using the a command line
utility is a step in the wrong direction for what I'm doing. The
sqlmaint.exe file is available. It's not that the database maintenance plan
wizard doesn't come up at all. It's a matter of the options I listed
previously not working.
"Himadri Sarkar" <hssarkar@.microsoft.com> wrote in message
news:LefzspG3DHA.1512@.cpmsftngxa07.phx.gbl...
> Hi,
> Regarding this:
> 1)Just check whether the sqlmaint.exe is available in the Binn folder of
> the MSDE install.
> 2) Also wanted to inform you that you can run sqlmaint.exe as a command
> line utility and in a batch file and schedule the batch file in Windows
> Scheduler and it will do the same tasks as the Database maintainence
plans.
> Also it has some pretty cool features which you can try out using Books
> Online.
> Attached is an example of how to run it from command line as a batch file.
> I have taken Northwind as an example. You need to change the server name
> and set the appropriate path in the batch file and run.
> Hope this helps you in running the maintainence plans.
> Regards,
> Himadri|||Yes there is more than a workaround. It is described at:
http://dbforums.com/arch/72/2003/4/739692|||Hi,
I believe you are running into a specific problem related to MSDE sp2
because prior releases of MSDE did not include sqlmaint. In sp2 we added
sqlmaint to MSDE allowing us to create database maintenance plans however
sometimes the registry key for default backups is not added.
To resolve the problem you need to do two things:
1) create a default backup folder (optional)
2) Add the reg key
HKLM\software\microsoft\mssqlserver\mssqlserver\backupdirectory and point
it to the folder where you want your default backups to go.
Please try the steps and let me know whether it resolves the issue or not.

DB Maintenance Plan not working properly

In my maintenance plan, i have specified that it should delete bak files
older than 3 days and trn files also older than 3 days. It is surprising
doing that for trn files but the bak are not being deleted. I have 10 small
databases and one large database. It is accumulating the bak files longer
than 3 days while its doing the trn properly. What could cause this to happen
as it is filling up my hardisk. Due to this my large database cannot get
backed up as its saying no hard disk space. Please let me know where the
problem is. thanks in advance.
Below KB might help:
http://support.microsoft.com/default...&Product=sql2k
Also, check out below great troubleshooting suggestions from Bill H at MS:
-- Log files don't delete --
This is likely to be either a permissions problem or a sharing violation
problem. The maintenance plan is run as a job, and jobs are run by the
SQLServerAgent service.
Permissions:
1. Determine the startup account for the SQLServerAgent service
(Start|Programs|Administrative tools|Services|SQLServerAgent|Startup). This
account is the security context for jobs, and thus the maintenance plan.
2. If SQLServerAgent is started using LocalSystem (as opposed to a domain
account) then skip step 3.
3. On that box, log onto NT as that account. Using Explorer, attempt to
delete an expired backup. If that succeeds then go to Sharing Violation
section.
4. Log onto NT with an account that is an administrator and use Explorer to
look at the Properties|Security of the folder (where the backups reside)
and ensure the SQLServerAgent startup account has Full Control. If the
SQLServerAgent startup account is LocalSystem, then the account to consider
is SYSTEM.
5. In NT, if an account is a member of an NT group, and if that group has
Access is Denied, then that account will have Access is Denied, even if
that account is also a member of the Administrators group. Thus you may
need to check group permissions (if the Startup Account is a member of a
group).
6. Keep in mind that permissions (by default) are inherited from a parent
folder. Thus, if the backups are stored in C:\bak, and if someone had
denied permission to the SQLServerAgent startup account for C:\, then
C:\bak will inherit access is denied.
Sharing violation:
This is likely to be rooted in a timing issue, with the most likely cause
being another scheduled process (such as NT Backup or Anti-Virus software)
having the backup file open at the time when the SQLServerAgent (i.e., the
maintenance plan job) tried to delete it.
1. Download filemon and handle from www.sysinternals.com.
2. I am not sure whether filemon can be scheduled, or you might be able to
use NT scheduling services to start filemon just before the maintenance
plan job is started, but the filemon log can become very large, so it would
be best to start it some short time before the maintenance plan starts.
3. Inspect the filemon log for another process that has that backup file
open (if your lucky enough to have started filemon before this other
process grabs the backup folder), and inspect the log for the results when
the SQLServerAgent agent attempts to open that same file.
4. Schedule the job or that other process to do their work at different
times.
5. You can use the handle utility if you are around at the time when the
job is scheduled to run.
If the backup files are going to a \\share or a mapped drive (as opposed to
local drive), then you will need to modify the above (with respect to where
the tests and utilities are run).
Finally, inspection of the maintenance plan's history report might be
useful.
Thanks,
Bill Hollinshead
Microsoft, SQL Server
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"zj" <zj@.discussions.microsoft.com> wrote in message
news:BF147E4E-EEA3-49CD-83BB-B533FC772F49@.microsoft.com...
> In my maintenance plan, i have specified that it should delete bak files
> older than 3 days and trn files also older than 3 days. It is surprising
> doing that for trn files but the bak are not being deleted. I have 10 small
> databases and one large database. It is accumulating the bak files longer
> than 3 days while its doing the trn properly. What could cause this to happen
> as it is filling up my hardisk. Due to this my large database cannot get
> backed up as its saying no hard disk space. Please let me know where the
> problem is. thanks in advance.

DB Maintenance Plan not working properly

In my maintenance plan, i have specified that it should delete bak files
older than 3 days and trn files also older than 3 days. It is surprising
doing that for trn files but the bak are not being deleted. I have 10 small
databases and one large database. It is accumulating the bak files longer
than 3 days while its doing the trn properly. What could cause this to happen
as it is filling up my hardisk. Due to this my large database cannot get
backed up as its saying no hard disk space. Please let me know where the
problem is. thanks in advance.Below KB might help:
http://support.microsoft.com/default.aspx?scid=kb;en-us;303292&Product=sql2k
Also, check out below great troubleshooting suggestions from Bill H at MS:
-- Log files don't delete --
This is likely to be either a permissions problem or a sharing violation
problem. The maintenance plan is run as a job, and jobs are run by the
SQLServerAgent service.
Permissions:
1. Determine the startup account for the SQLServerAgent service
(Start|Programs|Administrative tools|Services|SQLServerAgent|Startup). This
account is the security context for jobs, and thus the maintenance plan.
2. If SQLServerAgent is started using LocalSystem (as opposed to a domain
account) then skip step 3.
3. On that box, log onto NT as that account. Using Explorer, attempt to
delete an expired backup. If that succeeds then go to Sharing Violation
section.
4. Log onto NT with an account that is an administrator and use Explorer to
look at the Properties|Security of the folder (where the backups reside)
and ensure the SQLServerAgent startup account has Full Control. If the
SQLServerAgent startup account is LocalSystem, then the account to consider
is SYSTEM.
5. In NT, if an account is a member of an NT group, and if that group has
Access is Denied, then that account will have Access is Denied, even if
that account is also a member of the Administrators group. Thus you may
need to check group permissions (if the Startup Account is a member of a
group).
6. Keep in mind that permissions (by default) are inherited from a parent
folder. Thus, if the backups are stored in C:\bak, and if someone had
denied permission to the SQLServerAgent startup account for C:\, then
C:\bak will inherit access is denied.
Sharing violation:
This is likely to be rooted in a timing issue, with the most likely cause
being another scheduled process (such as NT Backup or Anti-Virus software)
having the backup file open at the time when the SQLServerAgent (i.e., the
maintenance plan job) tried to delete it.
1. Download filemon and handle from www.sysinternals.com.
2. I am not sure whether filemon can be scheduled, or you might be able to
use NT scheduling services to start filemon just before the maintenance
plan job is started, but the filemon log can become very large, so it would
be best to start it some short time before the maintenance plan starts.
3. Inspect the filemon log for another process that has that backup file
open (if your lucky enough to have started filemon before this other
process grabs the backup folder), and inspect the log for the results when
the SQLServerAgent agent attempts to open that same file.
4. Schedule the job or that other process to do their work at different
times.
5. You can use the handle utility if you are around at the time when the
job is scheduled to run.
If the backup files are going to a \\share or a mapped drive (as opposed to
local drive), then you will need to modify the above (with respect to where
the tests and utilities are run).
Finally, inspection of the maintenance plan's history report might be
useful.
Thanks,
Bill Hollinshead
Microsoft, SQL Server
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"zj" <zj@.discussions.microsoft.com> wrote in message
news:BF147E4E-EEA3-49CD-83BB-B533FC772F49@.microsoft.com...
> In my maintenance plan, i have specified that it should delete bak files
> older than 3 days and trn files also older than 3 days. It is surprising
> doing that for trn files but the bak are not being deleted. I have 10 small
> databases and one large database. It is accumulating the bak files longer
> than 3 days while its doing the trn properly. What could cause this to happen
> as it is filling up my hardisk. Due to this my large database cannot get
> backed up as its saying no hard disk space. Please let me know where the
> problem is. thanks in advance.

DB Maintenance Plan not working properly

In my maintenance plan, i have specified that it should delete bak files
older than 3 days and trn files also older than 3 days. It is surprising
doing that for trn files but the bak are not being deleted. I have 10 small
databases and one large database. It is accumulating the bak files longer
than 3 days while its doing the trn properly. What could cause this to happe
n
as it is filling up my hardisk. Due to this my large database cannot get
backed up as its saying no hard disk space. Please let me know where the
problem is. thanks in advance.Below KB might help:
http://support.microsoft.com/defaul...2&Product=sql2k
Also, check out below great troubleshooting suggestions from Bill H at MS:
-- Log files don't delete --
This is likely to be either a permissions problem or a sharing violation
problem. The maintenance plan is run as a job, and jobs are run by the
SQLServerAgent service.
Permissions:
1. Determine the startup account for the SQLServerAgent service
(Start|Programs|Administrative tools|Services|SQLServerAgent|Startup). This
account is the security context for jobs, and thus the maintenance plan.
2. If SQLServerAgent is started using LocalSystem (as opposed to a domain
account) then skip step 3.
3. On that box, log onto NT as that account. Using Explorer, attempt to
delete an expired backup. If that succeeds then go to Sharing Violation
section.
4. Log onto NT with an account that is an administrator and use Explorer to
look at the Properties|Security of the folder (where the backups reside)
and ensure the SQLServerAgent startup account has Full Control. If the
SQLServerAgent startup account is LocalSystem, then the account to consider
is SYSTEM.
5. In NT, if an account is a member of an NT group, and if that group has
Access is Denied, then that account will have Access is Denied, even if
that account is also a member of the Administrators group. Thus you may
need to check group permissions (if the Startup Account is a member of a
group).
6. Keep in mind that permissions (by default) are inherited from a parent
folder. Thus, if the backups are stored in C:\bak, and if someone had
denied permission to the SQLServerAgent startup account for C:\, then
C:\bak will inherit access is denied.
Sharing violation:
This is likely to be rooted in a timing issue, with the most likely cause
being another scheduled process (such as NT Backup or Anti-Virus software)
having the backup file open at the time when the SQLServerAgent (i.e., the
maintenance plan job) tried to delete it.
1. Download filemon and handle from www.sysinternals.com.
2. I am not sure whether filemon can be scheduled, or you might be able to
use NT scheduling services to start filemon just before the maintenance
plan job is started, but the filemon log can become very large, so it would
be best to start it some short time before the maintenance plan starts.
3. Inspect the filemon log for another process that has that backup file
open (if your lucky enough to have started filemon before this other
process grabs the backup folder), and inspect the log for the results when
the SQLServerAgent agent attempts to open that same file.
4. Schedule the job or that other process to do their work at different
times.
5. You can use the handle utility if you are around at the time when the
job is scheduled to run.
If the backup files are going to a \\share or a mapped drive (as opposed to
local drive), then you will need to modify the above (with respect to where
the tests and utilities are run).
Finally, inspection of the maintenance plan's history report might be
useful.
Thanks,
Bill Hollinshead
Microsoft, SQL Server
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"zj" <zj@.discussions.microsoft.com> wrote in message
news:BF147E4E-EEA3-49CD-83BB-B533FC772F49@.microsoft.com...
> In my maintenance plan, i have specified that it should delete bak files
> older than 3 days and trn files also older than 3 days. It is surprising
> doing that for trn files but the bak are not being deleted. I have 10 smal
l
> databases and one large database. It is accumulating the bak files longer
> than 3 days while its doing the trn properly. What could cause this to hap
pen
> as it is filling up my hardisk. Due to this my large database cannot get
> backed up as its saying no hard disk space. Please let me know where the
> problem is. thanks in advance.