[ic] Convert access.gdbm to mysql

Mike Heins interchange-users@icdevgroup.org
Mon May 12 10:50:01 2003


Quoting Neil Hambleton (hambletn@netvigator.com):
> At 01:21 PM 01/03/2003 -0500, you wrote:
> > > Jan  3 10:19:51 mordred int1: Died in server spawn: Could not tie to
> > > '/var/lib/interchange/catalogs/ghast/products/access.gdbm': Resource
> > > temporarily unavailable at /usr/lib/interchange/Vend/Table/GDBM.pm line
> > > 115.
> >>
> >> Multiple users trying to use the admin backend simultaneously with
> >> the same user account.
> >
> >If you are using an SQL database for most of your tables, I would
> >suggest you convert access to SQL and see if that helps. GDBM is weak
> >when it comes to multi-user/session access.
>
> I think I may be having a similar problem under IC 4.8.6, and was
> going to try converting "access" to SQL instead of gdbm. I have
> looked, but not found any documentation on this sort of conversion. My
> plan was to:
> 
> 1. Use the Admin UI to export access to access.txt
> 2. Create a dbconf/mysql/access.mysql file
> 3. Remove dbconf/mysql/access.dbm
> 4. Restart Interchange and hope it picks up my new configuration
> 
> However I'm a little unsure about the format of the access.mysql file. I was
> going to use something like:
> 
> Database  access access .txt    __SQLDSN__
> ifdef SQLUSER
> Database  access  USER         __SQLUSER__
> endif
> ifdef SQLPASS
> Database  access     PASS         __SQLPASS__
> endif
> Database  access     COLUMN_DEF   "username=char(14) NOT NULL PRIMARY KEY"
> 
> But I'm concerned about whether "char(14)" is sensible for username, and
> whether I need to include COLUMN_DEF statements for the other fields. If so,
> how do I find out what datatypes, sizes and indices to include?

I would recommend something like:

Database  access access .txt    __SQLDSN__

ifdef SQLUSER
Database  access  USER         __SQLUSER__
endif

ifdef SQLPASS
Database  access     PASS         __SQLPASS__
endif

Database  access     DEFAULT_TYPE text
Database  access     COLUMN_DEF   "username=varchar(32) NOT NULL PRIMARY KEY"
Database  access     COLUMN_DEF   "password=varchar(64)"
Database  access     COLUMN_DEF   "label=varchar(128)"
Database  access     COLUMN_DEF   "name=varchar(64)"
Database  access     COLUMN_DEF   "last_login=varchar(32)"
Database  access     COLUMN_DEF   "super=varchar(3)"

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

There's nothing sweeter than life nor more precious than time.
-- Barney