toind function fails

Post Reply
mszabo
Posts: 1
Joined: Fri Jan 26, 2001 2:58 pm

toind function fails

Post by mszabo »

I'm using Vignette to migrate some data from oracle to Texis (See NealP's post above). Since some of the data is a CLOB field, I'm writing that data to a text file, with the intention of using "toind" to create an INDIRECT pointer.

I have a SQL file populated with UPDATE commands like this:

UPDATE THERMO_SEARCH SET CONTENT = toind(fromfile('/apps/vignette/inst-qacms/thunderdb/files/2.txt')) WHERE THERMO_SEARCH_ID = 2;

I'm using the following TSQL command:

tsql -q -h -v -r -u _SYSTEM -p "" -d /apps/vignette/inst-qacms/thunderdb -i /tmp/postmigrate.sql

When I run the TSQL to process the SQL file, it give me the following error for every UPDATE command:

002 Can't open KDBF file /apps/vignette/inst-qacms/thunderdb/THERMO_SEARCH.tbl for writing: error
13: Permission denied
002 Unable to open table /apps/vignette/inst-qacms/thunderdb/THERMO_SEARCH in the function opendbt
bl
115 No such table: THERMO_SEARCH in the database: /apps/vignette/inst-qacms/thunderdb/
000 SQL failed
SQL 1>UPDATE THERMO_SEARCH SET CONTENT = toind(fromfile('/apps/vignette/inst-qacms/thunderdb/files/24.txt')) WHERE THERMO_SEARCH_ID = 24;
002 Can't open KDBF file /apps/vignette/inst-qacms/thunderdb/THERMO_SEARCH.tbl for writing: error
13: Permission denied
002 Unable to open table /apps/vignette/inst-qacms/thunderdb/THERMO_SEARCH in the function opendbt
bl

What am I doing wrong? I've played with file perms on the database to no avail.

thanks,

Mark
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

toind function fails

Post by John »

That does look like a permission problem. Normally tsql will run setuid a particular user, so you should make sure that the database directory and all files are owned by that user. That will normally be the case if creatdb is also setuid the same user.

If you are happy leaving the files where you created them you can simply insert the filename into the field, e.g.

UPDATE THERMO_SEARCH SET CONTENT = '/apps/vignette/inst-qacms/thunderdb/files/24.txt' WHERE THERMO_SEARCH_ID = 24;
John Turnbull
Thunderstone Software
Post Reply