SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Resource Database


Resource Database

Author
Message
bitbucket-25253
bitbucket-25253
SSCertifiable
SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)

Group: General Forum Members
Points: 7807 Visits: 25280
Comments posted to this topic are about the item Resource Database

If everything seems to be going well, you have obviously overlooked something.

Ron

Please help us, help you -before posting a question please read

Before posting a performance problem please read
Nakul Vachhrajani
Nakul Vachhrajani
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2250 Visits: 2143
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
Be courteous. Drive responsibly.

Follow me on
Twitter: @sqltwins
Google Plus: +Nakul
Hugo Kornelis
Hugo Kornelis
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10971 Visits: 11985
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
Hugo Kornelis
Hugo Kornelis
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10971 Visits: 11985
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
Nakul Vachhrajani
Nakul Vachhrajani
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2250 Visits: 2143
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
Be courteous. Drive responsibly.

Follow me on
Twitter: @sqltwins
Google Plus: +Nakul
Stewart "Arturius" Campbell
Stewart "Arturius" Campbell
SSCrazy Eights
SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)

Group: General Forum Members
Points: 8853 Visits: 7281
Good question, thanks, Ron.

____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
Hardy21
Hardy21
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1576 Visits: 1399
Nice question.. Thanks for submitting...

Thanks
george sibbald
george sibbald
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10298 Visits: 13687
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.

---------------------------------------------------------------------
Hugo Kornelis
Hugo Kornelis
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10971 Visits: 11985
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
Nakul Vachhrajani
Nakul Vachhrajani
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2250 Visits: 2143
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
Be courteous. Drive responsibly.

Follow me on
Twitter: @sqltwins
Google Plus: +Nakul
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search