Is there a way to find which items were recently published by querying the SQL server tables directly?
I have tried looking at the SQL server but could not figure out which table stores this information.
As far as I know, Sitecore doesn't keep a record in the database of when an item was published.
Having said that, when you publish an item in Sitecore, the item gets written to some target database, and statistical information is written/updated on that item.
If you really do want to look at the database directly, the Items
table will show you all items and the SharedFields, UnversionedFields and VersionFields tables
will contain all of your fields. I think you can just look at the Items table because fields aren't published individually - if you publish an item, all of it's fields are published (I THINK).
I don't think there is a table that stores the latest published item information because you can get it by the date and it doesn't maintain the last published date.
You can refer to this thread for more details.
How to get last publish date for an item
One way you can check is by going into the web database and checking the [Items]
table and check the created/updated
columns.
So as described you need to write some custom code to keep this information in the database.
Hope this helps.
I agree with @Gaurav and @Sumit. However, if you still need to see what recent items are published in the database you can check using the below query in [Items]
table. Also based on templated id you can find specific page item If you need.
/****** Script for SelectTopNRows command from SSMS ******/
SELECT TOP (1000) [ID]
,[Name]
,[TemplateID]
,[MasterID]
,[ParentID]
,[Created]
,[Updated]
FROM [SC93_Web].[dbo].[Items] order by Updated desc
Hope it helps!