Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

drop_database(7) [suse man page]

DROP 
DATABASE(7) SQL Commands DROP DATABASE(7) NAME
DROP DATABASE - remove a database SYNOPSIS
DROP DATABASE [ IF EXISTS ] name DESCRIPTION
DROP DATABASE drops a database. It removes the catalog entries for the database and deletes the directory containing the data. It can only be executed by the database owner. Also, it cannot be executed while you or anyone else are connected to the target database. (Connect to postgres or any other database to issue this command.) DROP DATABASE cannot be undone. Use it with care! PARAMETERS
IF EXISTS Do not throw an error if the database does not exist. A notice is issued in this case. name The name of the database to remove. NOTES
DROP DATABASE cannot be executed inside a transaction block. This command cannot be executed while connected to the target database. Thus, it might be more convenient to use the program dropdb [dropdb(1)] instead, which is a wrapper around this command. COMPATIBILITY
There is no DROP DATABASE statement in the SQL standard. SEE ALSO
CREATE DATABASE [create_database(7)] SQL - Language Statements 2010-05-14 DROP DATABASE(7)

Check Out this Related Man Page

DROP 
DATABASE(7) SQL Commands DROP DATABASE(7) NAME
DROP DATABASE - remove a database SYNOPSIS
DROP DATABASE name INPUTS name The name of an existing database to remove. OUTPUTS DROP DATABASE This message is returned if the command is successful. DROP DATABASE: cannot be executed on the currently open database You cannot be connected to the database you are about to remove. Instead, connect to template1 or any other database and run this command again. DROP DATABASE: may not be called in a transaction block You must finish the transaction in progress before you can call this command. DESCRIPTION
DROP DATABASE removes the catalog entries for an existing database and deletes the directory containing the data. It can only be executed by the database owner (usually the user that created it). DROP DATABASE cannot be undone. Use it with care! NOTES This command cannot be executed while connected to the target database. Thus, it might be more convenient to use the shell script dropdb [dropdb(1)], which is a wrapper around this command, instead. Refer to CREATE DATABASE [create_database(7)] for information on how to create a database. COMPATIBILITY
SQL92 DROP DATABASE statement is a PostgreSQL language extension; there is no such command in SQL92. SQL - Language Statements 2002-11-22 DROP DATABASE(7)
Man Page

15 More Discussions You Might Find Interesting

1. AIX

command to give me Database

Which is command I could used, to give me the kind of database ,size of database and version of database ? (4 Replies)
Discussion started by: magasem
4 Replies

2. UNIX for Dummies Questions & Answers

Problem with while loop and SQL

Connected to oracle database sqlplus << EOF $CONNECTSTR set heading off set trimspool on set feedback off select ID,DATE from sysadm.TEST where VALUE = 'A' order by ID; value_id = ID value_date = DATE EOF 1. Is it possible to reference the values, ID,DATE in unix shell script. 2.... (20 Replies)
Discussion started by: nandajk
20 Replies

3. Shell Programming and Scripting

can a shell script interact with database?

Hi All, Language like C,Java can interact with database..and can use database information .. can a shall script do this? if yes thn plz guide me..... thankx (7 Replies)
Discussion started by: johnray31
7 Replies

4. Shell Programming and Scripting

unix command to find the version of Informix database

Hi All Please let me know if there is command to check the version of the informix database installed..? Thanks in advance. Suresh (4 Replies)
Discussion started by: sureshg_sampat
4 Replies

5. Shell Programming and Scripting

Search a line and output next line as well

Hi, I have a requirement to search a particular text and if found print next line also. Appreciate your help. Thanks (10 Replies)
Discussion started by: kamranjalal
10 Replies

6. Shell Programming and Scripting

remove "|" after selection

how to remove -> "|" |USERID| after select from database before assign to the variable? thank you (9 Replies)
Discussion started by: ryanW
9 Replies

7. Shell Programming and Scripting

Help with script

#!/bin/ksh values=`cat testvalue` DATABASES=`echo "select agroup,tgroup from acc_gen..agroups where tgroup in ( $values ) go " | isql -Uro -Pcup0fj0e -Sdev1client420 | grep acc_` echo "$DATABASES" When, I run the script it gives me result like acc_fund2 KLU_LP acc_fund3 ... (11 Replies)
Discussion started by: zulfikarmd
11 Replies

8. Shell Programming and Scripting

generate a report

Hi Please help me to resolve the below query. My shell script has generated a file output.file like below ******************************** DROP TABLE GPS_CONTACT_DETAILS DB20000I The SQL command completed successfully. CREATE TABLE GPS_CONTACT_DETAILS ( CONTACT_ID ... (8 Replies)
Discussion started by: sailaja_80
8 Replies

9. Solaris

Check executed commands from remote hosts

Hello, Is there any way to check which user and from which IP executed a command to the server.I need something like the history but with information also from which IP the command executed. Thanks in advance (8 Replies)
Discussion started by: @dagio
8 Replies

10. Shell Programming and Scripting

sql dump file - how to get certain values using sed

Hi, I have a dumpfile.sql - ========Start of file================= CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysql` /*!40100 DEFAULT CHARACTER SET latin1 */; CREATE TABLE `test_table1` ( `id` int ) AUTO_INCREMENT=12 CREATE TABLE `test_table2` ( `id` int ) AUTO_INCREMENT=120... (5 Replies)
Discussion started by: ashokvpp
5 Replies

11. UNIX for Dummies Questions & Answers

Selective delete in SQL

Hi All This might be a weird query but its related to deleting specific details in database. Bascially I had built a database using a set of files seq1 of 300 mb seq2 of 200 mb seq3 of 350 mb seq4 of 300 mb and after building the database i realized that i didn't need the whole data.... (6 Replies)
Discussion started by: sonia102
6 Replies

12. Shell Programming and Scripting

Case conversion within a command

Hi All, I need the variable to be set in both uppercase and lowercase in a single command DATABASE=ORCL something like the below which is absolutly wrong find /ora/admin/11.1.0/diag/rdbms/{print tolower($0)}${DATABASE}/{print toupper($0)}${DATABASE} The o/p should be as below:... (4 Replies)
Discussion started by: jjoy
4 Replies

13. Homework & Coursework Questions

Help fixing my database script

1. The problem statement, all variables and given/known data: I need help I get a variant of syntax errors when compiling my script to maintain a database. It's a simple database meant to create/view/maintain vehicles. 2. Relevant commands, code, scripts, algorithms: my if statements have... (5 Replies)
Discussion started by: gamernerd101
5 Replies

14. Shell Programming and Scripting

How to remove tab space if any in a variable?

I have a variable sumOfJEOutputFile which is the output file of an SQL command which contains the output of that SQL. The output looks like below: ----------- 58 I am using following code to manipulate the output: (sed 1,2d $sumOfJEOutputFile > $newTemp1 | sed '$d' $newTemp1)... (4 Replies)
Discussion started by: Sharma331
4 Replies

15. UNIX for Advanced & Expert Users

Small database that can be bundled with UNIX

Hi All, I am working on a file transfer tool between unix servers. for this i am looking for a small database which is free and compatible with all unix OS and can be bundled in a package with other scripts. Any suggestions (8 Replies)
Discussion started by: Jcpratap
8 Replies