Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To identify calls to WslMetadataServiceDLL in scripts which point to SQL Sever metadata you can run this query, post migration these scripts will need a transformation applied or the an Update SQL applied (shown later) or the script regenerated using RED 10 templates. 

Code Block
languagesql
titleFind calls to WslMetadataServiceClient
collapsetrue
-- RED 10 PostgreSQL Query (run post migration)
SELECT DISTINCT sl_obj_key AS key, sh_name AS name
FROM red.ws_scr_header JOIN red.ws_scr_line ON sl_obj_key = sh_obj_key
WHERE 
	UPPER(sl_line) LIKE UPPER('%WslMetadataServiceClient%dbo%')
 	OR 
	UPPER(sl_line) LIKE UPPER('%WslMetadataServiceClient%SQLServer%')

-- RED 8/9 SQL Server Query (run pre migration to analyze the source metadata)
SELECT DISTINCT sl_obj_key AS 'key', sh_name AS 'name'
FROM dbo.ws_scr_header JOIN dbo.ws_scr_line ON sl_obj_key = sh_obj_key
WHERE 
	UPPER(sl_line) LIKE UPPER('%WslMetadataServiceClient%dbo%')
 	OR 
	UPPER(sl_line) LIKE UPPER('%WslMetadataServiceClient%SQLServer%')
Code Block
languagesql
titlePost migration Update SQL
collapsetrue
-- RED 10 PostgreSQL update to correct calls to the WslMetadataServiceClient
UPDATE red.ws_scr_line 
SET sl_line = REGEXP_REPLACE(
                  REGEXP_REPLACE(
                      sl_line,
                      '(WslMetadataServiceClient.*)SqlServer',
                      '\1PostgreSQL',
                      'ig'
                  ),
                  '(WslMetadataServiceClient.*)dbo'
                  ,'\1red'
                  ,'ig'
              );


Anchor
Stand-alone Scripts
Stand-alone Scripts
Stand-alone Script and Procedure Objects

...