10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have a small bash script which I want to run on an Amazon EC2 Ubuntu instance for setting up a postgreSQL database:
#!/bin/bash
USERNAME='postgres'
start=$SECONDS
TMP_DIR=/local/test/4g4d
PORT=23456
rm -rf $TMP_DIR/db
mkdir -p $TMP_DIR/
echo "creating database..."... (3 Replies)
Discussion started by: Helveticus
3 Replies
2. High Performance Computing
I am managing a linux cluster which has been build on Platform Cluster Manager PCM 1.2.1) from IBM Platform Computing. Unfortunately somebody deteled data files of postgresql from /var/lib directory. I somehow managed to start the postmaster service again, but all the administrative commands of... (2 Replies)
Discussion started by: ahsanpmd
2 Replies
3. Shell Programming and Scripting
Hi All,
I am newbie to unix shell scripting. I want to connect to oracle database using shell script. I know how to connect DB using user name and password but my question is if my password is having '@' sign then how to connect.
I have tried like below,
cnt=`sqlplus -s /nolog << EOFSQL
... (3 Replies)
Discussion started by: pmotewar
3 Replies
4. Shell Programming and Scripting
Hi Unix Gurus,
I have a requirement to write a script, Oracle DB gets referesh every 6hrs, hence we need write a script to connect to the database , if it connects it should generate a file to proceed the next job application or when an error when connectiong to DB it should not generate any... (8 Replies)
Discussion started by: bshivali
8 Replies
5. Shell Programming and Scripting
I've been sent the following script to finish. It's supposed to connect to an oracle database, query it, and send an email if the query result value is one or more. Currently it isn't connecting properly, just giving the following error:
ERROR: ORA-01017: invalid username/password; logon denied... (2 Replies)
Discussion started by: jackmorgan2007
2 Replies
6. Shell Programming and Scripting
How to connect to SQL Server database from perl script using JDBC driver?
---------- Post updated at 05:33 PM ---------- Previous update was at 05:07 PM ----------
i have sqljdbc.jar file. by setting the class path how can i connect to the database using perl script? (2 Replies)
Discussion started by: laknar
2 Replies
7. Shell Programming and Scripting
I have got the solution so just closing this issue. (3 Replies)
Discussion started by: jambesh
3 Replies
8. Shell Programming and Scripting
I am trying to connect to database db2 through shell script.
The process I am trying is
> db2
It gives me error Access Denied.
While checking for access I have the rights.
Is there ant other way round..?
Please help. (3 Replies)
Discussion started by: ankitgupta
3 Replies
9. Shell Programming and Scripting
Hi,
could you please help me out what are the command line commands to connect to as400.
Thanks, (0 Replies)
Discussion started by: mgirinath
0 Replies
10. Shell Programming and Scripting
Hi,
Can anyone please give me a script or let me know how to connect to a sybase database and execute a query using Korn shell scripts.Am new to Unix but i need to do this ASAP.
Please help.
Thanks,
Gops (7 Replies)
Discussion started by: bhgopi
7 Replies
DROP
ROLE(7) PostgreSQL 9.2.7 Documentation DROP ROLE(7)
NAME
DROP_ROLE - remove a database role
SYNOPSIS
DROP ROLE [ IF EXISTS ] name [, ...]
DESCRIPTION
DROP ROLE removes the specified role(s). To drop a superuser role, you must be a superuser yourself; to drop non-superuser roles, you must
have CREATEROLE privilege.
A role cannot be removed if it is still referenced in any database of the cluster; an error will be raised if so. Before dropping the role,
you must drop all the objects it owns (or reassign their ownership) and revoke any privileges the role has been granted. The REASSIGN OWNED
(REASSIGN_OWNED(7)) and DROP OWNED (DROP_OWNED(7)) commands can be useful for this purpose.
However, it is not necessary to remove role memberships involving the role; DROP ROLE automatically revokes any memberships of the target
role in other roles, and of other roles in the target role. The other roles are not dropped nor otherwise affected.
PARAMETERS
IF EXISTS
Do not throw an error if the role does not exist. A notice is issued in this case.
name
The name of the role to remove.
NOTES
PostgreSQL includes a program dropuser(1) that has the same functionality as this command (in fact, it calls this command) but can be run
from the command shell.
EXAMPLES
To drop a role:
DROP ROLE jonathan;
COMPATIBILITY
The SQL standard defines DROP ROLE, but it allows only one role to be dropped at a time, and it specifies different privilege requirements
than PostgreSQL uses.
SEE ALSO
CREATE ROLE (CREATE_ROLE(7)), ALTER ROLE (ALTER_ROLE(7)), SET ROLE (SET_ROLE(7))
PostgreSQL 9.2.7 2014-02-17 DROP ROLE(7)