dbTalk Databases Forums  

Problem selecting file from directory access server

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss Problem selecting file from directory access server in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Marvin
 
Posts: n/a

Default Problem selecting file from directory access server - 09-09-2009 , 02:12 PM






I have a directory access server created with the following command:

CREATE SERVER "createqadboutput" CLASS 'DIRECTORY' USING 'ROOT=/
tmp;READONLY=YES';
CREATE EXTERNLOGIN "DBA" TO "createqadboutput";
CREATE EXISTING TABLE "DBA"."LinuxTmp" AT 'createqadboutput;;;.';

Which then defines the external table with these columns:

CREATE EXISTING TABLE "DBA"."LinuxTmp" (
"permissions" VARCHAR(10) NOT NULL,
"size" BIGINT NOT NULL,
"access_date_time" "datetime" NOT NULL,
"modified_date_time" "datetime" NOT NULL,
"create_date_time" "datetime" NOT NULL,
"owner" VARCHAR(20) NOT NULL,
"file_name" VARCHAR(4096) NOT NULL,
"contents" LONG BINARY NOT NULL
) AT 'createqadboutput;;;.';


Then I do the following select and it works using SQL Anywhere
11.0.1.2222:

select * from dba.LinuxTmp where file_name = 'createQADB.txt';

permissions,size,access_date_time,modified_date_ti me,create_date_time,owner,file_name,contents
'-rw-rw-rw-',2026,'2009-09-09 13:06:09.000','2009-09-09
07:49:03.000','2009-09-09 07:49:03.000','sybase','createQADB.txt',

Now I applied patch 2279 so the databsae is at 11.0.1.2279 running on
CentOS 5.3 (RedHat 5.3).
WhenI run the same query it does not come back with anything.

With patch 2279 the only way I can make it work is by casting the
"file_name".

select * from dba.LinuxTmp where cast(file_name as varchar) =
'createQADB.txt'; -- This works
select * from dba.LinuxTmp where file_name =
'createQADB.txt'; -- This does not work

Is this a bug that patch 2279 introduced where it is required to cast
the file_name? This does not
seem to affect any other proxy tables to SQL Anywhere databases but
just Directory Access Servers.

Reply With Quote
  #2  
Old   
Nick Elson [Sybase iAnywhere]
 
Posts: n/a

Default Re: Problem selecting file from directory access server - 09-10-2009 , 10:54 AM






There was a change checked into 11.0.1 build 2254
that may be affecting this.

Make sure your ebf applied correct to all the exe and
dlls. Pay special attention to the builds for these
modules:
dbsrv11.exe
dbserv11.dll
dbcis11.dll
dblg__11.dll

and if they are all at the same and higher build numbers
consider submitting this as a bug [by either contacting
technical support or submitting an annonymous bug
submission at http://case-express.sybase.com/cx/bugInfo.do]

"Marvin" <mamiles (AT) gmail (DOT) com> wrote

Quote:
I have a directory access server created with the following command:

CREATE SERVER "createqadboutput" CLASS 'DIRECTORY' USING 'ROOT=/
tmp;READONLY=YES';
CREATE EXTERNLOGIN "DBA" TO "createqadboutput";
CREATE EXISTING TABLE "DBA"."LinuxTmp" AT 'createqadboutput;;;.';

Which then defines the external table with these columns:

CREATE EXISTING TABLE "DBA"."LinuxTmp" (
"permissions" VARCHAR(10) NOT NULL,
"size" BIGINT NOT NULL,
"access_date_time" "datetime" NOT NULL,
"modified_date_time" "datetime" NOT NULL,
"create_date_time" "datetime" NOT NULL,
"owner" VARCHAR(20) NOT NULL,
"file_name" VARCHAR(4096) NOT NULL,
"contents" LONG BINARY NOT NULL
) AT 'createqadboutput;;;.';


Then I do the following select and it works using SQL Anywhere
11.0.1.2222:

select * from dba.LinuxTmp where file_name = 'createQADB.txt';

permissions,size,access_date_time,modified_date_ti me,create_date_time,owner,file_name,contents
'-rw-rw-rw-',2026,'2009-09-09 13:06:09.000','2009-09-09
07:49:03.000','2009-09-09 07:49:03.000','sybase','createQADB.txt',

Now I applied patch 2279 so the databsae is at 11.0.1.2279 running on
CentOS 5.3 (RedHat 5.3).
WhenI run the same query it does not come back with anything.

With patch 2279 the only way I can make it work is by casting the
"file_name".

select * from dba.LinuxTmp where cast(file_name as varchar) =
'createQADB.txt'; -- This works
select * from dba.LinuxTmp where file_name =
'createQADB.txt'; -- This does not work

Is this a bug that patch 2279 introduced where it is required to cast
the file_name? This does not
seem to affect any other proxy tables to SQL Anywhere databases but
just Directory Access Servers.

Reply With Quote
  #3  
Old   
Karim Khamis [Sybase iAnywhere]
 
Posts: n/a

Default Re: Problem selecting file from directory access server - 09-14-2009 , 09:57 AM



Thank you for reporting this problem. A bug was introduced in SA 11.0.1
build 2237 which caused the behavior you are now seeing. The problem
that you described below has been fixed in SA 11.0.1 build 2315 and will
be available in a future EBF. In the meantime, please continue to use
your "CAST" work around.

Karim
Marvin wrote:
Quote:
I have a directory access server created with the following command:

CREATE SERVER "createqadboutput" CLASS 'DIRECTORY' USING 'ROOT=/
tmp;READONLY=YES';
CREATE EXTERNLOGIN "DBA" TO "createqadboutput";
CREATE EXISTING TABLE "DBA"."LinuxTmp" AT 'createqadboutput;;;.';

Which then defines the external table with these columns:

CREATE EXISTING TABLE "DBA"."LinuxTmp" (
"permissions" VARCHAR(10) NOT NULL,
"size" BIGINT NOT NULL,
"access_date_time" "datetime" NOT NULL,
"modified_date_time" "datetime" NOT NULL,
"create_date_time" "datetime" NOT NULL,
"owner" VARCHAR(20) NOT NULL,
"file_name" VARCHAR(4096) NOT NULL,
"contents" LONG BINARY NOT NULL
) AT 'createqadboutput;;;.';


Then I do the following select and it works using SQL Anywhere
11.0.1.2222:

select * from dba.LinuxTmp where file_name = 'createQADB.txt';

permissions,size,access_date_time,modified_date_ti me,create_date_time,owner,file_name,contents
'-rw-rw-rw-',2026,'2009-09-09 13:06:09.000','2009-09-09
07:49:03.000','2009-09-09 07:49:03.000','sybase','createQADB.txt',

Now I applied patch 2279 so the databsae is at 11.0.1.2279 running on
CentOS 5.3 (RedHat 5.3).
WhenI run the same query it does not come back with anything.

With patch 2279 the only way I can make it work is by casting the
"file_name".

select * from dba.LinuxTmp where cast(file_name as varchar) =
'createQADB.txt'; -- This works
select * from dba.LinuxTmp where file_name =
'createQADB.txt'; -- This does not work

Is this a bug that patch 2279 introduced where it is required to cast
the file_name? This does not
seem to affect any other proxy tables to SQL Anywhere databases but
just Directory Access Servers.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.