SmartBox Schema synonyms are removed after upgrading to K2 5.1 FP 19 

  • 16 February 2021
  • 0 replies
  • 10 views

Userlevel 5
Badge +20
 

SmartBox Schema synonyms are removed after upgrading to K2 5.1 FP 19 

kbt158107

PRODUCT
K2 Five 5.1
BASED ON
K2 Five 5.1
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.
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

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.

0 replies

Be the first to reply!

Reply