May 30, 2012 at 9:23 pm
Comments posted to this topic are about the item Resource Database
May 30, 2012 at 9:36 pm
It is my understanding that the service packs/upgrades have the potential to modify all databases on the SQL Server instance, therefore, simply replacing the resource database to rollback an SP/update is not enough.
The reasoning behind this is that if we take a backup of a database on let's say SQL Server 2008 SP1, we cannot restore it in SQL Server 2008 RTM.
Please correct me if wrong.
Thanks & Regards,
Nakul Vachhrajani.
http://nakulvachhrajani.com
Follow me on
Twitter: @sqltwins
May 31, 2012 at 1:27 am
Good question! One minor nag (isn't there always one?) - I don't like the wording "System objects such as sys.objects are physically persisted in the Resource database" (and yes, I know that similar wording is used in BOL). This suggests to me that the result of "select * from sys.objects" is persisted (as the same term is used in documentation about indexed views, aka persisted views - where that is exactly what happens).
Reality is that metadata about user objects (which is what you see when you query sys.objects) is stored in hidden tables in user databases; sys.objects is not a system table but a system VIEW, and the source code of that views (the query on the hidden actual system tables) is what's stored in the resource database.
May 31, 2012 at 1:31 am
Nakul Vachhrajani (5/30/2012)
It is my understanding that the service packs/upgrades have the potential to modify all databases on the SQL Server instance, therefore, simply replacing the resource database to rollback an SP/update is not enough.The reasoning behind this is that if we take a backup of a database on let's say SQL Server 2008 SP1, we cannot restore it in SQL Server 2008 RTM.
Please correct me if wrong.
I'm not sure if I understand the question. Service pack upgrades (and downgrades in the case you roll back an upgrade) always apply to the entire instance, and affect all databases on the instance. As far as I know, data and log files are never modified as part of a service pack install.
If what you say is true (backkups on SP1 can't be loaded on RTM), then the reason is that the code that is executed when you perform a backup or restore statement has been changed as part of the service pack. This code lives partly in the sql server executables (sqlservr.exe and a whole bunch of DLLs), and partly in the defintions of system objects in resourcedb. The latter part is mostly the code for system stored procedures and system views.
Does this address your question?
May 31, 2012 at 1:37 am
Hugo Kornelis (5/31/2012)
Nakul Vachhrajani (5/30/2012)
It is my understanding that the service packs/upgrades have the potential to modify all databases on the SQL Server instance, therefore, simply replacing the resource database to rollback an SP/update is not enough.The reasoning behind this is that if we take a backup of a database on let's say SQL Server 2008 SP1, we cannot restore it in SQL Server 2008 RTM.
Please correct me if wrong.
I'm not sure if I understand the question. Service pack upgrades (and downgrades in the case you roll back an upgrade) always apply to the entire instance, and affect all databases on the instance. As far as I know, data and log files are never modified as part of a service pack install.
If what you say is true (backkups on SP1 can't be loaded on RTM), then the reason is that the code that is executed when you perform a backup or restore statement has been changed as part of the service pack. This code lives partly in the sql server executables (sqlservr.exe and a whole bunch of DLLs), and partly in the defintions of system objects in resourcedb. The latter part is mostly the code for system stored procedures and system views.
Does this address your question?
Thank-you, Hugo. It does address my question completely.
Once again, thank-you (as always!)
Thanks & Regards,
Nakul Vachhrajani.
http://nakulvachhrajani.com
Follow me on
Twitter: @sqltwins
May 31, 2012 at 2:32 am
This was removed by the editor as SPAM
May 31, 2012 at 2:42 am
Nice question.. Thanks for submitting...
Thanks
May 31, 2012 at 4:01 am
I think we should clarify that you should not remove a service pack simply by replacing the resource database with a previous version of it. I'm sure there is more to it than that and service packs should be backed out using add\remove programs.
I'm not saying the question suggested that but it seems possible people might infer it.
---------------------------------------------------------------------
May 31, 2012 at 4:14 am
george sibbald (5/31/2012)
I think we should clarify that you should not remove a service pack simply by replacing the resource database with a previous version of it. I'm sure there is more to it than that and service packs should be backed out using add\remove programs.I'm not saying the question suggested that but it seems possible people might infer it.
A very good addition!
A service pack involves changes to the actual executables (sqlservr.exe, DDLs, etc) and corresponding changed to system objects. The install/uninstall program of a service pack will stop the SQL Server service, replace the executables, replace the resource database, and then restart the service. In older (pre-SQL 2005) versions of SQL Server, the installer/uninstaller of a service pack would also replace executables, but replacing the system objects would be done in a much more elaborate way (by running scripts that alter all the affected procedures, views, etc). Simply replacing a database was not possible, since the definitions of system objects then lived in the master database, which also holds the metadata of user databases, plus all logins and other server-level objects.
May 31, 2012 at 4:19 am
Hugo Kornelis (5/31/2012)
george sibbald (5/31/2012)
I think we should clarify that you should not remove a service pack simply by replacing the resource database with a previous version of it. I'm sure there is more to it than that and service packs should be backed out using add\remove programs.I'm not saying the question suggested that but it seems possible people might infer it.
A very good addition!
A service pack involves changes to the actual executables (sqlservr.exe, DDLs, etc) and corresponding changed to system objects. The install/uninstall program of a service pack will stop the SQL Server service, replace the executables, replace the resource database, and then restart the service. In older (pre-SQL 2005) versions of SQL Server, the installer/uninstaller of a service pack would also replace executables, but replacing the system objects would be done in a much more elaborate way (by running scripts that alter all the affected procedures, views, etc). Simply replacing a database was not possible, since the definitions of system objects then lived in the master database, which also holds the metadata of user databases, plus all logins and other server-level objects.
In fact, that's what threw me off a bit. Then Hugo kindly reminded me of the fact that a SP = code + system object change, which resolved the confusion.
Thanks & Regards,
Nakul Vachhrajani.
http://nakulvachhrajani.com
Follow me on
Twitter: @sqltwins
May 31, 2012 at 6:07 am
good question!!! and great comments about it!!!
thanks !!!
May 31, 2012 at 9:06 am
Thanks for the question.
----------------------------------------------------------------------------
Sacramento SQL Server users group - http://sac.sqlpass.org
Follow me on Twitter - @SQLDCH
----------------------------------------------------------------------------
May 31, 2012 at 9:45 am
Great question, Ron, Thanks!
On a second thought, should not a correct answer be worth four points? 😉
May 31, 2012 at 9:48 am
good questions - cheers
May 31, 2012 at 10:26 am
Thanks Ron
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
Viewing 15 posts - 1 through 15 (of 29 total)
You must be logged in to reply to this topic. Login to reply