Maintanance Plan
Nov 28, 2006i have a few maintanance plans on one database that i wanna copy acrross the whole plans to another database of same set up... is there a way to do this?
instead of re typing all plans?
i have a few maintanance plans on one database that i wanna copy acrross the whole plans to another database of same set up... is there a way to do this?
instead of re typing all plans?
Hi,
We have maintanance plan defined that runs every night for optimization, integrety check and full backup. Somehow, for last two days I have been receiving the following error about two out of four databases.
[1] Database customere7: Check Data and Index Linkage...
** Execution Time: 0 hrs, 0 mins, 1 secs **
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 15089: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot change the 'single user' option of a database while another user is in the database.
[2] Database producte7: Check Data and Index Linkage...
** Execution Time: 0 hrs, 0 mins, 1 secs **
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 15089: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot change the 'single user' option of a database while another user is in the database.
Strange thing is that we don't have this database in single user mode. They are the the main production databases and optimization and backup jobs run OK.
Please help me..I am not sure whether there is a major problem with database or what I should check. Does running integrety check after optimization job affect anything?
Daily activities seem normal with these databases.
Please help.
I have a Mantenance Plan running on my Production Server.
Each job has one step.
-Optimization (each week)
-Integrity Checks (each week)
-T-Log Backups (each hour)
-Full Back up (once a day)
The Job is saying the last three are failing but niether the SQL Server Logs or MS Application Log are reporting a success or faluire. "write to windows application log on faluire" is set for all of them. The backups are occuring, as the files are in thier destination.
Anyone experience this before? If so any advise?
Thanks,
Matt
I have moved few databases in 2000 to a different server which run's on sql server 2005 and its not a instance ogf 2000.
I backed up databases in 2000 moved those files to other server and then restored them.
I had solved the problem of orphand users by deleting and adding again.
Now when i try to setup maintenance plan i have the following error after walking through the wizard
TITLE: Maintenance Plan Wizard Progress
------------------------------
Adding tasks to the maintenance plan failed.
------------------------------
ADDITIONAL INFORMATION:
Object reference not set to an instance of an object. (Microsoft.SqlServer.Management.MaintenancePlanWizard)
------------------------------
BUTTONS:
OK
------------------------------
what do i need to fix this????Any help is appreciated...
And what else do i need to make sure everything in 2005 are working fine apart from orphand user.
Please let me know
Thanks in advance
Is there any speicial considerations when you prepare the maintanance Plan for the Search Database.
View 3 Replies View RelatedHi,
All the maintanance jobs scheduled for weekend are still running after 66 hours.
1. transaction log backup
2. integrity check
3. complete backup
4. optimization job
I stopped the jobs from scheduled task lists, I can still see them running through current activity window.
Is it ok to kill them? Or how I can stop them?
Thanks,
Ann
Hi Guys/Gals,
Need some comments/ideas on the following scenario:
Current Situation:
-I have a PROD DB and a REPORTING DB( Separte Physical Servers).
-PROD DB replicates (Transactional) to REPORTING DB. ( Using only Replication Wizard to set up, quite easy)
-DB is for running shopfloor(manufacturing) applications, thus needs to be minimum downtime.
-Retention period for PROD DB data is 3 months ,Reporting DB is 3 years.
Future Problem that I will encounter:
-Purging of data in PROD DB will be replicated into Reporting.
-Schema change in PROD DB need to delete existing Publication before able to change schema.
-After schema change, need to recreate publication and rerun snapshot.
Questions:
-How to prevent the purging to be replicated to Reporting?
Switching off Replication when Purging takes place will not help. The only solution
I am thinking of is to alter the store procedure for replication during purging.
Is there any other "CLEANER" hassle free way?
- How to cater shema changes better?
Currently the data is not alot, but down the road, it might go to Terabytes, by then running a
snapshot will cost us alot. Is there any way not to redo a snapshot for this scenario?
Please give your comments/ideas/ .
Thanks.
where is the maintanance wizard on SS2k5?
View 1 Replies View RelatedIs only one plan is kept for one query in plan cache?
i heard generally hash is created for a query and plan is search with this hash.
We have a debate in our team about embedded SQL vs. Stored Procs.
The argument is why use SP's if you can embed the SQL in the code and SQL2K will cache it on the fly?
I can't find any definitive information on pros and cons between the two methods.
If there are no major performance issues, or gotchas, I guess it comes down to developer preference.
SP Pros:
- Great SQL support in VS.NET (dev, debug, integration)
- Seperation of database specific code from middle tier.
- Less lines of code in middle tier
- VS.NET support for .xsd dataset definitions.
- Logic closer to data for more demanding processes.
Embedded SQL Pros:
- Less artifacts for version control
- Better encapsulation of logic
Any info would be appreciated.
thanks
Kevin
I am working on tuning the procedure cache hit ratio for my server. We haveadded 4 Gb of memory to the server, which has helped. In addition, I have runthe DBCC FREEPROCACHE, which helped for a couple of days to get the hit ratioup to about 84% (from 68%).When I use the performance monitor on the server and look at SQL Server CacheManager:Buffer Hit Ratio, I see that the Prepared SQL Plan is around 97%, butthe Procedure Plan hit ratio is down around 55%. I've done some research ondifferent tuning techniques, but can't seem to find 1. a clear definition ofthe difference between the prepared sql plan and the procedure plan and 2.other than adding memory and running dbcc freeprocache, how can I get theprocedure plan cache raised? I do know that there are some procedures thatneed to be modified to be called fully qualified (e.g. exec dbo.sp_###instead of exec sp_###), but I don't think that those will increase theprocedure plan by 30% or more.Any insight you can give would be greatly appreciated.Thanks,Michael--Message posted via SQLMonster.comhttp://www.sqlmonster.com/Uwe/Forum...eneral/200511/1
View 1 Replies View RelatedThe benefit of the actual execution plan is that you can see the actual number of rows passing through each step - compared to the estimated number of rows.But what about the "cost percentages" ?I believe I've read somewhere that these percentages is still just an estimate and is not based on the real execution.Does anyone know this and preferable have a link to something that documents it?Thanks
View 1 Replies View RelatedI have deleted a database from SQL Enterprise Manager. Anyone know a way to clear that database from my maintenance plan? I do not wish to just uncheck the deleted database or create a new database plan.
Thanks!
Hi All,
I have around 10 maintenance Plans on my server and all the plans are running fine except for one which takes for ever....Yesterday I scheduled it to run at 1 AM and it was still running when I came in this morning...Usually this job used to take only 2 minutes and now it takes forever....
I tried to delete the maintenance Plan and created a new one , but no luck..
But If I try to back up the database by right clicking the database --
All Tasks --- Backup database , it takes less then 2 minutes..But If I try to run the job created by the Maintenance Plan to back up the database it takes forever and all I can see the status of the Job as ' Executing Job Step 1"..
I created a test database and restored the database in Issue onto the test database and created a maintenance Plan for the test database and it runs fine and takes less than 2 minutes.. and I don't see any security issues on this...
B'cause the job neither fails nor executes ..So there are no error messages to look in to ...
Please let me know if any one has encountered the same problem and how to resolve it..
Thanks in Advance
Venu
In maint. plan when reorg is selected for a user db, it will also work on
sys tables in user database. Is it a good thing to do ? How do I avoid sys tables in a user database not to be part of maint optimization plan ? Some script would be helpful !
Thanks,
Ivan
When looking at the Est. Execution Plan of a query in QA, what should I be looking for? What numbers are acceptible? Does anybody have a link to any information on this subject?
TIA,
Chris
Hello All
I have been given a SQL Server 2000 database to look after which has been set up with a Database maintenance plan. The plan is set to backup the complete database and the transaction log. The backups are written to the local disk correctly but the plan is also set to remove any backup files (both database .BAK and transaction log .TRN) that are over one week old. Complete database .BAK files are written daily and the .TRN are written every hour daily. The .BAK files are removed ok automatically but the .TRN files are not - they are just slowly filling the disk. There does not seen to be anything different between the way the main database and the transaction log is set up in the maintenance plan.
I would be very grateful for any ideas
Hi,
Can anyone help me in comming up with a plan to install SP3
Thanks
Reddy
I have a strange thing in one of our Maintenance plans.
On the first tab where you check which databases you're including in the plan I have (say my database name is CAT) a 'CAT' and 'cat' database listed and the one chosen is 'cat'. However my database in all other views shows up in all caps. (even when I do an sp_helpdb)
The backups look like they're working, etc. but it just seems weird. If I go to create a new plan it only gives me the one option 'CAT' which is really what's there. I'm new and I'm thinking the database at one time was 'cat' and this is when the maintenance plan was created. Then it was renamed to 'CAT' and there's the two db's showing in the old mainenance plan.
What would you do? Create a new plan with "CAT" and just get rid of the old one with the weird 'cat' and 'CAT'?
Any other suggestions or ideas on what happened..
ann
I've created a database maintenance plan to backup a database, but it just
isn't happening, am i missing something. The maintenance plan appears to be
created successfully.
responses appreciated.
thanks
Todd Minifie
Hi there,
Could anyone please help me, I have been given the responsibility of planning and implementing the admnistration of 25 existing SQL Servers (6.5 and 7.0) countrywide and I am unsure as to where I should start. I am relatively new to SQL Server and if someone could just point me in the right direction or possibly recommend any good publications which I could refer to, I would be extremely grateful.
Hi!
I got two questions and please forward all your suggestions:
1: Is there any document for capacity planning of SQL Server 6.5 database?
2: Is there a way to find out total number of transactions per day in SQL Server?
Thanks in advance!
I'm new to SQL server but familiar enough with databases to know this doesn't seem right.
Here's the situation:
I have a table with real estate property information. There are about 650,000 rows in it. I have a nonclustered non-unique index on the city where the property is located. There are about 40 unique values in this index.
I do a simple query like:
SELECT city,address from propinfo where city= 'CARLSBAD'. The query will return about 4,000 rows. The problem is that the execution plan that it chooses is to do a full table scan. I.E. Even though there is an index on City, it chooses to look through 650,000 rows rather than do an index seek. Something sounds inefficient here. BTW, this happens in both SQL 7 and SQL 2000. Can anyone explain why this happens? I've got to think that SQL Server is more efficient here.
I am noticing a discrepency in query plans when a process is run in Analyzer as either a proc or as straight sql.
I have a query that uses a view of 5 tables that have a check constraint on the year. When I run my query in query analyzer and state year = 1999 along with over parameters then the query plan only looks at the one table.
When I take that query and make a stored proc and run the process passing the year = 1999 along with other parameters the plan states that it is looking at all of the tables in the partitioned view.
Thanks,
Here is a copy of the proc
create procedure testproc
@CUST_I varchar(6),
@FISCAL_DD_D tinyint,
@FISCAL_MM_D tinyint,
@FISCAL_YY_D smallint,
@cont_cvarchar(1),
@invoice varchar(9)
as
Select
CONT_C,
INVC_I,
DIV_C,
REG_C,
LOC_I,
INVC_D,
CUST_I,
CR_PREF_C,
FISCAL_DD_D,
FISCAL_MM_D,
FISCAL_YY_D,
PAY_CODE,
REF_TEXT,
EC_TYPE,
ADJUST_A,
ALLOWANCE_A,
MAT_A,
TAX_A,
FRT_A,
REEL_A,
OTHER_A,
GST_A,
PRIOR_BAL
from MY_FIVE_YEAR_VIEW
whereFISCAL_YY_D = @FISCAL_YY_D
AND cont_c = @cont_c
AND FISCAL_DD_D = @FISCAL_DD_D
AND FISCAL_MM_D = @FISCAL_MM_D
AND (REF_TEXT LIKE '%' + @CUST_I + '%' or REF_TEXT LIKE '%' + @invoice + '%' )
order by cust_i, pay_code
Can you generate script for a maintenance plan?
I know how to script a job, I was wondering about a plan.
If not, whats the best way to record the configuration?
Thanks
Lystra
I need to set up a Maintenance Plan on a 6.5 DB. I know the version is old but the customer cannot upgrade at this time. When I try and run the wizard to set it up I get a warning about running a plan on a DB that is larger that 400MB. Whats the deal? Thanks for the help!!
View 1 Replies View RelatedI am having a hard time setting up a backup plan for my sql server databases. Right now I create a copy of each database on another machine on the network once a day. Once a week I upload a MSAccess version to a remote site. Obviously there are huge amounts of potential data loss if a crash of some sort would occur locally.
My new plan is looking like this:
1) Run a complete database backup once a day
2) Run Transaction Log backups every hour
My questions are as follows:
1) What role does a "Backup Device" play in this process (I currently do everything through the Enterprise Manager interface)?
2) I am having a hard time scheduling mydatabase_complete.bak and mydatabase_trans.TRN at all. I get several errors.
3) I would like to run these backups on another network machine but am not seeing how to access "My Network Places" from the "Backup Database" utility in Enterprise Manager.
Any help in the form of answers or pointing me towards a useful resource for this process would be much appreciated!
Thanks in advance~
Hi all,
I am new to SQL and was given a SQL server to administer. There are lots of databases on the server and no one seems to know which one is used and which one is not. I try to do some cleanning.
1. Can I find out if there is any activity on a database so I can delete them off and how?
2. There are backup jobs that run every night which do a full backup. I am thinking of changing it to do full backup once a week and differential every night. These databases are updated daily. Some have lots of activities, some have less. Does that sound reasonable? and if I do differential backup, should I create separate back up file or should I add on to the full backup file?
Any comments or suggestions are greatly appreciated.
I have setup maintenance plan to run nightly.
(1) Maint plan is setup to backup the databases that users actually use to update company information (2) diffrent databases.
(2) maint plan backs up the master database this is setup to run by itself.
(3) maint plan is setup to backup the model - msdb databases together.
I setup the email notification option to inform me if my backups were successfull. below is an example that I'm recieving everymorning on every database. Something about the single user mode is causing the problem. can somone explain this to? Maybe give me a direction to follow to correct this problem. Below is an example error message that I'm recieving.
I can backup any database by right clicking selecting all tasks then backup database and I get a complete backup to problem. Why is my Maint. Plan not going through. the rebuilding of indexs is successful.
Microsoft (R) SQLMaint Utility (Unicode), Version Logged on to SQL Server 'My Server name' as 'My_Domain_NameMy_SQL_Admin_Account (trusted)
Starting maintenance plan 'LEO-SLCBOM Full Nightly' on 4/13/2004 11:15:00 PM
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 5070: [Microsoft][ODBC SQL Server Driver][SQL Server]Database state cannot be changed while other users are using the database 'Leo'
[Microsoft][ODBC SQL Server Driver][SQL Server]ALTER DATABASE statement failed.
[Microsoft][ODBC SQL Server Driver][SQL Server]sp_dboption command failed.
[1] Database Leo: Check Data and Index Linkage...
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 7919: [Microsoft][ODBC SQL Server Driver][SQL Server]Repair statement not processed. Database needs to be in single user mode.
The following errors were found:
[Microsoft][ODBC SQL Server Driver][SQL Server]Repair statement not processed. Database needs to be in single user mode.
** Execution Time: 0 hrs, 0 mins, 1 secs **
[2] Database SlcBom: Check Data and Index Linkage...
** Execution Time: 0 hrs, 0 mins, 1 secs **
Deleting old text reports... 0 file(s) deleted.
End of maintenance plan 'LEO-SLCBOM Full Nightly' on 4/13/2004 11:15:01 PM
SQLMAINT.EXE Process Exit Code: 1 (Failed)
Emailing report to operator 'Admin, SQL'
Thnaks for any help
SQL Rookie
hi everyone..
this is a little bit weird ..
i am trying to make a backup strategy. i am using sql2005.
when i go to maintenance plan. right click >> new maintenance plan...
nothing happens..
if i go with the maintenance plan wizard everything goes normally.
after doing the backup, if i right click on it and press
modify , nothing happens too.
what i mean by nothing happens is that it doesn't open the "design view".
the back up is doing normally.. but i need to set a range of 5 days before overwriting the oldest backup.
any idea what is going on or what am i missing?!
thank you
Windows Server 2003R2 w/ Sp2
SQL 2005 w/ Sp2
Created weekly (full backup) and a daily (differential backup) Maintenance Plans using the wizard. I formatted the server, installed the OS and SQL. Restored the full backup (No Recovery Mode), then restored the differential backup (Recovery Mode), tested and all worked well.
Then I noticed the original Maintenace Plans I created (Full and Differential) were gone; makes sense as I had formatted the server.
Is there a way to create a Maintenance Plan file or script that I can save and just add back to the server??
Hope that makes sense.
Any help appreciated.
Kerry
Hello, I have been looking at the execution plan for a procedure call and the select, compute scalar, stream aggregates, constant scan, nested loops, asserts are all at 0% cost, the PK costs are 2% apart from a rogue 7% and a few 20%, tables scans are all at 23%. The query cost realtive to the batch is 100%. What does this all mean?
I have put non-clustered indexes on all the table attributes that are involved in the select statements but this has made no difference, i am guessing this is because my tables are not heavily populated and i may have seen a difference if i had thousands of entries in the tables the select statements acted on, is this assumption correct?
Does anyone else bother using the execution plan to tweak there DB or is it a negligible tool?
Jill
Hello 2 all,
Could someone advise and/or correct me with my thoughts on how I would do my db maintenance plans?
(db's on SQL2000 as 'full' model)
Backups:
1) Daily Transaction log backups scheduled frequently enough.
2) Full Backup scheduled daily. Good way to start I presume ;)
Maintenance: Would be scheduled daily if possible, on non-production hours and if not colliding with daily full BU schedule.
3) Full DB reorg data&indexes.
4) Update Query Optimizer Stats (although 'Auto Update Stats' is on)
5) Shrink the logfile (ldf) as I presume this will have grown due to previous maintenance jobs.
6) If 5 ok, alter ldf filesize back to new allocated size.
Rgds,
T.