USE Windermere
GO
Â
/* This does a simple listing of the rows in the agentimages table that have the correct entry for the pics number.
Substitute the ## in the quotes for the imagestore database you want to check. Sorted by last entry descending. */
Â
select * from agentimages with (nolock)
where imagestore = 'pics44'
order by lastmodifiedaudit desc
Â
select * from agentimages with (nolock)
order by lastmodifiedaudit desc
Â
select * from agentimages with (nolock)
where imagestore = 'elephant.windermere.com.imagestore44'
order by lastmodifiedaudit desc
Â
/* This does a simple listing of the rows in the listingimages table that have the correct entry for the pics number.
Substitute the ## in the quotes for the imagesgtore database you want to check. Sorted by last entry descending. */
Â
select * from listingimages with (nolock)
where imagestore = 'pics44'
order by lastmodifiedaudit desc
Â
select * from listingimages with (nolock)
where imagestore = 'elephant.windermere.com.imagestore44'
order by lastmodifiedaudit desc
Â
/* SPECIAL SECTION FOR NO IMAGES AND IF THE BRIDGE/COLLECTOR IS SUSPECT */
Â
/* This does a lookup for the row entry in the listingimages table using the MLS number. This will make sure that the
actual listing made it across the Bridge from PostGres into SQL so that the ColdFusion side has a way to find out what
Imagestore DB has the images in it on the Elephant02 server. Just replace the number in quotes with the listing number
you are checking on. If this query does not find it for the correct imagestore db, then the Bridge or Postgres side/Collector
is not working correctly. Archway could be fine, but there is no row in the listingimages table to lookup the images with
on Elephant02. If there is a row with the listing number, then you can use the information in the next query.*/
Â
select * from listingimages with (nolock)
where listingnumber = '676393'
order by lastmodifiedaudit desc
Â
/* On the Elephant02 server, you will want to use the same listing number as above but in a different query. At the top left menu on this SQL
Management Studio, click on "Connect" and log into the Elephant02 Database Engine the same way you did for SQLPRI. It will then appear
in the lefthand column as another SQL server. Click on the "Databases" choice then find the imagestore database you want to run
the query against. Here is the query using the same listing number from above to find the row(s) of images for the listing number
that is in question. This might take awhile to run but if it comes back blank, then no images have been inserted into the imagestore
database for that listing. If rows are returned, make sure the column for the database pics number is the correct number for the
imagestore database the listing is pointing at from SQLPRI (shown in the imagestore column from the query directly above).*/
Â
SELECTÂ Â Â Â *
FROMÂ Â Â Â Â Â Â Â Images
with (nolock)
where caption like '%676393%'
Â
/* End of Special section for Bridge/Collector suspect. Other queries below are useful for other purposes */
Â
Â
/* This does a select of rows in the agentimages table that do not have the correct string for the location of the images.
Substitute the ## in the quotes for the imagestore database you want to check.
If you find any rows that contain the string in the quotes below, then use the next sql statement to update the agentimages
table to the correct string. Sorted by last entry descending. */
Â
select * from agentimages with (nolock)
where imagestore like '%pics44%'
order by lastmodifiedaudit desc
Â
/* This does an update of rows in the agentimages table that do not have the correct string for the location of the images.
Substitute the ## in the quotes for the imagestore database you want to locate then update.
Run this then run the above query again to check that it did actually update the rows you expected. */
Â
UPDATE agentimages SET imagestore = 'pics44'
WHERE imagestore like '%elephant02.windermere.com.imagestore44%'
Â
select * from listingimages with (nolock)
where imagestore = 'elephant.windermere.com.imagestore44'
order by lastmodifiedaudit desc
Â
/* This does a select of rows in the listingimages table that do not have the correct string for the location of the images.
Substitute the ## in the quotes for the imagestore database you want to check.
If you find any rows that contain the string in the quotes below, then use the next sql statement to update the listingimages
table to the correct string. Sorted by last entry descending. */
Â
select * from listingimages with (nolock)
where imagestore like '%elephant02.windermere.com.imagestore44%'
order by lastmodifiedaudit
desc
Â
/* This does an update of rows in the agentimages table that do not have the correct string for the location of the images.
Substitute the ## in the quotes for the imagestore database you want to locate then update.
Run this then run the above query again to check that it did actually update the rows you expected. */
Â
UPDATE listingimages SET imagestore = 'pics43'
WHERE imagestore like '%elephant.windermere.com.imagestore44%'
Â
/* This query does a quick count of the total rows in the Images table on the imagestore database.
Just modify the imagestore## to look at whichever db you want to check on */
/* Don't forget to "connect" to the Elephant02 SQL Server & open a new query window for it before you do the query below */
Â
Â
USE imagestore44
GO
SELECT COUNT(*) FROM images
Â
/*Â */ |