Version control: table modified date is changing but nothing seems to be modifying it! Why?
I have a series of databases. They're mirrors of each other in structure, only the data inside them changes. There's a database for each customer. Each night I run a procedure that checks if anything has changed in the database since the previous run and
e-mails me if it has. The reason for this was that an employee in the past was changing (and breaking) things so I wanted to track what was going on. Now, one of these databases is idle at the moment, in abeyance if you like, yet 1 table's modified date changes
once a week! Table definition stays stable at the level I am recording it (code below) so why is the modified date changing? Could it be an index-defrag? But if so, why this table and none of the others or indeed its mirror databases? CHECKDB run every day
and that's OK. Full backup done weekly. But again, why this 1 table? Nothing is even using the table at the moment! Code to get object definitions below.
SET
@command =
INSERT INTO TblSETUP_DatabaseVersionControl
SELECT
+ @database
+
''' as DatabaseName
+
CAST(@datestamp
as
varchar(20))
+
''' as SnapshotTime
,so.object_id as ObjectId
,so.[name] as ObjectName
,so.[type_desc] as ObjectType
,so.create_date as CreateDate
,so.modify_date as ModifiedDate
,CASE
WHEN so.type = ''U''
THEN tbl.TableDefinition
WHEN so.type = ''SN''
THEN ''CREATE SYNONYM ['' + ss.name + ''] FOR '' + ss.base_object_name
ELSE sm.definition
END as ObjectDefinition
FROM '
+ @database
+
'.sys.objects so
LEFT OUTER JOIN '
+ @database
+
'.sys.sql_modules sm
ON so.object_id = sm.object_id
LEFT OUTER JOIN (SELECT
td.object_id
,SUBSTRING(td.TableDefintionRaw,1,LEN(td.TableDefintionRaw)-1) + '')'' as TableDefinition
FROM (
select
so1.object_id
,(select
CASE
WHEN sc.column_id = 1
THEN ''CREATE TABLE ['' + so.name + ''] ([''
+ sc.name + ''] [''
+ st.name + '']''
+ CASE WHEN st.name LIKE ''%char%'' THEN ''('' + CAST(sc.max_length as varchar(5)) + '')'' ELSE '''' END
+ CASE WHEN sc.is_nullable = 1 THEN '' NULL,'' ELSE '' NOT NULL,'' END
ELSE ''['' + sc.name + ''] [''
+ st.name + '']''
+ CASE WHEN st.name LIKE ''%char%'' THEN ''('' + CAST(sc.max_length as varchar(5)) + '')'' ELSE '''' END
+ CASE WHEN sc.is_nullable = 1 THEN '' NULL,'' ELSE '' NOT NULL,'' END
END
from '
+ @database
+
'.sys.objects so
inner join '
+ @database
+
'.sys.columns sc
on so.object_id = sc.object_id
inner join '
+ @database
+
'.sys.types st
on sc.user_type_id = st.user_type_id
where so.type = ''U''
AND so.object_id = so1.object_id
order by sc.column_id
FOR XML PATH('''')) AS TableDefintionRaw
from '
+ @database
+
'.sys.objects so1
WHERE so1.type = ''U''
group by so1.object_id) as td) as tbl
ON so.object_id = tbl.object_id
LEFT OUTER JOIN '
+ @database
+
'.sys.synonyms ss
ON so.object_id = ss.object_id
WHERE so.[type] IN(''P'' -- Stored procedures
,''V'' -- Views
,''U'' -- User table
,''SN'' -- Synonym
,''FN'' -- Function
ORDER BY so.[type],so.name
JCEH
Incidentally, I remember the second reason I set all this up. I had a view that used to revert back to an old definition under SQL 2008. It was weird. More than 1 of us had gone in and "fixed it" and then it unfixed itself. It turned out the view had been
renamed in the past. Each night I have a procedure that checks all views in the instance running sp_refreshview. Any errors are caught and e-mailed to me. It seems that the old definition was still stored somehow under the old name but with the same object
id (there had been some corruption in the database when a drive in the RAID5 array became suspect - picked up with CHECKDB, Windows and indeed the HP software didn't pick anything up). Although the database had been "fixed" this view switched back to
the old definition each time sp_refreshview was run. Fix was to drop and re-create using new definition. Learnt the lesson though and now keep track of all main definitions in each instance.
J
JCEH
Similar Messages
-
I have windows 8 and I have the most updated version of Itunes, my iphone 4s connects, but nothing plays from my itunes all items have the cloud next to it, and they are dithered out
In the course of your troubleshooting to date, have you worked through the following document?
No content shows up in iTunes after updating -
I'm using imovie 10.0.3 with OS x Version 10.9.2. or some reason I can't double click on iphoto events to siadplay the pictures within that event. I've rebuilt my iphoto library, but nothing seems to work. Any help would be appreciated.
Hello All,
Also no answer but am having the same problem. All my catalogueing via folders is up in smoke and no external HDs (where I would normally directly store raw footage when importing) showing up on the iMovie interface. It is a pain the arse to go back to the earlier version - why APPLE, pray tell, do you continue to lower expectations user-friendly functions. Shall try the option+open for a library but this too is extremely inconvenient if it works like iPhoto because you have to log out to log in to a new library whereas I just want to be able to see my multiple HDs directly from the iMovie menu and then the folders within folders I have layered in there - to make it easy to FIND STUFF. Wake up Apple, you are NOT meeting your customer's needs or desires.
Thanks to the posters who are helping the rest of us lost in the dark with possible solutions - free fix-its for Apple which they don't deserve. -
I've forgotten my Adobe ID. I was able to get a new password, and my email hasn't changed, but I seem to need an Adobe ID in order to start using my Photoshop Elements 12 again. What to do? This is incredibly frustrating!
Hi yumeori,
Please click on the link given below and follow the steps mentioned;
Adobe ID, sign in, and account help
Regards,
Sarika -
I have connected the adapter and cable from imac to GVA HD tv but nothing seems to be happening. Any suggestions?
Was that message showing a s dialog when selecting the tv connection as a sound output device? I ask because I don't know the exact context of that message and never heard of it before.
It may be helpful to take a screen shot of both that message and also the list of the sound output devices while the tv is connected.
You never specified your model (year) of your imac so I don't know its limitations. Maybe some version doesn't support sound through the mini-displayport (hard to believe any model wouldn't with mini-displayport). But if that is the case you may have to resort to analog stereo from you stereo line out output jack to your tv.
One final thing. The mini-displayport adapter you have may not support audio. That was a possibility a few years ago. That is why most places that sells these things also explicity specify whether the adapter supports audio. For example, monoprice's adapter:
Mini DisplayPort | Thunderbolt® to HDMI® Adapter w/ Audio Support
or even the Moshi adapter sold through the apple store.
Moshi Mini DP to HDMI Adapter with Audio Support
Note both these adapters explictily say they have audio support. -
My mac mini only shows a steady power light and fan noise when powered up. No video or sound and no commumication with wired keyboard or optical mouse. Tried replacing internal battery and resetting PMU/SMC but nothing seemed to happen. Any suggestions? Many thanks! Richard
You've already done the two things I would have suggested.
If your Mini has an internal battery then I assume it's a G4. That means you've gotten a lot of good years of service from it, and it's old enough that it's certainly not covered by AppleCare anymore, and it's probably not worth spending money trying to repair it.
You should be able to tear it apart using instructions from ifixit.com to get the hard drive out, and then put the hard drive into a nice USB or FireWire enclosure (I like the ones from Other World Computing, macsales.com) so you can transfer your data to a replacement Mac.
I hope someone has another suggestion for you. -
I have just deleted an app call Wattpad and I want to download it again but it always says that I need to retry downloading it. I have tried restart a few times but nothing seems to happen. What's wrong with my phone? If I reset my phone will my pictures
Hello there, SamanthaYikwai.
The following Knowledge Base article offers up some basic steps to try for reinstalling an app:
iOS: An app you installed unexpectedly quits, stops responding, or won’t open.
http://support.apple.com/kb/ts1702
Reinstall the app
Remove the app from your device and reinstall it. Remember that deleting an app also deletes its data.
Delete the app.
Press the Home button.
Go to the App Store and download the app again.
Wait for the app to download, then open it from the Home screen.
If the download stops, you can resume it.
If the issue persists, then you may want to try and sync the application to your iOS device using your computer by following the information in this article, under the section "Download previous purchases on Mac or PC":
Download past purchases
http://support.apple.com/kb/HT2519
Thanks for reaching out to Apple Support Communities.
Cheers,
Pedro. -
Regarding Pages: I was writing using the app Pages when I left the page I was writting on but now I can't access it at all. I have tried to send the document to my email, I've tried to make a copy but nothing seems to work. The document still exists and I can see my writting as I can with all other documents but I can't open that page.
Try:
- Reset the iOS device. Nothing will be lost
Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
least ten seconds, until the Apple logo appears.
- Connect the iPad to your computer and try to get the document via File sharing
- Try getting the document from iCloud.com if you are using iCloud -
My Apple TV willl no longer access my "owner's library" in iTunes. It had been working just fine... then nothing. I've been checking discussions, and trying suggestions, but nothing seems to work.
Have you restarted everything including your router?
Don't suppose you've added any new security software or firewalls to the computer? -
Purchasing iOS 3.1 Software Update for iPod touch (1st generation) -i have paid for this, but when it goes to the itunes for downloading it says it is downloading but nothing seems to be happening. help please!
Hello mixanme,
Sorry to hear you are not able to update your iPod touch using iTunes. Thank you for providing all that information about what is going on. I found an tutorial to assist with issues updating an iPod touch:
Issues updating or restoring iPod touch
http://www.apple.com/support/ipodtouch/assistant/restore/
I hope these steps help!
Best,
Sheila M. -
Hi .. My phone has stopped vibrating.I have read the solution given by some users on this forum and have tried all the tricks. But nothing seems to be working. My phone still does not vibrate.please suggest.
Hi .. My phone has stopped vibrating.I have read the solution given by some users on this forum and have tried all the tricks. But nothing seems to be working. My phone still does not vibrate.please suggest.
-
I have a IPhone 3GS restored the phone as I bought it second hand. I have tried to download apps but some say it's not compatible an others say I need to update to iOS 4.3 or later. I have tried downloading this software via a computer but nothing seems to b happening ....any ideas pls??
You need to connect it to your computer and update it through iTunes.
'Over the air' updates were only introduced in iOS5. -
i am not able to set up my ipad2 - tried the regular apple help - did all those routines - but nothing seems to working. itune simply wont detect the ipad
http://support.apple.com/kb/TS1538
-
Whenever i try to sync my ipod a message keeps coming up saying "1 or more items could not be synced", apparently its error -69. Please help, i've tried rebooting my laptop, installing the latest itunes and turning off the wifi but nothing seems to work.
Are you using security software on your PC? If yes, try to disable the software or check the settings. More info here: http://support.apple.com/kb/TS3125
-
help!!! i am unable to connect to a wifi network and ive tried everything but nothing seems to work!!! can someone help pls
try connecting to another wifi network to isolate the issue. at this point it's impossible to tell if it's your phone or your network
Maybe you are looking for
-
Get rid of event list in iCal view
I just upgraded to Lion. When I first opened iCal, it showed a single column with events shown by hour. Somehow, in fiddling with the settings, I ended up with two columns -- one on the left showing past and future events as a scrollable list, and
-
I sent out a mass mailing to my various groups and the Yahoo accounts have been getting bombarded with the same message every 2 minutes and I don't know haow to stop the hemmoraging. Non of my other contacts had this problem, just Yahoo. Can someone
-
Is possible to work with three calendars?
Hi, I would like to work with three different calendars by user (without shared). Is it possible? If it is, how can I do/configure it? Thank you and Regards.
-
Transaction Scenario . Help Rqrd..
Snenario ======= A transaction is unit of work containing activities that need to be completed together. For instance, for an online travel site, you might have a session bean method bookTravel that takes a credit card, ensures its valid, charges the
-
Opening Mac ID CS6 IDML-document on Windows ID CS4
If I create an IDML-document with my Mac InDesign CS6, can I (or my clients) open it on Windows InDesign CS4? Are there any problems, that may occur?