ST_Raster Trouble - SQL SERVER

1313
6
Jump to solution
09-08-2017 01:33 AM
AlbertoAloe
Occasional Contributor

Hi guys.

I'm doing some testing with ST_Raster in SQL server 2016. 

Installation was fine. I follow the exact procedure described in the help document (including checking system requirements for the server) and, as a result,  I was able to load a raster from arcgis  into the geodatabase after altering the configuration file (RASTER_STORAGE).

In SSMS I see the table with the ST_Raster column and I'm able to make some querying. However, when I try to create a table (or a variable ) with ST_PixelData I get an error.

 

If I run...

 

CREATE TABLE pixels (pdata dbo.ST_PixelData, row_id int);

INSERT INTO pixels(pdata , row_id) SELECT RASTER.getPixelData('level=1') , 1 FROM [dbo].[MEAN2008]

 

I get the following error....

 

Msg 6522, Level 16, State 1, Line 10
A .NET Framework error occurred during execution of user-defined routine or aggregate "ST_Raster": 
System.DllNotFoundException: Unable to load DLL 'pe.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
System.DllNotFoundException: 
at ESRI_ArcSDE.STRasterUtil.SdeRasterAPI.pe_coordsys_from_string(String __unnamed000)
at ESRI_ArcSDE.STRasterUtil.ST_Raster_IO.getCoordSys(Int32 rastercolumnID)
at ST_RasterCommon.exportCommon(ST_RasterCommon* , SubsetParam* __unnamed000, SByte* compression)
at ST_RasterSS.getPixelData(ST_RasterSS* , Byte* A_0, Byte* A_1)
at ESRI_ArcSDE.STRasterType.ST_Raster.getPixelData(SqlString param)

... implying that there is something missing.

I double checked all the requirements and everything seems fine including .NET version in the server. I got the libst_raster_sql.dll from the ArcGIS 10.5.1 installation.

I'd appreciate if somebody had a hint.

Thanks

Alberto

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

After you installed the 10.2.2 ArcSDE files, did you make sure to restart the SQL Server service? Then try the SQL queries again?

I have tried the following queries on a SQL Server 2014 instance with ST_Raster 10.4 installed and it worked as expected.

CREATE TABLE pixels (pdata sde.ST_PixelData, row_id int);

INSERT INTO pixels(pdata)
SELECT RASTER.getPixelData('level=1')
FROM [sde].[XXX];

Best,

Supriya

View solution in original post

6 Replies
by Anonymous User
Not applicable

Hi Alberto,

Did you run the confirm ST_Raster installation query:

SELECT <dbo or sde>.st_raster_util_getVersion();

Did you get the same error as above or did it return some results?

-Supriya

0 Kudos
AlbertoAloe
Occasional Contributor

Supriya,

when running that query I get 1000 without any error.

I was wondering if the cause of trouble may be the fact that I'm a sysadmin at sql server level but not at os level and, as a result, something went wrong in the installation . I assumed that the requirement was being a sysadmin at sql server level.

What do you think ?

I'll check that.

Alberto

0 Kudos
by Anonymous User
Not applicable

Hi Alberto,

I believe you might be running into the following bug:

BUG-000096560: The ST_Raster functions, getValue and getValueLoc, r.. 

The bug specifically states the libcompress_sql.dll is missing, but I believe the pe.dll is also part of the ArcSDE installation files and might be necessary to run some of the ST_Raster functions. Could you try the workaround noted in the bug documentation above to see if that helps?

Best,

Supriya

AlbertoAloe
Occasional Contributor

Supriya,

it did not work.

I installed the old ArcSDE installation files (10.2.2) but the result is the same. I did everything as sysadmin (os and sql server).

I Also did the following:

  1. I tried to use older libst_raster_sql.dll and createAssembly.sql (coming from ArcGIS 10.4 installation instead of 10.5.1). For consistency I used 10.4 client  when using "Create Raster Type" and also the geodatabase was 10.4 schema (even if probably does not make any difference)
  2. I double checked .NET requirements on the server and they should be OK especially because there is an installation of ArcGIS Server (4.5 or superior required)

I'm using SQL Server 2014 on Windows Server 2012 R2 Standard. The server (staging machine) also has an installation of ArcGIS Desktop & Server 10.4.

Can you confirm that what I'm experiencing is not a bug of the ST_Raster assembly ? Consider that the installation seems succesfull (I get 1000 from .st_raster_util_getVersion()) and I'm able to load a raster as ST_Raster (importing it from arcgis using a conf keyword) and using properties of the ST_Raster. When I try to go for pixel data I get the described trouble.

Alberto

by Anonymous User
Not applicable

After you installed the 10.2.2 ArcSDE files, did you make sure to restart the SQL Server service? Then try the SQL queries again?

I have tried the following queries on a SQL Server 2014 instance with ST_Raster 10.4 installed and it worked as expected.

CREATE TABLE pixels (pdata sde.ST_PixelData, row_id int);

INSERT INTO pixels(pdata)
SELECT RASTER.getPixelData('level=1')
FROM [sde].[XXX];

Best,

Supriya

AlbertoAloe
Occasional Contributor

Supriya,

I forgot to restart it !!

I did  it and now it works. Thanks !!

Alberto

0 Kudos