Home » Infrastructure » Unix » ./dbstart: test: argument expected (Oracle 11g and 12c on Solaris 10)
./dbstart: test: argument expected [message #306071] Wed, 12 March 2008 13:57 Go to next message
figwe
Messages: 1
Registered: March 2008
Junior Member
I've recently installed oracle 11g on my solaris 10 system. But whenever I try to start it using a wrapper script for dbstart and dbshut. I get the following error:

/u01/app/oracle/product/11.1/db_1/bin/dbstart: test: argument expected

When I try using the database sid as an argument. I get the following error:

Failed to auto-start Oracle Net Listener using frank1/bin/tnslsnr
Processing Database instance "frank1": log file /u01/app/oracle/product/11.1/db_1/startup.log
./dbstart: syntax error at line 389: `COUNT=$' unexpected

Any assistance would be greatly appreciated.

I've also attached the startup.log file for your perusal.
  • Attachment: startup.log
    (Size: 0.97KB, Downloaded 3868 times)
Re: ./dbstart: test: argument expected [message #312771 is a reply to message #306071] Wed, 09 April 2008 13:37 Go to previous messageGo to next message
alexei
Messages: 1
Registered: April 2008
Junior Member
I had the same problem and was able to fix it by adding the required #!/bin/bash first line, use the path to your interpreter which you can get with the command whereis...
Re: ./dbstart: test: argument expected [message #611611 is a reply to message #306071] Fri, 04 April 2014 07:46 Go to previous messageGo to next message
mlgoins
Messages: 116
Registered: March 2007
Location: Denver, CO
Senior Member

The reading I did says the argument for dbstart/dbshut should be nothing, or the ORACLE_HOME (which then starts or stops the listener). In 11.2, you don't need to start the listener separately, just include $ORACLE_HOME as an argument to dbstart.

Also, dbstart/dbshut look at entries in the oratab file: they will start/stop any database listed there with the "Y" option.

Mike
Re: ./dbstart: test: argument expected [message #654717 is a reply to message #611611] Thu, 11 August 2016 04:57 Go to previous messageGo to next message
Frank Naude
Messages: 4579
Registered: April 1998
Senior Member
This thread just helped me. DBSTART gave error "dbstart: test: argument expected". The solution is to change the first line from "#!/bin/sh" to "#!/bin/bash".

$ which dbstart
/app/oracle/product/12.1.0.2.0/bin/dbstart
$ vi /app/oracle/product/12.1.0.2.0/bin/dbstart
Re: ./dbstart: test: argument expected [message #654747 is a reply to message #654717] Thu, 11 August 2016 10:47 Go to previous messageGo to next message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
My dbstart script starts like this:
#!/bin/sh
#
# $Id: dbstart.sh /st_buildtools_11.2.0/1 2013/01/24 16:20:35 tmagana Exp $
# Copyright (c) 1991, 2013, Oracle and/or its affiliates. All rights reserved.
#

###################################
#
# usage: dbstart $ORACLE_HOME
#
# This script is used to start ORACLE from /etc/rc(.local).
# It should ONLY be executed as part of the system boot procedure.
#
# This script will start all databases listed in the oratab file
# whose third field is a "Y".  If the third field is set to "Y" and
# there is no ORACLE_SID for an entry (the first field is a *),
# then this script will ignore that entry.
Specifically:
It should ONLY be executed as part of the system boot procedure.

Plus OP is on Solaris Confused
Re: ./dbstart: test: argument expected [message #654761 is a reply to message #654747] Thu, 11 August 2016 16:35 Go to previous message
Frank Naude
Messages: 4579
Registered: April 1998
Senior Member
I'm also on Solaris Razz
Look at the title: Oracle 11g & 12c on Solaris 10.
The Solaris 10 version of /bin/sh simply cannot run the dbstart script.
Previous Topic: SQL Loader Issue
Next Topic: Getting errors when starting listener
Goto Forum:
  


Current Time: Thu Mar 28 06:41:27 CDT 2024