Posted on January 13, 2015 at 11:15 AM
Recently I had a requirement where I needed to update stored procedure on the server to reflect my local changes and we had a huge number of stored procedure,
so I was trying to list stored procedures which have been modified after a specific date. In this tip I am going to share that SQL query with you. 🙂
mySQL provides a [SHOW PROCEDURE STATUS] query using this we see the Modified column but we can not sort by Modified.
So I created a small query that will list all the stored procedures that have been modified after a specific date. For this I have used [information_schema] DB’s [ROUTINES] table.
INFORMATION_SCHEMA is the information database, the place that stores information about all the other databases that the MySQL server maintains. [1]
SELECT `ROUTINE_NAME`,
`CREATED`,
`LAST_ALTERED`
FROM `information_schema`.`ROUTINES`
WHERE `ROUTINES`.`ROUTINE_NAME` LIKE '%sp_xyz%'
AND `ROUTINES`.`LAST_ALTERED` > '2015-01-01'
ORDER BY `ROUTINES`.`LAST_ALTERED` DESC;
Running this query will list out all the stored procedures modified after a specific date and whose name are like ‘%sp_xyz%‘. Hope this saves some time for you.
Queues and task scheduler in laravel works like a charm. But it can fail in a certain case. In this post, I am going to explain the case where it c...
Some services run on different ports and to access them in the browser we have to mention the port number also. For ex : SonarQube : 9000 [http://1...
Sometimes you need to strike off a row in ExtJS grids, this can be easily done by CSS code. The CSS code will look like this, .strike-through-row {...
When you are working on a laravel project there is some basic setup that needs to be done for each install of the project. Like Permissions for ...
In this blog, we are going to take a look into Laravel Queues. Queues allow you to defer the processing of a time-consuming task, such as sending a...
PARTIALS Let’s say we have a structure like the following : data = { students : [{ name : ‘ABC’, roll : 1 }, { name : ‘DEF&...
PHP 8 has been officially released in November 2020! This new major update brings many optimizations and powerful features to the language. This...
ProxySQL is a high-performance SQL proxy. ProxySQL runs as a daemon watched by a monitoring process. The process monitors the daemon and restarts i...
Time is important. We should not waste it doing trivial things. Automate things wherever possible.