LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-12-2010, 11:57 AM   #1
HasC
Member
 
Registered: Oct 2009
Location: South America - Paraguay
Distribution: Debian 5 - Slackware 13.1 - Arch - Some others linuxes/*BSDs through KVM and Xen
Posts: 329

Rep: Reputation: 55
SQL Anywhere developer edition: Howto start without interaction


I'm using SQL Anywhere 10.0.1.3415, on Debian 5. For starting the DBMS, I use this commands:
Code:
# source /opt/sqlanywhere10/bin32/sa_config.sh
# dbsrv10 /home/demo.db
And it works fine.

But, everytime I start the database, it keeps popping out this message:
Code:
Copyright (c) 2001-2007, iAnywhere Solutions, Inc. Portions copyright (c) 1988-2007, Sybase, Inc.
All rights reserved. All unpublished rights reserved.

Developer edition, not licensed for deployment.
Please confirm your acceptance of these license terms:
I accept and agree to abide by the terms and conditions of the
"IANYWHERE NO-CHARGE DEVELOPER EDITION LICENSE AGREEMENT".
Enter 'Y' for Yes and 'N' for No:
And I have to press 'Y' to init the database.

What I want is, start the database without having to type that "Y" over and over (Seems I need to purchase a license from Sybase for that...).

Or maybe, make the computer type the "Y" for me... For that, I've tried some shell redirections:
Code:
#  echo "Y" |  dbsrv10 /home/demo.db
Code:
#  echo -e "Y\n" |  dbsrv10 /home/demo.db
Code:
#  yes 'Y' | dbsrv10 /home/demo.db
But none worked. It keeps popping the "Enter Y" message.

So, any more suggestions?
 
Old 02-13-2010, 12:35 PM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,823

Rep: Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636
Quote:
Originally Posted by HasC View Post
I'm using SQL Anywhere 10.0.1.3415, on Debian 5. For starting the DBMS, I use this commands:
Code:
# source /opt/sqlanywhere10/bin32/sa_config.sh
# dbsrv10 /home/demo.db
And it works fine.

But, everytime I start the database, it keeps popping out this message:
Code:
Copyright (c) 2001-2007, iAnywhere Solutions, Inc. Portions copyright (c) 1988-2007, Sybase, Inc.
All rights reserved. All unpublished rights reserved.

Developer edition, not licensed for deployment.
Please confirm your acceptance of these license terms:
I accept and agree to abide by the terms and conditions of the
"IANYWHERE NO-CHARGE DEVELOPER EDITION LICENSE AGREEMENT".
Enter 'Y' for Yes and 'N' for No:
And I have to press 'Y' to init the database.

What I want is, start the database without having to type that "Y" over and over (Seems I need to purchase a license from Sybase for that...).

Or maybe, make the computer type the "Y" for me... For that, I've tried some shell redirections:
Code:
#  echo "Y" |  dbsrv10 /home/demo.db
Code:
#  echo -e "Y\n" |  dbsrv10 /home/demo.db
Code:
#  yes 'Y' | dbsrv10 /home/demo.db
But none worked. It keeps popping the "Enter Y" message.

So, any more suggestions?
Aside from paying for the commercial-software you're using, no.

You could write a small expect script to start this, but you're still deploying commercial software, without paying for it. Linux has many free DB's available for use/deployment, but if you want Sybase (outside of a development environment), you're either going to have to pay, or hit keys.
 
Old 02-13-2010, 12:37 PM   #3
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Try adding `< <(yes y)' to the end of the command.
 
Old 02-15-2010, 05:28 AM   #4
HasC
Member
 
Registered: Oct 2009
Location: South America - Paraguay
Distribution: Debian 5 - Slackware 13.1 - Arch - Some others linuxes/*BSDs through KVM and Xen
Posts: 329

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by TB0ne View Post
[...] but you're still deploying commercial software, without paying for it. Linux has many free DB's available for use/deployment, but if you want Sybase (outside of a development environment), you're either going to have to pay, or hit keys.
Actually, I bought a license from Sybase, which I'm using for production servers at work (And we should use Sybase, it's bosses' call).
For development, I thought I can use development version but the 'Y or N' thing it's a hassle, after a few times (around 50, for me...). But I will try expect.

Quote:
Originally Posted by jschiwal View Post
Try adding `< <(yes y)' to the end of the command.
Did this:
Code:
dbsrv10 /home/demo.db < <(yes y)
It didn't work - still asks for me to hit "Y".
 
Old 02-15-2010, 06:05 AM   #5
HasC
Member
 
Registered: Oct 2009
Location: South America - Paraguay
Distribution: Debian 5 - Slackware 13.1 - Arch - Some others linuxes/*BSDs through KVM and Xen
Posts: 329

Original Poster
Rep: Reputation: 55
Have to admit, didn't know about Expect :-$ But, it solved this problem!
Read a little, coded a little more, and voilá! There goes the hassle of typing "I do" myself over and over :-)

Another great tool for my collection, thanks for the help!
 
1 members found this post helpful.
Old 11-09-2011, 06:22 AM   #6
djtjlt
LQ Newbie
 
Registered: Nov 2011
Posts: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by HasC View Post
Have to admit, didn't know about Expect :-$ But, it solved this problem!
Read a little, coded a little more, and voilá! There goes the hassle of typing "I do" myself over and over :-)

Another great tool for my collection, thanks for the help!
Hello HasC. I have the same problem like you had. I found this post after long search for the solution. After I read it I studied expect a bit, and then tried to
make the script.
The script launches the server, I have put the text "Enter 'Y' for Yes and 'N' for No:" to expect, and then on the next line Send "y".
But this is not helping... The script starts, the server comes to the message asking Y or N, and then everything exits out, and server does not start...

Can you please let me know how you solved it ? Paste you expect script ?

Mine is here:
#!/usr/bin/expect -f

spawn /opt/sybase/SYBSsa9/bin64/dbsrv9 @/opt/sybase/SYBSsa9/bin64/startup.txt
expect "Enter 'Y' for Yes and 'N' for No:"
send "y"

Thank you.
Tadas.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO install packages w/o interaction on ubuntu server? Skaperen Ubuntu 3 01-18-2010 10:06 AM
Internet on solaris developer edition santugvd Solaris / OpenSolaris 1 06-16-2008 11:52 AM
Solaris Express Developer Edition 1/08 available crisostomo_enrico Solaris / OpenSolaris 1 02-09-2008 09:01 AM
Solaris Express Developer Edition 9/07 tuxianD Solaris / OpenSolaris 2 11-24-2007 09:00 PM
HowTo start Postgre sql daemon josedsilva Linux - Software 4 03-20-2003 06:05 PM


All times are GMT -5. The time now is 01:53 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration