Hi,

> -----Original Message-----
> From: Tanu Shankar Bhatnagar [mailto:[EMAIL PROTECTED]]
> Sent: Montag, 10. Februar 2003 19:29
> To: Schroeder, Alexander; [EMAIL PROTECTED]
> Subject: RE: issue with jdbc connection
> 
> 
> I was able to make it run after uninstalling/reinstalling the 
> sample db
> rpm. In the process I did get some errors, not sure if they 
> were benign. 
> 
> Here is the detailed transcript of what all I did:
> ==================================================
> 
> It might be something to do with permissions. I have 
> installed the db as
> root on my machine. I start and stop the x_server as root. 
> These are the
> steps I am following:
> 
> One
> ---
> First I stopped the x_server (as root). Then I ran the drop 
> db script. If
> I do it as me, I get:
>  ./drop_demo_db.sh 
> + SID=TST74
> + x_server start
>     12751  XSERVER  XSERVER started, 'X32/LINUX 7.4.3    Build
> 010-000-035-462'
> ERR 11895  XSERVER  Redirect message output to
> '/var/opt/sapdb/indep_data/wrk/xserver.prt' failed:Permission denied

You stopped the x_server as root, but restarted it as an unprivelegded user. The 
failed, because the directory /var/opt/sapdb/indep_data/wrk/ must at least be 
read/writable for all users that you want to allow to start the x_server. Otherwise 
you run into that problem, since the previous 'xserver.prt' is owned by the last 
x_server starter, which was root!

> + dbmcli -d TST74 -u dbm,dbm db_offline
> + dbmcli -s -d TST74 -u dbm,dbm db_drop
> + rmdir /home/tanu/TST74
> + exit 0
> 
> Since I get permission denied, I am not sure it worked. So I did this
> again as root, and it worked ok.
>

The previous TST74 was created by root! Therefore all files and the rundirectory was 
owned by root.

> 
> Two
> ---
> I tried to run create_demo_db.sh script as root but was prevented from
> doing so. I then ran it as me and I get the following errors:
> 
> a) when x_server is running
> ./create_demo_db.sh 
> ERR 11641  XSERVER  XSERVER is already running!
> create database TST74...
> create TST74 failed: ERR
> -24994,ERR_RTE: runtime environment error
> 1,mkstemp failed:Permission denied
>

The directory /usr/spool/sql/ini/ must read/writable for all users that you want to 
allow to start to create databases. During registration of the database a file in this 
directory is created ( mkstemp failed... ). Your 'root' installation restricted your 
access rights to this directory too much...

> 
> b) when x_server is not running
>  ./create_demo_db.sh 
>     12751  XSERVER  XSERVER started, 'X32/LINUX 7.4.3    Build
> 010-000-035-462'
> ERR 11895  XSERVER  Redirect message output to
> '/var/opt/sapdb/indep_data/wrk/xserver.prt' failed:Permission denied
> create database TST74...
> create TST74 failed: ERR
> -24994,ERR_RTE: runtime environment error
> 1,mkstemp failed:Permission denied
> 
> So I don't know what permissions do I need to create the db again.

see above...

> 
> Three
> -----
> But then, I uninstalled the sample db rpm and reinstalled it. 
> This is what
> I get:
> rpm -ivh sapdb-testdb74-7.4.3.10-1.i386.rpm 
> Preparing...                
> ###########################################
> [100%]
>    1:sapdb-testdb74         
> ###########################################
> [100%]
>     12751  XSERVER  XSERVER started, 'X32/LINUX 7.4.3    Build
> 010-000-035-462'
> ERR 11641  XSERVER  XSERVER is already running!
> 
> I assume the last error is benign?!

The script simply tries to start x_server. If it is already running this error is 
reported. So it is benign.

> 
> Four
> ----
> And I test the db through dbmcli (running as me, not as root):
> 
> [tanu@klpd FirstSteps]$ dbmcli -u dbm,dbm -d TST74 db_state 
> OK
> State
> ONLINE
> [tanu@klpd FirstSteps]$ dbmcli -uSQL test,test -u dbm,dbm -d TST74
> sql_execute select 1 from dual;
> OK
> END     
> 1
> 
> Five
> ----
> And then finally:
> [tanu@klpd Java]$ java HelloSapDB -u test,test -d TST74
> hello world
> 
> It worked!!! Don't know what exactly the issue was. Maybe some
> installation thing and uninstalling/reinstalling the testdb 
> did the trick!
> 

I assume by reinstalling you got the right permissions on the registration directory.

> Hope someone can provide me some answers to what I saw here. 
> And hopefully
> the detailed transcript will help others facing this issue. 
> 
> Enoy!
> -Tanu
> 

CU
jrg

>  
> --- "Schroeder, Alexander" <[EMAIL PROTECTED]> wrote:
> > Hi Tanu,
> > 
> > can you connect and execute statements via dbmcli:
> > 
> > dbmcli -uSQL test,test -u dbm,dbm -d TST74 sql_execute select 1 from
> > dual
> > 
> > ?
> > 
> > Also, did the create_demo_db.sh script run without any 
> error messages?
> > 
> > -4008 means username/password unknown. This is quite ok if 
> you try with
> > the dbm, as dbm is a database operator, not an user suitable for SQL
> > execution etc. But normally the test user should work, and also the 
> > message "Unknown user name/password combination" should be shown
> > whenever
> > this error occurs, so I assume something bad happened during DB
> > creation.
> > 
> > The script create_demo_db.sh drops the db and recreates it 
> again, if run
> > 
> > twice, so you may try again from here.
> > 
> > Regards
> > Alexander Schr�der
> > SAP Labs Berlin
> > 
> 
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
> _______________________________________________
> sapdb.general mailing list
> [EMAIL PROTECTED]
> http://listserv.sap.com/mailman/listinfo/sapdb.general
> 
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to