Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 2 of 2 total |
Database path and user roles |
Mon, Jan 9 2017 4:36 AM | Permanent Link |
Hershcu Sorin | Hello
I run the command: SELECT Path FROM Databases WHERE Name = myData If I run as public user the Path is empty. As administrator I get right Path. Is this the normal behavior? Thanks Sorin |
Mon, Jan 9 2017 1:25 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Hershcu,
<< I run the command: SELECT Path FROM Databases WHERE Name = myData If I run as public user the Path is empty. As administrator I get right Path. Is this the normal behavior? >> Yes, this is done as a security measure to ensure that non-administrators do not get access to internal information about the machine on which the EDB Server (or the process that is using EDB) is running. There *is* a way around this, but you specifically have to take some steps to allow it, namely creating this function in your database(s): CREATE FUNCTION "GetDatabasePath" (IN "DBName" VARCHAR COLLATE "ANSI") RETURNS VARCHAR COLLATE "ANSI" BEGIN DECLARE LookupCursor SENSITIVE CURSOR FOR LookupStmt; DECLARE Result VARCHAR; PREPARE LookupStmt FROM 'SELECT Path FROM Configuration.Databases '+ ' WHERE Name = ?'; OPEN LookupCursor USING DBName; FETCH FIRST FROM LookupCursor ('Path') INTO Result; RETURN Result; END You *can* run such a function as a normal user and have it return the result because such functions/procedures run as the special "System" user, not as the current user. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Sunday, May 5, 2024 at 10:18 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |