This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided "as is" with no warranties.

Issue

After applying a fix pack above K2 5.1 FP 19, you'll notice that some of your other applications that are dependent on calling to the old SmartBox schema i.e. dbo.SmartBoxName (or if they are calling just the table name SELECT * FROM SmartBoxName,) will error and no longer return data.

Symptoms

  • This behavior started after you upgraded to a Fix Pack ahead of K2 5.1 FP 19, which includes 5.1 and also the K2 5.1 November CU.
  • Running a query (as below) will give you an error in SQL Server Management Studio:

SELECT * FROM Smartbox1
Error: Msg 208, Level 16, State 1, Line 1 Invalid object name 'Smartbox1'.

  • Previously, such a query would return data saved on that Smartbox.
  • You will see on the K2 Database under the Synonyms folder that you can not find a synonym with the same name as the Smartbox name.

Image

Resolution

This behavior is expected and is by design. These synonyms were temporarily created by the installer when an upgrade from 4.7 > 5.1 was done due to the Smartbox schema changing from dbo to SmartBoxData. The synonyms were created in case there were any parts of the product still referencing the old schema name. They were removed once it was confirmed that these were no longer needed as they were not necessary.

Schema changes like this can occur at any time and direct querying from the K2 Database is not supported for reasons such as this. If you need to report on data from K2 via SmartObjects the supported way is to use the K2 SmartObject API to query these SmartObjects via code.