Comments (7)
I think that the best would be to have both the last modified date and the release date as comments in the stored procedures. I will work on adding this to my release process.
from sql-server-maintenance-solution.
Thank you for the feedback. One question:
Let's say that I release a new version, where I have only updated one of the stored procedures.
The date in MaintenanceSolution.sql would then get updated.
Now what about the dates in the stored procedures? Should I only update the date in the stored procedure that has been updated, or should I update the dates in all of the stored procedures?
from sql-server-maintenance-solution.
Once installed, I can't easily determine which version of "MaintenanceSolution.sql" was used to install the procedures. I would make it simple and make all the dates the same as the last updated date. This would insure that the code is from one release and compatible. If I see I have an older version of a procedure, I see no reason not to replace all the procedures. If you version each separately, then it would be harder to figure out which if I have a consistent set.
Conceptually, I think the difference is version tracking for development verses version tracking for deployment. Source control can track all changes for a developer. Procedures can be tracked separately or all together (tag/branch). As a client, my interest is that I have the latest and greatest complete set of code (e.g., deployed from a tag on stable code). If you include a version date specific for the procedure, I would make it a separate comment in addition to the deployment version.
If there is a breaking change to the CommandLog table or to a job, it would be really nice to be able to check the version of the table or job. Without renaming the table (e.g., version in the name), I think a extended property on the object would be the way to do this. For the jobs, a comment in the job or in the step code might be enough to determine if it is compatible. Store version info in extended properties on the procedures, tables, jobs, etc.?
from sql-server-maintenance-solution.
PS I worry that the object can be changed without the extended property being updated. That's why in my sample I pull the version for the extended property out of the text of the procedure. I don't know what to do with a table without coding detection of column changes. Would a computed column that specifies the version be a poor hack to insure we have the correct table version? An unused output parameter in a stored procedure to hold the procedure version? I have not really thought about this before. There probably is a more elegant way to track versions.
from sql-server-maintenance-solution.
from sql-server-maintenance-solution.
I have updated my release procedure. It is now adding a version timestamp in the header of the stored procedures, and in the header of MaintenanceSolution.sql.
You can query the version timestamps like this:
https://ola.hallengren.com/scripts/misc/VersionCheck.sql
I have also included the version timestamp in the output from the stored procedures.
from sql-server-maintenance-solution.
I have currently no plans to add extended properties.
from sql-server-maintenance-solution.
Related Issues (20)
- Exclude Multiple tables
- Include the name of the day, for daily differential backups.
- Default Backup Location Folder doesn't exists HOT 1
- Fallback backup location
- ChangeBackuplocation
- Add an option to generate the Task Scheduler commands for SQL Express
- Update Statistics very slow on a 3Tb database HOT 3
- PRINT when TimeLimit has been reached in IndexOptimize HOT 1
- Diff backup of new database created fom another database is not being converted to full.
- (JOBNAME) variable not working on SQL Server 2014? HOT 2
- ColumnStore Index Fragmentation Issue
- Support Veeam Databses backups
- IndexOptimize job randomly reporting failure even when the log file says the Outcome succeeded HOT 6
- running rebuild on individual index takes a long time compared to native SQL commands HOT 2
- Enhance Index Rebuild Decision Process with Page Density Factor
- Parallel processing for index maintenance
- IndexOptimize - wrong ONLINE setting when table contains ColumnStore index
- Clustered indexes
- 7Zip compression
- @Clearuptime does not consider is_copy_only backups
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sql-server-maintenance-solution.