July 27, 2016 at 5:51 am
no for all.
only for speicifiec db .
and remove old bak until 14 days
thanks
July 27, 2016 at 8:45 am
Easiest is to use a maintenance plan for that, the cleanup task does the file removal, the backup task lets you select specific databases
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 27, 2016 at 9:20 am
no
i have error in SQL AGENT .
i need scripts .
July 27, 2016 at 9:27 am
liorvikel (7/27/2016)
noi have error in SQL AGENT .
i need scripts .
Good luck. Perhaps if your post was a little more cordial and less demanding we could help. Maybe sharing the error messages would help us fix the problem. We like to help but we do not appreciate people who just demand stuff.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
July 27, 2016 at 11:28 am
Sean Lange (7/27/2016)
liorvikel (7/27/2016)
noi have error in SQL AGENT .
i need scripts .
Good luck. Perhaps if your post was a little more cordial and less demanding we could help. Maybe sharing the error messages would help us fix the problem. We like to help but we do not appreciate people who just demand stuff.
To add to what Sean said above, we are volunteers on this site and are not paid to just do your work for you. If you need help you really need to post more than a demand for service. We aren't mind readers, we don't have access to your system(s), so it is hard to help based solely on your posts.
July 27, 2016 at 12:42 pm
liorvikel (7/27/2016)
no for all.only for speicifiec db .
and remove old bak until 14 days
thanks
Ola Hallengren has a fantastic script collection that does this and much more. And best of all, completely free. Take a look at https://ola.hallengren.com/[/url] and see if this helps you.
(For completeness sake, I am also going to mention Minion backup[/url] - also free, and I hear a lot of good things about it, but I have no personal experience with this tool)
July 27, 2016 at 2:02 pm
liorvikel (7/27/2016)
noi have error in SQL AGENT .
i need scripts .
Can you copy and paste both the code and the error you're getting from SQL Agent, please?.
--Jeff Moden
Change is inevitable... Change for the better is not.
July 27, 2016 at 2:29 pm
This is the error of agent in view history's
ERROR: %1 is not a valid Win32 application.
July 27, 2016 at 6:24 pm
liorvikel (7/27/2016)
This is the error of agent in view history'sERROR: %1 is not a valid Win32 application.
Now all we need is the code that caused that error and we might be able to help. The error is clearly saying that "%1" isn't a valid application and, since "%1" is typical of an operating system variable/parameter for a batch process, there's a piece of code somewhere that isn't being passed the correct parameter or the variable hasn't been defined correctly. Only you know or can find where this code is.
As for backup scripts and *** previously mentioned on this thread, Ola Hallengren's code is good for those that prefer to use someone else's script. Google for it and download it and the instructions for installation and use.
As a bit of a sidebar, if you don't already have it, download SQL Server "Books Online" and start reading about the different areas you want to know about, such a backups.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply