How to change prompt in sql plus
i have seen a user. he has changed SQL-PLUS promp
e.g SQL> to usermech>
how can i change this.
use this -
set sqlprompt little_expertRegards.
Satyaki De.
Similar Messages
-
Hi
How can I to change Prompt in Sql Plus for to show Enviroment and user ?this wont work for a pre 10 client.
there you can set the prompt manaualy and this is not dynamic.
make a login.sql
and place the following in the file.
column sqlprompt_col new_value sqlprompt_value
set termout off
define sqlprompt_value='NOT CONNECTED'
select sys_context('userenv','SESSION_USER')||case when sys_context('userenv','ISDBA') = 'TRUE' then ' as sysdba ' end ||'@'||sys_context('userenv','DB_NAME')||sys_context('userenv','INSTANCE') ||'('|| case when instr(sys_context('userenv','HOST'),'.')>1 then substr(sys_context('userenv','HOST'),1,instr(sys_context('userenv','HOST'),'.')-1) else sys_context('userenv','HOST') end ||')' as sqlprompt_col from dual;
set termout on
set sqlprompt '&sqlprompt_value SQL> '
after connecting sqlplus will look for a login.sql file in you present working directory or in its $ORACLE_HOME\sqlplus\admin directory.
if you reconnect is needs to be run again because it is not dynamic.
there is no workaround for pre 10g clients -
I need to change Font of SQL*PLUS 3.3 to courier new and font size 8..
do you have any idea how can I achive this.. I tried changing registry also but it doesnot work.
I am using Windows 95 machine. My database is Oracle 8i.
Please help me if you know the answer.It changes only at time of editing query .. Actually I wanted to change font of SQLPLUS i.e default font of SQL*PLUS screen should change.
-
Special character when changing password in sql plus
Hi i'm having a problem with setting password for user's in sql plus. I get a ORA-00922 whenever I try to change a user's password to contain ! in it. See below. Do I have to escape special characters or something or this a bug?
(Previously I've always used Enterprise Manager for this and can set ! characters for password without issue but we're currently having an issue with it and I need to alter passwords in sql plus while I'm waiting for it to be fixed )
SQL> alter user lbtest identified by oraclesux!;
alter user lbtest identified by oraclesux!
ERROR at line 1:
ORA-00922: missing or invalid option
SQL> alter user lbtest identified by oraclesux;
User altered.
System and O/S details below:
O/S = MS Server 2008 Standard Service Pack 1 64 bit
Oracle 11g Standard Edition (11.1.0.7.0)
SQL> select * from nls_database_parameters;
PARAMETER VALUE
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET WE8MSWIN1252
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
PARAMETER VALUE
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_RDBMS_VERSION 11.1.0.7.0
20 rows selected.Found the answer here, must user double quote for exclamation marks but not other characters like #.
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:897930000346894755 -
How to change backend databases sql server 2008 R2 to Sql server 2012 datacenter
Hi
i have current sharepoint 2010 form has backend database is sql server 2008 R2 on windows server 2008 R2 Enterprise
and this form has
1 application server
1 Search server (index server)
1 wfe server ( all web applications are running)
1 databse server
here how i change this form back end to new windows server 2012 and sql server 2012 datacenter
adilInformation on SQL Aliases (using cliconfg.exe):
http://sqlandme.com/2011/05/05/create-sql-server-alias-cliconfg-exe/
You need to migrate content back into the database prior to migration:
http://technet.microsoft.com/en-us/library/ff628255(v=office.14).aspx
http://technet.microsoft.com/en-us/library/ff628257(v=office.14).aspx
Trevor Seward
Follow or contact me at...
  
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs. -
Hi All,
I am creting a Stored Procedure and when i run this sentence the SQL Plus requests my the value of the variable 'lolo' and the i want to compile the Procedure, without giving that value.
1 create procedure hh
2 as
3 begin
4 DBMS_OUTPUT.PUT_LINE('&lolo');
5* end;
SQL> /
Enter value for jhsdfsd: df
old 4: DBMS_OUTPUT.PUT_LINE('hshfdhs&jhsdfsd');
new 4: DBMS_OUTPUT.PUT_LINE('hshfdhsdf');
Nelson SolerAlthough V's solution (V, nice to see you back by the way), will allow you to compile the proc with the ampersand character, I suspect that the stored proc will not do what you expect.
If you are expecting it to prompt for a value of lolo when you run it, it won't.
SQL> SET DEFINE ^
SQL> CREATE PROCEDURE hh AS
2 BEGIN
3 DBMS_OUTPUT.Put_Line('&lolo');
4 END;
5 /
Procedure created.
SQL> SET SERVEROUTPUT ON
SQL> exec hh
&lolo
PL/SQL procedure successfully completed.You cannot prompt for values in PL/SQL.
TTFN
John -
How to control layout in SQL*plus command
Hi, All,
I use SQL*plus to generate a simple report
BREAK ON <column1> duplicates skip page ON REPORT
COMPUTE COUNT LABEL 'Total number of trader shown on this report for this :' OF <column2> On <column1>
it shows '********' and '-------------------' above the lable and compute result.
Can I take '******' and '----------------' off
and the label can not longer than the length of <column1>, otherwise it will be truncated.
what if it is longer than the length of <column1>
and I don't want to change the layout of <column1> ?
ThanksPeter,
FYI, this forum is dedicated for Oracle Reports issues. There's another forum dedicated to SQL*Plus - I believe it's now called iSQL*Plus, btw. You should try your question in the other forum.
regards,
Stewart -
How to copy procedure to sql plus window.
I am trying to copy my procedure from note pad to sql plus window and some of the texts are being cut off. How can I copy the entire procedure to sql plus window.
thanksThank you guys this is what is happning.
1 CREATE OR REPLACE PROCEDURE ITEMCUSTOMPAGING(
2 p_desc in itemlist.idescr%type,
3 p_letting in bidlet.datelet%type,
4 p_letting1 in bidlet.datelet%type,
5 p_sort in NUMBER ,
6 p_order in VARCHAR ,
7 i_results out sys_refcursor
8 )
9 AS
10 BEGIN
11 OPEN i_results FOR
12 SELECT g.csecnum , e.iplineno , substr(e.eiitem ,1,4)||'.'||substr(e.eiitem ,5,9) ItemNum,
13 INITCAP(i.idescr ||' '|| e.isupdes) Descrip,INITCAP(i.idescrl ||' '|| e.isupdes) Descrip
14 DECODE (TRIM (p.prroute), NULL, 'N/A',p.prroute) Route,b.datelet ,trim(to_char(b.datelet ,'
15 FROM itemlist i, estitem e, estcatg g, propproj x, proposal p, bidlet b, letprop l
16 WHERE p.contid = x.contid AND x.pcn = g.pcn AND e.pcn = g.pcn AND e.cn = g.cn AND i.item =
17 AND i.ispecyr = p.cspecyr AND e.iplineno <> ' ' AND e.eiitem <> '2550601/01000'
18 AND e.eiitem <> '2565601/00031' AND e.eiitem <> '2565601/00032' AND e.eiitem <> '2565601/0003
19 AND e.eiitem <> '2402601/01000'
20 AND (i.idescr like TRIM(UPPER(p_desc))||'%' or i.idescrl like TRIM( UPPER(p_desc))||'%'
21 AND b.datelet between p_letting and p_letting1
22 AND p.contid = l.lcontid
23 AND l.letting = b.letting
24 AND SUBSTR (l.lcontid, 4, 4) <= '5'
25 GROUP BY g.csecnum,i.idescr,b.datelet,i.iunits,p.clocat1,p.clocat2,p.contid,p.cdescr, p.cproj
26 ORDER BY p_sort p_order;
27* End;
QL> /
arning: Procedure created with compilation errors.
QL> SHOW ERR
rrors for PROCEDURE ITEMCUSTOMPAGING:
INE/COL ERROR
2/8 PL/SQL: SQL Statement ignored
6/25 PL/SQL: ORA-00933: SQL command not properly ended
QL> -
How to install and practice SQL* plus on my personal computer
I am doing BSC-IT and studying oracle in one of the semester. I have to practice on SQL* plus to create tables etc. I need to know what are the applications i need to install and steps i need to follow on my pc to successfully practice on SQL*plus. Your kind prompt on the current issue will be highly appreciated.
regards,Few More Querries:
-> Which Deployment Option Should i select:
Rapid deployment
Standard
deployment
Custom
deployment
Upgrade
or
Maintenance
installation
I guess Rapid Deployment will be suitable.
Please suggest.
Thanks in Advance.
Reagrds,
Satish -
How do i access the SQL*plus
hello, i am having problems accessing my SQL*plus: its asking for a login name, password and some host string what is this? someone please help
thank you
A.I have only begun to learn database related fields. I have downloaded the iSQL*Plus (from this Oracle site), but am unable to use it due to complications in installing this product. How does one access the Oracle server? I trying to access it via my home PC (w/ windows98). Do I need to purchase additional software on my own? if so which one? How would any of you suggest I go about learning the PL/SQL (on my own as classes won't fit in schedule) ? Appreciate your help.
-
How to change the default sql servery query name?
Whenever we click on new query button, Sql server automatically opens a new query with default name SQLQuery1.sql.
Can I change this default name? What I mean to say is I have to work with quite a number of databases on different servers. So I open multiple queries on different server. So I was finding a way where whenever I click on
New Query button it inherits servername or database name (e.g If I have database name like ABCD new query name should look like ABCDquery.sql ?)
So that I can distinguish which query belong to which Database?
I would be very greateful if you can please answer this.
Many thanksPlease try with different color code option for your servers:
Ref: http://technet.microsoft.com/en-us/library/hh213617.aspx
Set the Status Color for a Server in Object Explorer
To set a server status color in Object Explorer
In Object Explorer, select the Connect button and then select Database
Engine….
On the Connect to Server dialog, select Options >>.
Select the Use custom color check box.
To select the color, select the Select… button.
Select either a basic or custom color, then select OK.
Fill in the rest of the connection information, and then select the Connect button.
Note: This is to identify different server connected not for databases. -
How to get Arabic dates in SQL*Plus?
I want to do a very simple thing.
I want to type in Arabic and Display dates in Arabic.
Instead i get ????? ??????? ????? ??????? ? ? ???????, ????? for this?
Why is this?
I then changed my Windows XP "Regional and Language Options" all to Arabic. Now, I get AR (Arabic) in my language selection bar at the bottom of the Desktop. When I choose AR I can type Arabic in Notepad. ُ
Even HERE I can type in Arabic: فغحث غخعق ةثسسشلث اثقث
But in Sql*PLus I get ????? ??????? ????? ??????? ? ? ???????, ?????
If I choose AR in SQL Plus and type in Arabic I get garbage characters?
How to get Arabic in Sql*Plus?
SQL> SHOW USER
USER is "ARABDTEST"
SQL> SELECT * FROM v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production
SQL> SELECT * FROM nls_session_parameters;
PARAMETER VALUE
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
17 rows selected.
SQL> ALTER SESSION set NLS_DATE_LANGUAGE = 'ARABIC';
Session altered.
SQL> SELECT TO_CHAR(SYSDATE, 'RRRR/MM/DD YEAR MONTH DAY MON DY AM PM DL') FROM dual;
TO_CHAR(SYSDATE,'RRRR/MM/DDYEARMONTHDAYMONDYAMPMDL')
2013/04/08 TWENTY THIRTEEN ????? ??????? ????? ??????? ? ? ???????, ????? 08, 2013
SQL> ALTER SESSION set NLS_DATE_LANGUAGE = 'AMERICAN';
Session altered.
SQL> SELECT TO_CHAR(SYSDATE, 'RRRR/MM/DD YEAR MONTH DAY MON DY AM PM DL') FROM dual;
TO_CHAR(SYSDATE,'RRRR/MM/DDYEARMONTHDAYMONDYAMPMDL')
2013/04/08 TWENTY THIRTEEN APRIL MONDAY APR MON PM PM Monday, April 08, 2013
SQL> SELECT * FROM nls_database_parameters;
PARAMETER VALUE
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET WE8MSWIN1252
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_RDBMS_VERSION 11.1.0.6.0
20 rows selected.I am not sure SQL*Plus in character mode can display Arabic characters on Windows. OTN NLS_LANG FAQ http://www.oracle.com/technetwork/products/globalization/nls-lang-099431.html#_Toc105389288 says:
>
if you are testing with "special" characters please DO use the GUI and not the "DOS box" sqlplus.exe !
>
SQL*Plus GUI is not available with 11G: you should use SQL Developer. -
How to connect from sql*plus to Sql Server
Dear Profs.
How I can connect from sql*plus v8 on my local pc(Win XP) to Sql Server Express 2005 light weight installed in same local pc ?
Thanks,
Ahmed.You'll need to setup heterogeneous services. This is done by creating an init file for the SQL Server db with %ORACLE_HOME%\hs\admin that refers to a DSN for the Sql Server Database. The listener would also need an entry for the SQL Server DB DSN. After that you would create a dblink to SQL Server in your Oracle instance and then could query across the dblink.
-
i install in my computer the oracle9i
my problem is that : i can login to sql plus
althoge i was tring all the passwords that i know
scott/tiger
sys/change_on_install
system/manager and the result is allways the same
ora-12560 error
how can i solve that problem?
did i missed somthing during the installation?Thank you to EVERYONE!!
I have been searching every possible forum to find out how to install/run SQL *Plus on a home computer without a server/network to work within. As most just learning, I could not figure out how to get past the SQL Plus Username/Password/Host String logon.
After much trial and error, I got through and I hope this helps a lot of people just starting out.
I used 'SYSTEM' as my username and my password created on install.
When installing I created a database and fixed the password so my default password was the password I created on install.
As long as I had those two fields filled in, I could leave the Host String blank and I could still get into the SQL Plus workspace.
Since I also created a database on install, I found that I could also use the name I gave the installed database (I didn't leave the default database name so I do not remember what the default name was, but I think the default password was 'manager' for those who were not tempted to change it).
Worst case scenario if you forgot your database name given during install, you can do a search for all of your .ora files (usually in the drive you installed Oracle on). Open the tnsnames.ora file in Notepad and you can see which database names are available on your system. The path to my file was:
D:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
You want the SERVICE_NAME = 'databasename'
I hope this reduced someone's stress...and thanks for all the helpful hints on these threads...they led me to the final outcome!!
In the end, I tried a lot of other combinations for the username/host strings with plenty of errors. You would think this information would be on page one of every Oracle install!! Or maybe it is and I am just a bit slow. : )
Thanks again to all that posted with this initial question (years ago)...
Brian Reeves
Oracle Student -
I have some spatial tables in 10g. I can use 'select query' on non spatial attributes but if try
select * or
select geom then my SQL plus gives error ::
Program Error - sqlplusw.exe has generated errors and will be closed by Windows. You will need to restart the program. An error log is being created.
<Cancel>
But I am able to use isqlplus without any errors.
Earlier SQL plus used to work fine. I don't understand what happened to it in between.
How can I bring my SQL plus working again.I created a copy for a spatial table using.
create table copy as select * from original, and it was successful .
Other than that I haven't done anything other than select queries.
Maybe you are looking for
-
WAP4410N issues with Macbooks/Apple computers
/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in
-
I have an imac 9,1 running Mac OS X Version 10.6.8 and I am trying to order a book using iphoto '09 version 8.1.2 (424). I've assembled and ordered books in the past and never had a problem. When I try to preview or assemble or order the book, ipho
-
im having problems with my iphones connecting to itunes. ive just upgraded from 4s to 5s and wanted to back it up before using it. but when i plug it in its just not responding, as usually when u plug in it it starts loading. ive tried installing itu
-
Getting short text of data element
Dear Friends, Is there is a function module,where if a field is given the corresponding short text of the data element is got. kind regards kaushik hegde
-
Print pages with digital signatures
My printer refuses to print any page that contains a digital signature. This is true of MS .doc as well as .pdf. Anybody know why?