- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- shell script help needed.
Operating System - HP-UX
1756265
Members
2420
Online
108843
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2002 12:07 AM
01-18-2002 12:07 AM
Re: shell script help needed.
Hi Kok,
Thank you for the information.
I have done some modifications in the scripts.Its working now.
#I used the following script:
echo "How many rows do you want to insert into the table ? "
read NROWS
NROWS=$((NROWS * 106))
NROWS=$((NROWS / 2 ))
export NROWS
echo $NROWS
I divided NROWS /2 because i assigned 2 tablespaces while creating that table which contains HASH PARTITIONED tablespaces.The output result should be divided into 2 tablespaces,I havent specified MB there.I removed the (MB) while creating a tablespace.
#The following is the tablespace scipt which i used.
CREATE TABLESPACE GATE_DATA_PARTITION
DATAFILE '/inventory/gate_data_partition.dbf' SIZE $NROWS
DEFAULT STORAGE (INITIAL 20K NEXT 20K MINEXTENTS 2 MAXEXTENTS 100 PCTINCREASE 1)
;
CREATE TABLESPACE GATE_DATA_PARTITION1
DATAFILE '/inventory/gate_data_partition1.dbf' SIZE $NROWS
DEFAULT STORAGE (INITIAL 20K NEXT 20K MINEXTENTS 2 MAXEXTENTS 100 PCTINCREASE 1)
;
##########
If i havent entered any values while it prompts its returning an error.
Is it possible to terminate the entire script if i wont enter any thing????
R
Thank you for the information.
I have done some modifications in the scripts.Its working now.
#I used the following script:
echo "How many rows do you want to insert into the table ? "
read NROWS
NROWS=$((NROWS * 106))
NROWS=$((NROWS / 2 ))
export NROWS
echo $NROWS
I divided NROWS /2 because i assigned 2 tablespaces while creating that table which contains HASH PARTITIONED tablespaces.The output result should be divided into 2 tablespaces,I havent specified MB there.I removed the (MB) while creating a tablespace.
#The following is the tablespace scipt which i used.
CREATE TABLESPACE GATE_DATA_PARTITION
DATAFILE '/inventory/gate_data_partition.dbf' SIZE $NROWS
DEFAULT STORAGE (INITIAL 20K NEXT 20K MINEXTENTS 2 MAXEXTENTS 100 PCTINCREASE 1)
;
CREATE TABLESPACE GATE_DATA_PARTITION1
DATAFILE '/inventory/gate_data_partition1.dbf' SIZE $NROWS
DEFAULT STORAGE (INITIAL 20K NEXT 20K MINEXTENTS 2 MAXEXTENTS 100 PCTINCREASE 1)
;
##########
If i havent entered any values while it prompts its returning an error.
Is it possible to terminate the entire script if i wont enter any thing????
R
Oracle DBA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2002 01:18 AM
01-18-2002 01:18 AM
Solution
Hi,
Add an error checking condition.
=========================================
echo "How many rows that you want to insert into the table ? \c"
read total_size
if [ "$total_size" != "" ]
then
total_size=$(expr $total_size / 1048576)
echo $total_size
else
echo No values entered...exiting
fi
=========================================
Hope this helps. Regards.
Steven Sim Kok Leong
Add an error checking condition.
=========================================
echo "How many rows that you want to insert into the table ? \c"
read total_size
if [ "$total_size" != "" ]
then
total_size=$(expr $total_size / 1048576)
echo $total_size
else
echo No values entered...exiting
fi
=========================================
Hope this helps. Regards.
Steven Sim Kok Leong
- « Previous
-
- 1
- 2
- Next »
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP