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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-12-2010, 11:57 AM
|
#1
|
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:
|
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?
|
|
|
02-13-2010, 12:35 PM
|
#2
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,142
|
Quote:
Originally Posted by HasC
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.
|
|
|
02-13-2010, 12:37 PM
|
#3
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
Try adding `< <(yes y)' to the end of the command.
|
|
|
02-15-2010, 05:28 AM
|
#4
|
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:
|
Quote:
Originally Posted by TB0ne
[...] 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
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".
|
|
|
02-15-2010, 06:05 AM
|
#5
|
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:
|
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.
|
11-09-2011, 06:22 AM
|
#6
|
LQ Newbie
Registered: Nov 2011
Posts: 1
Rep:
|
Quote:
Originally Posted by HasC
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.
|
|
|
All times are GMT -5. The time now is 03:38 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|