Tuesday, October 25, 2016

Maven jar dependencies are displayed outside `Maven Dependencies` view

showing the all jars listed in eclipse is a real headache. let's see how to get rid of that.

jars shown outside


  1.  Just delete the project from the eclipse. (do not delete from disk, if you not sure about this - better to backup below delete)
  2.  go to folder structure of the project and delete generated files. (".settings" folder, "target" folder, "classpath" file, ".project" file ) 

delete generated folders



     3. Import project using wizard  - existing maven project. You will get rid of the issue.

import again as a existing maven project



issue sorted - libraries are not shown now



Friday, October 21, 2016

Microsoft SQL server - Restore dates

It's handy stuff if you can find the refresh dates of a database. All details are inside db server and it's a matter of finding the correct query.

Below query will help to get the required information on refresh/ db restoration


SELECT [rs].[destination_database_name], 
[rs].[restore_date], 
[bs].[backup_start_date], 
[bs].[backup_finish_date], 
[bs].[database_name] as [source_database_name], 
[bmf].[physical_device_name] as [backup_file_used_for_restore]
FROM msdb..restorehistory rs
INNER JOIN msdb..backupset bs
ON [rs].[backup_set_id] = [bs].[backup_set_id]
INNER JOIN msdb..backupmediafamily bmf 
ON [bs].[media_set_id] = [bmf].[media_set_id] 
ORDER BY [rs].[restore_date] DESC