Isn't ASP just as old as the image
data type? The image data type has been deprecated since SQL 2005, but I guess they had stopped developing ASP by then.
ASPState Database Creation Script and SQLServer 2019 - Image Data Type is Deprecated
Our DBA ran a SQL Server 2019 Upgrade analysis against our current SQL 2016 server, which contains our ASPState database. The results showed that Image data type is deprecated. Is there an updated version of InstallSQLState.sql that creates the ASPState db and does not use the image data type?
4 answers
Sort by: Most helpful
-
Erland Sommarskog 100.9K Reputation points MVP
2021-10-06T21:37:17.703+00:00 -
MehaffieShawn-4963 0 Reputation points
2024-01-04T02:28:34.53+00:00 It is not ASP the language it is the ASPState database that is a database MS supports for storing cached data. So they provide the scripst to create the database and setup permissions. So he cannot simply change the field to not be image, since that could break a whole lot of stuff in the SPROCS, etc. If MS is still making it an image field I would keep it and expect that at some point MS will provide an updated version of InstallSQLState.sql script once it is finally unsupported. It would be better for MS to provided an update script as soon as it was deprecated, but if they don't and the database works on 2019 with the script they did provide, then just go with it and use it.
-
Jingyang Li 5,891 Reputation points
2024-01-04T03:12:52.8966667+00:00 You can find this MS sample for updated version of the script. (But you may still need a little fix to remove the image type left over inside the code).
-
Bruce (SqlWork.com) 55,686 Reputation points
2024-01-04T20:32:53.7333333+00:00 aspstate is part of the aspnet 4.* framework. This framework is mature and only receiving security fixes. the old scripts are in the C:\Windows\Microsoft.NET\Framework64\v4.0.30319 folder.
you can safely change image to varbinary(max) in the table definition. this is the only change required to the scripts.
if you want to change the schema it is better to do it outside the utility. you can use the above script, or as I have done, create a visual database project from a generated database. you can then edit, and have a deployment package.
you might also want to change to the new async state provider
https://www.nuget.org/packages/Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync/