SQL 2012 Compatibility and Vista View Conversion Presented By: Deepali Savkoor Ellucian June 12, 2014
Introduction SQL Server 2012 does not provide backward compatibility with SQL 2000. Non-ANSI joins, that were only available until SQL 2000, cannot be used anymore. This session highlights changes with SQL 2012, in addition to the Non-ANSI joins. Discuss Vista View Conversion, that is affected by the compatibility change. 2
Agenda New features in SQL Server 2012 SQL Server 2012 Compatibility SQL 2012 Reporting Services compatibility 8.4 Database Upgrade Advisory Report Vista View Conversion Utility 8.4 PowerCampus Vista View Wizard changes 3
SQL 2012 new features Column store indexes Sequence objects Pagination using new OFFSET and FETCH commands Contained database setting Error handling with THROW command Windows server core support Data Quality Services (DQS) 4
SQL 2012 Compatibility SQL 2000 OR 80 level compatibility is not supported any more. sp_dboption is not supported anymore and should be replaced by the ALTER DATABASE sql command. RAISERROR only supports new syntax format. Non-ANSI joins (*=,=*) are not supported. Specify the WITH keyword when using table hints from 90 compatibility mode. Enclosing STOPLIST in square brackets [] as it is a reserved word from SQL 2008. 5
SQL 2012 Compatibility Other SQL 2012 compatibility notes not affecting PowerCampus baseline Selecting from columns or tables named NEXT. EXECUTE AS The ALTER TABLE statement allows only two-part (schema.object) table names. WITHIN reserved keyword. CAST and CONVERT operations on computed columns of type time or datetime2. 6
SQL Server 2012 Reporting Services compatibility changes SharePoint Mode server references require the SharePoint Site. To reference the report server, the URL would look similar to the following: http://<server Name>/sites/videos/_vti_bin/ReportServer The Configuration of Reporting Services SharePoint is now completed using PowerShell cmdlets and SharePoint Central Administration and cannot be done by the Reporting Services Configuration Manager. 7
SQL Server 2012 Reporting Services compatibility changes Report Model Designer is not available in SQL Server Data Tools. You can continue to use report models as data sources in reports authored in SQL Server 2012 Reporting Services (SSRS) tools such as Report Builder and Report Designer. However, to update report models, you can use SQL Server 2008 R2 Reporting Services. A list of all SQL 2012 backward compatibility changes are available on the Microsoft website at http://msdn.microsoft.com/en-us/library/cc280407.aspx 8
8.4 Database Upgrade Advisory Report Shows usage of STOPLIST keywords without square brackets in Report Filter and Sort criteria, Vista View Compute columns. Returns user vista views with more involved outer joins that the Vista View Conversion tool will be unable to convert. * For those using VWUANTICGRADDATE for their NSLC processing, they might want to copy over the modified system defined template view VWSANTICGRADDATETMPL sql and customize it again to their needs. 9
8.4 Database Upgrade Advisory Report **You will need to run the 8.4 PowerCampus database upgrade on a database at the existing 80 (SQL2000) compatibility level. Run the vista view conversion utility and ensure any other customized views and code (PowerCampus, Self-Service, SQL Reports) do not have any Sql2000-only compatible features before you migrate to SQL Server 2012 or switch compatibility level higher than Sql2000. The query below maybe used to search star joins used in database objects such as assessment stored procedures. 10
Vista View Conversion Utility Tool uses the data in the VISTAVIEW* metadata tables to recreate the syntax for only the user views with non-ansi outer joins (*=, =*) and rebuild the views. On running the VistaView Conversion install (PowerCampusVistaViewConversion84Setup.exe), you will see the conversion utility program in the Start menu. 11
Vista View Conversion Utility The sql behaves differently for the optional tables that have criteria in the WHERE clause as compared to the same criteria in the JOIN clause. To maintain integrity of the results returned like they did before, the criteria for the optional tables are moved to the JOIN clause. 12
Vista View Conversion Utility Run the VistaViewGen utility and provide database connection information. When the process is complete, a trace log file is created in the folder where the utility is installed such as C:\Program Files (x86)\ellucian\powercampus Vista View Conversion\Log. 13
Vista View Conversion Utility A list of user vista views that the conversion utility was unable to convert, is also stored in the same location as the log file. 14
Vista View Conversion Utility If the view syntax had been altered prior to conversion, these will not be converted. This is because the conversion uses the VISTAVIEW* metadata tables to regenerate the syntax and in case of an altered view the final syntax may not necessarily reflect what was originally added in the other tabs of the Vista View wizard. Also views that have filter criteria on the optional tables in the WHERE clause combined with OR conditions will not be converted. This is because moving the criteria to the JOIN clause can break the OR condition and it can get even more complicated when parentheses are also involved. 15
Vista View Conversion Utility You can open the Vista View Wizard, go to the Syntax tab and make the changes there or click Revert and redefine the conditions. A backup of all the previous data in the related tables that are modified during the conversion process is available in the tables below. SAVE_VISTAVIEW SAVE_VISTAVIEWCRITERIA SAVE_VISTAVIEWSYNTAX 16
Vista View Wizard Changes To accommodate the ANSI join format, the Join tab of the Vista View wizard was modified to specify the joins at the table level ( instead of column level done previously). 17
Vista View Wizard Changes The columns that the tables are being joined on, can be specified in the right-hand side area. Also any additional criteria on the outer joined tables can be entered in the lower right box. 18
Summary Make note of all compatibility changes when upgrading to SQL 2012 or switching compatibility level from SQL2000. Run Vista View Conversion tool to fix the Vista views with non-ansi joins. Fix the unconverted Vista views manually using the Vista View Wizard in PowerCampus 8.4. 19
FAQs Q: Is there a utility that can give us a list of problem views without converting them so we can identify which views have issues so that we can correct before conversion or figure out alternatives? You may run the 8.4 PowerCampus Database Upgrade Advisory report (DBUpgradeAdvisoryReport.sql). In the Results tab, look for the column header named Vista Views with Unsupported Outer Joins. Q: If we are not going to SQL 2012 at this time but are going to PC 8.4, should we run this utility with 8.4? It is recommended that you run the Vista View Conversion utility even if you are not migrating to SQL 2012. Otherwise you may end up with inconsistent syntax especially if you edit views in the 8.4 Vista View Wizard. Q: Can you run 8.4 in SQL 2000 compatibility mode? Yes Q: Will the base Vista Views be converted in release 8.4? Yes 20
SQL Server 2012 Compatibility Questions? Banner, Colleague, Ellucian, and Luminis are trademarks of Ellucian Company L.P. or its affiliates and are registered in the U.S. and other countries. Ellucian Advance, Ellucian Course Signals, Ellucian Degree Works, Ellucian PowerCampus, Ellucian Recruiter, Ellucian SmartCall, and are trademarks of Ellucian Company L.P. or its affiliates. Other names may be trademarks of their respective owners. 2009 2013 Ellucian Company L.P. and its affiliates. 2009 2014 Ellucian Company L.P. and its affiliates. 21