|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 5:16 PM
Points: 5,101,
Visits: 20,201
|
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 9:52 AM
Points: 1,277,
Visits: 1,608
|
|
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://beyondrelational.com/modules/2/blogs/77/nakuls-blog.aspx Be courteous. Drive responsibly.
Follow me on Twitter: @nakulv_sql Google Plus: +Nakul
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 4:30 PM
Points: 5,235,
Visits: 7,038
|
|
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.
Hugo Kornelis, SQL Server MVP Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 4:30 PM
Points: 5,235,
Visits: 7,038
|
|
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?
Hugo Kornelis, SQL Server MVP Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 9:52 AM
Points: 1,277,
Visits: 1,608
|
|
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://beyondrelational.com/modules/2/blogs/77/nakuls-blog.aspx Be courteous. Drive responsibly.
Follow me on Twitter: @nakulv_sql Google Plus: +Nakul
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Yesterday @ 3:48 AM
Points: 3,125,
Visits: 4,311
|
|
Good question, thanks, Ron.
____________________________________________ Space, the final frontier? not any more... All limits henceforth are self-imposed. “libera tute vulgaris ex”
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 2:42 PM
Points: 877,
Visits: 1,158
|
|
Nice question.. Thanks for submitting...
Thanks
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 4:02 PM
Points: 5,269,
Visits: 11,203
|
|
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.
---------------------------------------------------------------------
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 4:30 PM
Points: 5,235,
Visits: 7,038
|
|
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.
Hugo Kornelis, SQL Server MVP Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 9:52 AM
Points: 1,277,
Visits: 1,608
|
|
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://beyondrelational.com/modules/2/blogs/77/nakuls-blog.aspx Be courteous. Drive responsibly.
Follow me on Twitter: @nakulv_sql Google Plus: +Nakul
|
|
|
|