Autorefresh db objects
Autorefresh db objects data held in cache.
I have to manually refresh to see new objects or changes to existing objects - it does not automagically detect changes. It could, by reading the datemodified in sys.allobjects and searching for ones newer than last refresh.
ALGORITHM: If more than one minute (configurable, can be 0) from last refresh, SELECT ... FROM sys.allobjects WHERE modifydate &rt; @LastRefreshTime If any objects found, refresh ONLY THEM. This is very fast, and you will have allways current data.
Try dbForge SQL Complete v.4.5 beta!
-
Егор commented
можно ведь не обновлять все элементы, (я не программист так что можно не совсем точно укажу вариант), держать кэш всех элементов и обновлять его при загрузке программы, а уже обновлять только, что созданные элементы. (новые таблицы, их колонны) при нажатии клавишь, хотя так по мне просто при создании таких таблиц проще было бы реализовать функцию добавления этих элементов в тот самый кеш? Просто непонятно зачем нажимать CTRL+SHIFT + R - если можно избежать ручных операций, заменив их автоматическими процедурами?
-
Sheldon commented
that's actually a great trigger idea. However, what if other's updated? Are you indicating you work in a dedicated environment (sandbox)? for those of us with shared environments, a periodic schema check would probably still be needed.
-
Sheldon commented
whenever i need a refreshed intellisense, I always hit control-shift-r. Red gate offers automatic sync, but I ended up turning it off. I don't like the idea of extra needless traffic, but you may have a different perspective.
-
Anonymous commented
Or you on every statement that contains 'ALTER' / 'CREATE'/ 'DROP' you could refresh the affected object/ objects with the same type, for eaxample, a stament with create/alter/drop will always have the object type specified and object name. (create procedure sample_procedure ....), That information can be used to refresh all stored procedures or an object named sample_procedure.
The same can be done for objects modified within the design view.