About format setting on sql prompt
i want to select text of procedure and running below.
select text from user_source where name ='ABC' and type ='PROCEDURE;
but i am not able to read the same on command prompt due to format of text too long
please tell the setting of format for same
sorry to bother for such small thing
set linesize 700 pagesize 0 trimspool on long 10000 longchuncsize 10000
Similar Messages
-
Setting Sql Prompt to that of the connected Host
Hi all,
I work in a multiple Database environment. At times I've various
sessions open in SqlPlus. My problem is its really tedious to
keep track of which host my active window is connected to.
All I want to do is set my sql prompt to that of the Database
alias or my remote host ... (Automatically on Login)
Any suggestions ????Here's a suggestion from another forum that should help you.
FYI, the next version of iSQL*Plus will have this feature by
default, so you'll always know the user and database to which
you're connected.
Here is how Tom Kyte does it. The following is an excerpt from
a response he gave to a similar question:
I use a login.sql with SQLPlus. I also make sure each and every
database has a unique global name (alter database rename
global_name to <some name>) or unique SID (i like the global
name myself).
In my login.sql i have:
column global_name new_value gname
set termout off
select lower(user) || '@' ||
decode(global_name, 'ORACLE8.WORLD', '8.0', 'ORA8I.WORLD',
'8i', 'ORA8IDEV.WORLD', 'dev8i', global_name ) global_name from
global_name;
set termout on
set sqlprompt '&gname> '
That makes my sqlprompt look like:
ops$[email protected]>
So, now I have my username and database in the prompt. I just
have to remember to use an @connect -- NOT connect when
connecting since the login.sql is run ONCE, not after every
connect. My @connect is simply:
connect &1
@login
If you want to use the ORACLE_SID instead of the global database
name, just "select instance global_name from v$thread" in the
above. -
1) How to identify the problem of Oracle database from SQL command prompt
By executing a set of SQL commands one by one after connecting /as sysdba
2)what could be possible errors and how to resolve from SQL prompt
e.x db corrupt
not mounted
recovery
.....etc
Please give more example
Thanks in tonOk,
I am locking this topic.
SDN is not a substitute for training.
go get your self trained with SAP course ADM505
more about this at http://www12.sap.com/services/education/catalog/netweaver/globaltabbedcourse.epx?context=%5b%5bADM_DB%7cADM505%7c%7c%7c%7cG%7c%5d%5d%7c -
How to use currency format set
Hi All,
I have to use currency format set to mask the amount values to their respective currencies ,
i reviewed the Oracle XML Publisher Administration and Developer's Guide and followed all the steps mentioned there ,i m also quoting the same over here
To define a Currency Format Set:
1. Navigate to the Currencies page under the Administration tab. Select Create
Currency Format Set.
2. Enter a Name and a Code for the set. The Code is a unique identifier and cannot be
changed later. Select Apply.
3. The Currency Formats page will display for your newly created set.
To add currency formats to the Currency Format Set:
1. Select Add Currency Format to add a format to your set.
2. Select a Currency Name from the list.
Note: This list is generated from the FND currency table and
should include all ISO currencies. Additional currencies can be
added from the System Administrator responsibility.
3. Enter the Format Mask you wish to use for this currency and select Apply.
The Format Mask must be in the Oracle number format. The Oracle number format
uses the components "9", "0", "D", and "G" to compose the format, for example:
9G999D00 where
9 represents a displayed number only if present in data
G represents the group separator
D represents the decimal separator
0 represents an explicitly displayed number regardless of incoming data
See Using the Oracle Format Mask, Oracle XML Publisher Report Designer's Guide for
more information about these format mask components.
After a currency format has been created, you can update or delete it from the Currency
Formats page.
i followed all the above step ,i need to use germany currency ,i have also used the format-currency command in my RTF template,but still its not working ,i used 9G999D00 for masking .
Any hint would be very helpful ,thanks in advance .Please let me know if my question is not clear
Thanks
Prataphi all
Thanks ,this is resolved ,i just missed clearing cache ,after clearing the cache its working .
thanks
Pratap -
How to use open Row set in sql server 2014
Hello All,
How to open the row set using sql server 2014 using link server connection.Hi denyy,
Are you referring to the OPENROWSET function in SQL Server 2014?
The OPENROWSET method is an alternative to accessing tables in a linked server and is a one-time, ad hoc method of connecting and accessing remote data by using OLE DB. The examples below demonstrate how to use the OPENROWSET function:
A. Using OPENROWSET with SELECT and the SQL Server Native Client OLE DB Provider
SELECT a.*
FROM OPENROWSET('SQLNCLI', 'Server=Seattle1;Trusted_Connection=yes;',
'SELECT GroupName, Name, DepartmentID
FROM AdventureWorks2012.HumanResources.Department
ORDER BY GroupName, Name') AS a;
B. Using the Microsoft OLE DB Provider for Jet
SELECT CustomerID, CompanyName
FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'C:\Program Files\Microsoft Office\OFFICE11\SAMPLES\Northwind.mdb';
'admin';'',Customers);
GO
C. Using OPENROWSET to bulk insert file data into a varbinary(max) column
USE AdventureWorks2012;
GO
CREATE TABLE myTable(FileName nvarchar(60),
FileType nvarchar(60), Document varbinary(max));
GO
INSERT INTO myTable(FileName, FileType, Document)
SELECT 'Text1.txt' AS FileName,
'.txt' AS FileType,
* FROM OPENROWSET(BULK N'C:\Text1.txt', SINGLE_BLOB) AS Document;
GO
D. Using the OPENROWSET BULK provider with a format file to retrieve rows from a text file
SELECT a.* FROM OPENROWSET( BULK 'c:\test\values.txt',
FORMATFILE = 'c:\test\values.fmt') AS a;
Reference:
OPENROWSET (Transact-SQL)
Using the OPENROWSET function in SQL Server
Thanks,
Lydia Zhang
If you have any feedback on our support, please click
here. -
Detecting clientside NLS_LANG setting in SQL*Plus script
Our company has developed an application that uses an Oracle database as it backend. Companies can buy our application and run it against their own Oracle installation.
A new version of our application often requires an update to the Oracle database schema.
Together with new application files we send our customers an update.sql script they must run against their database using SQL*Plus.
This update script may contain international characters like é for example:
UPDATE SHOPS SET DESCRIPTION = 'Café'
WHERE SHOP_ID=1We save the SQL-script file in windows-1252 encoding so the character é is encoded as 0xE9 in the script file.
When the DBA running the upgrade script has set NLS_LANG=.WE8MSWIN1252 this works perfectly.
When the DBA has set his NLS_LANG=US7ASCII the é gets replaced by an upside-down question mark. Other NLS_LANG settings can also be troublesome.
To prevent this we give very clear installation instructions. However, nobody reads them. This leads to two questions:
A) Is there a way to prevent this problem so I do not depend on the NLS_LANG setting by the DBA running the upgrade script?
B) Otherwise: is there a way to test for the NLS_LANG setting inside the script and abort if it is not WE8MSWIN1252?
Info:
Database is 10.2.0.3/10.2.0.4 and sometimes 10.2.0.5, always database character set WE8MSWIN1252.
Client software: I do not know what each DBA uses but it will be mostly 10g client software
Client OS: Some DBA's will be running the script from Windows, others from some Unix variety. I cannot control that.I agree with Sergiusz. You're much better off if you can remove character set dependencies from your scripts by using commands like this.
UPDATE SHOPS SET DESCRIPTION = unistr( 'Caf\00E9' )
WHERE SHOP_ID=1 ;If that's not possible however you can try this approach to determine the session's character set.
SQL> column USERENV_LANGUAGE format a30
SQL> column oracle_charset format a20
SQL> r
1 select
2 userenv_language
3 , substr
4 ( userenv_language
5 , instr( userenv_language, '.' ) + 1
6 ) as oracle_charset
7 from
8 ( select sys_context( 'USERENV', 'LANGUAGE' ) as userenv_language
9 from dual
10* )
USERENV_LANGUAGE ORACLE_CHARSET
AMERICAN_AMERICA.AL32UTF8 AL32UTF8 --
Joe -
Showing junk characters at SQL Prompt.
Hi All,
I m a beginner in Oracle DBA. I have one problem, i m trying to make my database such that it will store HINDI characters. Got that i changed NLs parameters in PFILE,Session as per document given by the Oracle. I also installed HINDI unicode font on my machine. But at SQL prompt its showing junk character when i fired a command
select sysdater from dual.
But if i change language to french then its working perfectly. i.e, its showing correct information.
I also went throught the locale builder utility but there too i m getting square boxes. Can anybody help me out how to solve this problem.
Regards
Mahesh AgarwalPlease review the FAQ and Unicode whitepaper at
the Globalization home page:
http://technet.oracle.com/tech/globalization/content.html
If you need further help you need to specify the database
version, the database character set, your client OS, the
client OS language, are you using SQL*Plus etc. -
How to run the SQL Script in SQL Prompt?
Hi ExpertGroup,
I have written one SQL Script name called "MySQLSCript.SQL". I want to know how to run the SQL Script in SQL Prompt?.
Generally, I run SQL Script in PL/SQL Developer tool. But In this case, some SET command is not working/supporting in PL/SQL Developer Tool.
Let me know, How to Run in SQl Prompt.
Thanks & Regards,
Senthil K Kumar.This is my SQL Script....
SET COLSEP '|'
SET LINESIZE 32767
SET PAGESIZE 50000
/* SET LINESIZE 3000
SET PAGESIZE 50000
SET DEFINE OFF */
SET ECHO OFF
SET FEEDBACK OFF
--SET HEADING OFF
SET TRIMSPOOL ON
SET NEWPAGE NONE
SET UNDERLINE OFF
SPOOL &&EnterPath;
SELECT * FROM &&TableName;
SPOOL OFF
SET FEEDBACK ON
--SET DEFINE ON
PROMPT Done.
I am able to run this script in SQL Prompt....
Its executing fine...
But, If I am executing again it maynot asking for new set of data....
alternativily its taking old values only.....
how can i exeute with new set of data in the sql prompt..... -
Set iChat to prompt me for passord instead of auto logging in
How can I set iChat to prompt me to enter my MobileMe password when I open iChat - a simple secure measure that doesn't seem to be an option in this program.
I erase the password from the acct. settings and my acct. is 'Offline' when I open iChat but when I change my status to Available the acct. auto logs in...
I guess it got my MobileMe password from MobileMe system prefs...
Anyone how I can do this!?Umm,
Very Odd.
In the KeyChain Access > Keychain Access menu is the Keychain First Aid.
I would run that next.
I would also think of Repairing Permissions.
On top of that I would go to your Home Folder/Library/Keychains and do a Get Info on your Keychain and check in the Info window, near the bottom, that you have Ownership and Read/Write permissions
(The little Cogwheel looking icon at the bottom will confirm who the Owner is even if greyed out)
If there are other Accounts in iChat and Mail those will still work.
We are talking about the MobileMe account/Screen Name logging in, aren't we ?
Of course in Changing the Access Control of the Keychain/Password thing you also have to have removed the Password from the Box in iChat and Quit the App before changing the access otherwise you may find iChat just writes another Keychain Entry. (Same for Mail - although if one writes a new item the other is probably using it.)
7:42 PM Friday; December 4, 2009
Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat" -
Need command to run sql script from sql prompt
Hi,
I am beginner in sql i need a command to run sql file from sql prompt.In notepad i have write 10 to 15 tables creation and saved as .sql i want to run this file from sql promp pls some one help.I am very great full to all users in this forum.You can also use the 'start' command.
You may also want to look in the SQLPlus User Guide and Reference (for your release) at the set command for commands to set the number of lines per page, turn headings on or off, and so on:
http://download.oracle.com/docs/cd/E11882_01/server.112/e10823/toc.htm
HTH -- Mark D Powell -- -
Setting up SQL Server for LiveCycle ES2
I have few queries regarding the installation please help.
I am trying to install livecycle ES2 in Windows 7 system,Weblogic 11g,Sql server 2005 Dev Sp3
1. In the installation guide under the section setting up sql server for Livecycle ES2 the below point mentioned .
Select the Memory page and enter a size in the Minimum Server Memory (in MB) box that is equal to
the size of the free memory on the server.
How to find the free memory on the server ??
http://help.adobe.com/en_US/livecycle/9.0/prepareinstallsingle.pdf
2. Is It required to create LiveCycle ES2 database user, schema, and login in Sqlserver 2005 ? this step is not mentioned as optional why its required to create this stuffs ?
3. While installing the Live Cycle Server when the installer prompts for a database configuration popup which db i should point to is it the db created for Livecycle or it should be the db from which i want fetch the data?
4. In case if i am connecting to my application db (the place where my app data presents) where do i link the Livecycle db created with the Livecycle Server configuration?Hi,
Do you have solution for this yet?
I have same issue.
Thanks
YogLC -
Replace sql prompt wiht schemaname:dbname
HI I am tying to change my sql prompt to username:dbname
i.e hr:orcl>
set termout off
define new_prompt='nolog'
column value new_value new_prompt
select
username || ': ' ||
substr(substr(global_name,1,30),1,
instr(substr(global_name,1,30),'.')-1)
value
from
user_users,
global_name;
set sqlprompt "&new_prompt> "
set termout onas per the doc http://www.praetoriate.com/oracle_tips_enhancing_sqlplus.htm i have added above sql in $ORACLE_HOME/sqlplus/admin/glogin.sql
after saving file when i m login into sqlplus prompt is changing to "nolog>"
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Feb 10 16:03:27 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter user-name: /as sysdba
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
nolog>query which is used in above code is not giving correct output
nolog> select username ||': '|| substr(substr(global_name,1,30),1,
instr(substr(global_name,1,30),'.')-1) value
from user_users,global_name; 2 3
VALUE
SYS:so i modified query . it is giving correct output
nolog> select username||':'||substr(global_name,1,10) value from user_users,global_name;
VALUE
SYS:RDEV10Gso i have replace the query in code but still i m not able to change my sql prompt to sys:orcl>yes, they are documented
http://download-west.oracle.com/docs/cd/B14117_01/server.101/b12170/ch13.htm#sthref2183
copy from the docs:
_CONNECT_IDENTIFIER Connection identifier used to make connection, where available.
_DATE Current date, or a user defined fixed string.
_EDITOR Specifies the editor used by the EDIT command.
_O_VERSION Current version of the installed Oracle Database.
_O_RELEASE Full release number of the installed Oracle Database.
_PRIVILEGE Privilege level of the current connection.
_SQLPLUS_RELEASE Full release number of installed SQL*Plus component.
_USER User name used to make connection. -
Error in pakcage table or view does not exist but on sql prompt query works
Hi
Can any one help me to understand the error of ORA-00942: table or view does not exist while compiling the package on Oracle 9.2.0.4.0
The below package compiled in system user and trying to query on view v$session_wait however getting below error.
PACKAGE BODY SYSTEM.PK_DB_ALERT
On line: 212
PL/SQL: ORA-00942: table or view does not exist
I can execute same query mentioned below from sql prompt from system user and it works fine however it doesn't like from package, Please advice, thank you in advance.
SELECT SID, seq#, event, wait_time
FROM v$session_wait
WHERE event NOT LIKE 'SQL*Net%' AND wait_time <> 0
ORDER BY 2SDD wrote:
Hi
Can any one help me to understand the error of ORA-00942: table or view does not exist while compiling the package on Oracle 9.2.0.4.0Which means package owner is granted select on view not directly but via roles. However, roles are ignored by definer rights packages/stored procedures/stored functions/triggers... You need to grant package owner select on view directly.
SY.
Edited by: Solomon Yakobson on Jan 21, 2010 4:06 AM -
Problem with internet. When i open System preferences, Network, message drops down: 'your network settings have been changed by another application'. I click OK, but it dropps the message again and again, preventing me to do anything about the setting.
A Fix for "Your network preferences have been changed by another application" Error
In the Library/Preferences/SystemConfiguration/ folder delete the following:
com.apple.airport.preferences.plist
NetworkInterfaces.plist
preferences.plist
com.apple.nat.plist
You will have to re-configure all your network settings since deleting.
(10.4.10)
Use Software Update to update your OS to last version of Tiger. Install all the other updates that goes along w/it. -
How do I set Safari to prompt before closing multiple tabs OR reopen all of the closed tabs when when I relaunch the application? The "Reopen all windows from last session" is unselectable.
It would seem if your choose "Show my windows and tabs from last time" '''''and''''',
*when you last closed Firefox, you had no web site open (just a blank tab), that it would open just that blank tab
*when you last closed Firefox, you had one or more tabs/web site open, that would allow you to "Restore Previous Session"
#Have you tried that?
#If so, what is happening in each circumstance when you reopen Firefox?
'''Restore Previous Session'''<br />
Open tabs are automatically saved when closing Firefox beginning in Firefox 4. To open your last session, after Firefox starts, click History > Restore Previous Session. For this to work
#You must be remembering history (Options > Privacy > Remember my browsing history).
#*See [https://support.mozilla.com/en-US/kb/Options%20window%20-%20Privacy%20panel Options window-Privacy panel]
#You must not be using Private Browsing or permanent Private Browsing
#*See [https://support.mozilla.com/en-US/kb/Private%20Browsing Private Browsing]
#You must not use Clear Recent History or Clear history when Firefox closes
#*See [https://support.mozilla.com/en-US/kb/Clear%20Recent%20History Clear Recent History]
#*See [https://support.mozilla.com/en-US/kb/Options%20window%20-%20Privacy%20panel Options window-Privacy panel]
'''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
Not related to your question, but...
You need to update some plug-ins:
*Plug-in check: https://www-trunk.stage.mozilla.com/en-US/plugincheck/
*Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.com/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
Maybe you are looking for
-
How do I transfer photos from my pc to my ipad?
how do I transfer photos from my pc to my ipad?
-
Employee Data for Business Partner
Hi All, I am using BAPI_BUPA_CREATE_FROM_DATA as a Function Module in a program to create Business Partners by reading data from an Excel file.I am able to create business partners but I couldn't find the BAPI using which I can add Employee data for
-
Two days ago my iPad 3 and IPad 2 started to crash very unexpectedly. Both iPads have wifi and cellular and both are running iOS 7.0.2. I will be working and suddenly the screen just wipes to black and then the big white Apple appears as if I have do
-
Created by Module - TCA_FORM_WRAPPER -- What does it Mean.
Hi Gurus, I could see few party site records are having created by module as "TCA_FORM_WRAPPER". What is mean by "TCA_FORM_WRAPPER" and from which module I should create a party site to ge the created by module as TCA_FORM_WRAPPER. Thanks, Venkatesh
-
Motion menus - are there any other kind?
Hello I am creating a DVD of a memorial service and have chaptered all 15 elements of the service. When I try to burn the DVD, it says that I have too much content in my motion menus. Question 1: Is there a menu/chapter screen available that DOESN'T