ERROR 999999: Error executing function - Failed to execute (CopyRaster)

6917
4
04-01-2015 03:43 AM
RamiAnvar
New Contributor

ERROR 999999: Error executing function

Unexpected operation

No spatial reference exists

This is a fragment from my log report

<Errors>

<Error>ERROR 999999: Error executing function.</Error>

<Error>Database user name and current user schema do not match. [workspace.admin.StreetLightOutages]</Error>

<Error>No spatial reference exists.</Error>

<Error>DBMS table not found</Error>

<Error>Failed to execute (CopyRaster).</Error>

</Errors>

I can't import a raster to sde schema using another user (not sde user).

The used user has all privileges (admin privileges) but an error occurred while import  raster dataset to postgresql database using ArcGIS for desktop.

While importing the same raster dataset to the same database using sde user, the operation performed successfully.

Can you help me please whats is wrong in my actions?

0 Kudos
4 Replies
SamuelBortz
New Contributor III

What permissions does the secondary user have on the PostGreSQL db?

0 Kudos
AsrujitSengupta
Regular Contributor III

<Error>Database user name and current user schema do not match.

To create\load data, a schema must be present inside the geodatabase with the same name as the connected user.

Check if this helps!

RamiAnvar
New Contributor

I've created a schema with the same name as the second user, but still have the same problem.

Please see the following PostgreSQL syntax that used to create the second Login and schema.

>> CREATE ROLE admin LOGIN PASSWORD <admin_psswd> SUPERUSER
NOINHERIT CREATEDB; 

>> \c mypostgredb

>> CREATE SCHEMA admin AUTHORIZATION admin;

>> GRANT ALL ON SCHEMA admin to admin;

>> GRANT USAGE ON SCHEMA admin TO public; 

Can you help me please whats is wrong in my syntax?

0 Kudos
BertrandLAURANCIN
Esri Contributor

Hello,

I encountered a similar issue : "Database user name and current user schema do not match."

In my case, my user/role had a search_path variable that references some schemas. The user 's schema must be in first position.

Example (for a user sig):

ALTER ROLE sig

SET search_path = sig, public, cahm,

vm_habitat_precaire, pos, vm_habitat,

vm_parc_activite, vm_patrimoine, cadastre,

adresse, cadastren_1, majic, vm_dessin,

ddc, ddc_test_veremes, sde, consult, topology;

Bertrand