|
I have several scripts that I would like to start from a menu presented to the SQLPlus user. Something like:
Please make a selection:
1: Do script a
2: Do script b
3: Do script c
I just need a point in the right direction, not a quick answer.
Started by Kyle Goddard on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
I'd got
&variablename is used to refer to the....
It can truncate lines if you don't set it up properly .
SQLPlus is a frontend about your SQLPlus settings.
It's hard to accomplish what you are trying to do with SQLPlus and/or PL/SQL.
|
|
Is it possible to do something like this?
$ sqlplus -s user/pass "select 1 from dual" or
$ echo "select 1 from dual" | sqlplus -s user/pass
I know I can put select 1 from dual in a file and do this:
$ sqlplus -s user/pass @myFile.sql
but I'm wondering...
Started by andersonbd1 on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
I assume this is *nix?
Use "here document":
sqlplus -s user/pass <<+EOF select 1 from dual):
$ echo 'select 1 from dual;'|sqlplus -s user/pw 1 1 $
I'm able to execute your exact query by just removed.)
echo "select 1 from dual;" |....
|
|
I need to do some structural changes to a database (alter tables, add new columns, change some rows etc) but I need to make sure that if something goes wrong i can rollback to initial state:
All needed changes are inside a SQL script file. I don't have...
Started by sakana on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
The import utility will read....
Take a look at export/import consistent mode).
I wouldn't use sqlplus to do this.
An alternate approach might be to create a new schema that contains your modified structures them on a production environment.
|
Ask your Facebook Friends
|
By default sqlplus truncates column names to the length of the underlying data type. Many of the column names in our database are prefixed by the table name, and therefore look identical when truncated.
I need to specify select * queries to remote DBAs...
Started by Chris Noe on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You might be able to automate the ALL_TAB_COLS view for the schema and table, and then create the script dynamically with a format.
I don't think sqlplus offers the functionality you are requesting.
|
|
Is there an easy and fast way to quickly perform a select of a BLOB value from Oracle, copy the result in a notepad and run the corresponding insert in another Oracle to insert data? Data is much longer than 4 K.
I cannot use external tools or copy files...
Started by massimogentilini on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at serverfault):
Can you create a database link in either of the databases.
Table@destination_tns_alias CREATE dest_table_name ( column_list) USING SELECT column_list FROM source_table_name done any work on that since Oracle8).
|
|
Using Oracle 10g with our testing server what is the most efficient/easy way to backup and restore a database to a static point, assuming that you always want to go back to the given point once a backup has been created.
A sample use case would be the...
Started by crackity_jones on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Some articles you may.
You could use a feature in Oracle called Flashback which allows you to create a restore point sqlplus script that destroyed the DB then imported the dump file over the top.
|
|
Hi, I would appreciate a little expert help please.
in an SQL SELECT statement I am trying to get the last day with data per month for the last year. Example, I am easily able to get the last day of each month and join that to my data table, but the problem...
Started by Mathieu Longtin on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Of thing a lot, see if you can create an index over computed columns that hold cast(coll_date.
|
|
HI,
I usually use SQL developer to create and edit my packages which usually worked fine. But the problem for today is that I can not save only packageA's body, and the others can be saved well. ( the SQL developer just runs for ever when I click save...
Started by user11017933 on
, 15 posts
by 5 people.
Answer Snippets (Read the full thread at oracle):
Ok, create a new package file in any text editor and compile it in ....
Thanks.
I tried @filename, but got error runs for ever( I do edit code from SQL developer directory) .
Thanks.
Containing the CREATE OR REPLACE PACKAGE BODY statement.
|
|
Hi, I've downloaded and extracted instantclient and sqlplus for instant client. Added instantclient to libraries (through ldconf), added sqlplus.so to libraries also, added sqlplus executable to $PATH, installed rlwrap. I see that in sqlplus's directory...
Started by gasan on
, 5 posts
by 4 people.
Answer Snippets (Read the full thread at oracle):
If .profile doesn't exist, create it)
alias sp='cd ~/instantclient_10_2;rlwrap sqlplus /nolog'
RestartThe file is located here?
$ORACLE_HOME/sqlplus/admin/glogin.sql As I found from intsant client sqlplus documentation, when....
|
|
On Fri, 27 Nov 2009 11:59:41 +0100, "Dave Yoda" <david@pleasdontpm.me
Hi everybody!
After restoring a RMAN backup to another machine (database and applikation
running fine with no probs) I'm experiencing the following problem:
I can logon using...
Started by Dave Yoda on
, 10 posts
by 6 people.
Answer Snippets (Read the full thread at omgili):
You restore or re-create the password file?
HTH -- Mark D Powell -- On Mon, 30 Nov 2009 12:55:15...@sbcglobal.net
Password-file? I used "emca -repos create" for creating a new repository
fine, but sys and system are locked out....
|