Query chinese from sqlplus
hi,
does oracle support to query chinese from
sqlplus? if so , how to comfig it?
i can use java to input UTF8 or GB into
database, and use IE to view it,
but i can't use sqlplus to view it,
it just give me something like '*?**'
null
Are you running sqlplus from Windows? If so is it a Chinese Windows OS or something else? What is the NLS_LANG setting for the OS that you are running SQLPLUS from?
Similar Messages
-
Anyway to supress the coulmn names in the query output from SQLPLUS
Hi,
I am using sqlplus to run a script which returns the results with column names.
Is there anyway to omit the column names from the query output from sqlplus?
I would like to have only results with out their column names in the output.
Thanks in advance!!Hi,
Maybe your LINES(IZE) isn't set ?
SCOTT>set lines 130
SCOTT>select status, machine, module
2 from v$session
3 where upper(username) = 'SCOTT';
STATUS MACHINE MODULE
INACTIVE PFAE3\VPC4894-03 TOAD 9.7.2.5
ACTIVE PFAE3\VPC4894-03 SQL*Plus
2 rows selected.
SCOTT>As an alternative to setting linesize, you can format columns:
SCOTT>set lines 80
SCOTT>col status for a8
SCOTT>col machine for a30
SCOTT>col module for a30
SCOTT>select status, machine, module
2 from v$session
3 where upper(username) = 'SCOTT';
STATUS MACHINE MODULE
INACTIVE PFAE3\VPC4894-03 TOAD 9.7.2.5
ACTIVE PFAE3\VPC4894-03 SQL*Plus
2 rows selected.
SCOTT>Regards
Peter -
Oracle Spatial Query from SQLPLUS deteriorates in performance
Hi,
I am running an sql-procedure, which does spatial queries. When I run this procedure (from SQLPLUS) for the first time it takes around 45 sec to complete, but when I run the same procedure for the second time it takes 65 seconds and the performance keeps on decreasing. But if I open a new SQLPLUS session it takes 45 secs and it also starts deteriorating subsequently. This strange behaviour is only for spatial queries, if I don't have spatial queries in my procedure then its fine.
I found this behaviour for any type of spatial query.
Is there something which can be done for improving it ? I found a lot of information on improving performance of a query, but my problem is to maintain the same performance of the same query in the same session.
Thanks,
RishiHi,
Could you provide version information?
Also, could you try monitoring memory as the procedure is running an see
if memory climbs more each time the procedure is run?
Thanks -
Trying to query data from a view - ORA-01882 and ORA-02063 Errors
Hey there,
I tried to query data from a view that was provided by a colleague. This view works fine and gives correct data using PL/SQL Developer or SQLPLUS, but in SQL Developer, I get the following error:
ORA-01882: Time zone region not found
ORA-02063: preceding line from SYSTOOLS
01882.00000 - "timezone region %s not found"
* Cause: Specified reason name was not found
* Action: Please contact Oracle Customer Support
Vendor Code 1882
Where comes this error message from?! SYSTOOLS is the database link.
Can't see an obvious reason for this error.
OS is Windows 2000 SP4, SQL Developer is v1.1.1.25 BUILD MAIN-25.14
Regards,
ThomasFrom Oracle Messages 'Cause and Action'
http://www.oracle.com/technology/products/designer/supporting_doc/des9i_90210/cmnhlp72/messages/ora_messages.htm
ORA-01882, 00000, "timezone region %s not found"
Cause: The specified region name was not found.
Action: Please contact Oracle Customer Support.
Maybe invalid region in NLS_LANG?
"select * from v$nls_parameters"
Starting this script in all developer program and compared result... -
ORA00932 inconsistent datatypes For member methods in SQLJ Object called from SQLPlus
Hi, I would very much appreciate advice on the following problem, its a tricky one, here are the full details....
A) EXECUTIVE SUMMARY....
I have created an oracle object type by wrapping a SQLData java object with the Oracle Create type statement. I am using Oracle 9i on NT4. However despite following the very few Oracle examples I could find, I get the following error....
select value(aaa).testint() from dealsobjtab aaa
ORA-00932: inconsistent datatypes
select value(aaa).testme() from dealsobjtab aaa
ORA-00932: inconsistent datatypesHere is what I've done...
1) Create Java object using SQLData interface (see listing below)
2) Load the Java source to Oracle 9i
3) Run the Oracle Create Type statement to wrap the java class
4) Use the objects in a table and successfully insert rows and query attributes using SQLPlus
5) Find I can't pull back data from any instance methods without getting an "inconsistant datatypes" error for both string and int datatypes. (see below for queries and output from SQLPlus)
B) STEP BY STEP DETAILS FOLLOW......
1) Java Source (in file \dealcalcs\Dealtest.java)
package dealcalcs;
import java.sql.SQLException;
import oracle.jdbc.OracleConnection;
import oracle.jdbc.OracleTypes;
import java.sql.*;
public class Dealtest implements SQLData
public static final String SQLNAME = "SWITCHBLADE_DATA.DEALTEST";
public static final int SQLTYPECODE = OracleTypes.STRUCT;
protected java.math.BigDecimal m_dealid;
protected java.sql.Timestamp m_startdate;
protected String m_dealtype;
protected Double m_facevalue;
/* constructor */
public Dealtest() { }
public void readSQL(SQLInput stream, String type)
throws SQLException
setDealid(stream.readBigDecimal());
setStartdate(stream.readTimestamp());
setDealtype(stream.readString());
setFacevalue(new Double(stream.readDouble()));
if (stream.wasNull()) setFacevalue(null);
public void writeSQL(SQLOutput stream)
throws SQLException
stream.writeBigDecimal(getDealid());
stream.writeTimestamp(getStartdate());
stream.writeString(getDealtype());
if (getFacevalue() == null)
stream.writeBigDecimal(null);
else
stream.writeDouble(getFacevalue().doubleValue());
public String getSQLTypeName() throws SQLException
return SQLNAME;
/* accessor methods */
public java.math.BigDecimal getDealid() { return m_dealid; }
public void setDealid(java.math.BigDecimal dealid) { m_dealid = dealid; }
public java.sql.Timestamp getStartdate() { return m_startdate; }
public void setStartdate(java.sql.Timestamp startdate) { m_startdate = startdate; }
public String getDealtype() { return m_dealtype; }
public void setDealtype(String dealtype) { m_dealtype = dealtype; }
public Double getFacevalue() { return m_facevalue; }
public void setFacevalue(Double facevalue) { m_facevalue = facevalue; }
//These last two are the member methods I call
public String testme(){
String tmp = new String("testme worked");
return tmp;
public int testint(){
int tmp = 0;
tmp = 88;
return tmp;
2, 3, 4) Here is how I wrap the uploaded SQLJ object, create a table using it, and put a row in it....
create or replace type deal_t as object
external name 'dealcalcs.Dealtest'
LANGUAGE JAVA USING SQLData (
DEALID NUMBER (11) external name 'dealid',
STARTDATE DATE external name 'startdate',
DEALTYPE VARCHAR2 (50) external name 'dealtype',
FACEVALUE FLOAT (49) external name 'facevalue',
MEMBER FUNCTION testme RETURN VARCHAR2
EXTERNAL NAME 'testme() return java.lang.String',
MEMBER FUNCTION testint RETURN NUMBER
EXTERNAL NAME 'testint() return int'
) not final
create table dealsobjtab of deal_t;
insert into dealsobjtab values ( deal_t(1, to_date('1/jan/1968'), 'NZD/NZD', 500))
COMMIT
5) Here I select attributes from the object table, and select using the two member methods, note that my member methods fail miserably, and advice on fixing this would be much appreciated....
select * from dealsobjtab aaa
DEALID STARTDATE DEALTYPE FACEVALUE
1 01/01/1968 NZD/NZD 500
1 row selected
select value(aaa).dealid from dealsobjtab aaa
VALUE(AAA).DEALID
1
1 row selected
select value(aaa).testint() from dealsobjtab aaa
ORA-00932: inconsistent datatypes
select value(aaa).testme() from dealsobjtab aaa
ORA-00932: inconsistent datatypes
Phew, that was a long email, I hope you are still awake after all that. I have no idea how to solve this, and would really appreciate some advice to get me going.
Yours Sincerely,
Michael CatoBut, i am receiving the error i have mentioned. is it depends on the java version also?
Please suggest.. -
How to edit stored procedure from sqlplus ?
Hi,
Can anyone advise how to edit stored procedure from sqlplus ?
Many thanks.You can get the source for an object from SQL*Plus by querying the user_source table, i.e.
SQL> create procedure foo
2 as
3 begin
4 dbms_output.put_line( 'foo' );
5 end;
6 /
Procedure created.
SQL> select text
2 from user_source
3 where name = 'FOO'
4 order by line;
TEXT
procedure foo
as
begin
dbms_output.put_line( 'foo' );
end;Most commonly, though, if you are using SQL*Plus and a text editor to develop stored procedures, you will have all your stored procedures in .sql files that you edit and just use SQL*Plus to create (or recreate) the stored procedures.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
Database monitoring from sqlplus prompt?
How can one monitor database from sqlplus prompt? I want to know about the connected users,queries fire by users,deadlock and explain plan of the query from sqlplus.
Is there any direct query for the same.
Thanks
Vipinconnected users,queries fire by users,deadlockYou can use v$ views example v$session, v$lock
explain plan of the query from sqlplusYou can use
SELECT PLAN_TABLE_OUTPUT FROM TABLE(DBMS_XPLAN.DISPLAY());
Additionaly I would advise you visit and search more about it
http://www.oracle.com/technology/documentation/index.html
Adith -
Use evdre to query data from a SQL View
Hi all
I believe that it is possible to use evdre to query data from a SQL View. If this is possible then how does one go about setting it up in the evdre options (assuming that the view has already been created)?
Regards,
ByronByron, perhaps this is no longer supported, it might be worth opening up a case at service.sap.com on this. However, I did find the following on Page 11 of the "Usages and Considerations of EVDRE" pdf file. This doc is imbedded in the helpfile for BPC 7 SP5 (which was released in August of 2009, well after note 1315011 was last updated.
It looks like you are limited to one custom view per application, since you have to name the view in a parameter at the APPLICATION level. Go into BPC Administration, login to the application related to the custom view, choose "Set Application Parameters" and enter the name of the view to the Application Parameter called "EVDRE_QUERYVIEWNAME" If it is not listed, go ahead and create it at the bottom of the Application parameter screen.
Also: I interpreted the following info from Page 10 of the same doc:
In your EVDRE, set the following options:
QueryEngine: MANUAL
QueryType: enter either NEXJ OR TUPLE see below:
NEXJ - Use two-dimensional queries using the nonemptycrossjoin function
TUPLE - Use two-dimensional queries using tuples"
And I'm assuming you'd enter a Y for the following two parameters:
QueryViewName
"..to enforce the query engine to use a used-defined SQL view of the fact tables, when trying to read the values using SQL queries. This option is typically used in conjunction with the SQLOnly option (see below). "
Option SQLOnly
"..to enforce the query engine to only execute SQL queries, when reading data. This can be achieved using this option." -
Not able insert ,query data from forms
hi,
I am not able to insert data or query data from forms(10g devsuite).getting error frm-40505,frm 40508 .i am able to insert and select record from sql plus.the block ihave created is control block .it is connected to the table using the properties.
should i do anything to insert record.please helpthe block ihave created is control block .it is connected to the table using the properties.A Control Block, by definition, is a non-database block. This means the block is not directly connected to a table so you have to manually display data in the block and any DML you want to perform on data in this block you must do manually as well.
There are four database objects you can base your database block on; 1) a Table, 2) a View, 3) From Clause Query (basically an In-line View), and 4) a database stored procedure. I recommend you use one of these four methods rather than manually display your data.
Craig... -
How to get the query values from the url in a servlet and pass them to jsp
ok..this is the situation...
all applications are routed through a login page...
so if we have a url like www.abc.com/appA/login?param1=A¶m2=B , the query string must be passed onto a servlet(which is invoked before the login page is displayed)..the servlet must process the query string and then should pass all those values(as hidden values) to the login jsp..then user enters username and pswd, then there should be another servlet which takes all the hidden values of jsp and also username and pswd, authenticates the user and sends the control back to that particular application along with the hidden values...
so i need help on how to parse the query string from the original url in the servlet, pass it out to jsp, and then pass it back to the servlet and back to the original application...damnn...any help would be greatly appreciated...thanksok..this is the situation...Sounds like you have a bad design on your hands.
You're going to send passwords in a GET request as clear text? Nice security there.
Why not start with basic security and work your way up?
% -
Delete WorkBook and Query file from Server .
Dear All Experts .
I dun know i posted in correct places or not .. (correct me if i m wrong) .. i want to ask about the BW Workbook and query.
How we going to remove the remove the workbook or query files from Server ? bc i tried to delete from Analyzer(excel 2007), the file is deleted from the view , but havent delete from the server... So how i going to remove the file from server ?
Thank.Hello I have the same problem. Can you please tell me how you finaly manage to delete the workbook.
thank's you for advance,
Akiba -
Performance tuning for ABAP Query (created from t-cd SQ01)
Hello all,
We created ABAP Query report from transaction SQ01.
But the generated report has an appropriate SQL statement which causes performance problem.
To solve this issue, I guess the easiest way is;
0. Give up to use it.
1. Copy it to another object in the customer namespace.
2. Ajust SQL statement.
But I'm wondering if there're appropriate ways to adjust SQL statement of Query.
Could anybody give me any better idea?
Thank you
YukoYou can try this: Create 2 ranges, for objnr and cdtcode and fill like:
ra_objnr-sign = 'I'.
ra_objnr-option = 'CP'.
ra_objnr-low = 'OR*'.
append ra_objnr.
ra_code-sign = 'I'.
ra_code-option = 'CP'.
ra_code-low = 'CO*'.
append ra_code.
SELECT objnr udate utime
FROM jcds
INTO TABLE it_jcds
WHERE objnr IN ra_objnr
AND stat = l_tj02t
AND cdtcode IN ra_code
AND inact = space
Regards,
John. -
Copy Query Variants from InfoCube to MultiProvider
Hi,
Is it possible to copy query variants from an infocube to a multiprovider?
Basically, we used RSZC to copy the queries from the infocube to the multiprovider, but it doesn't look like the variants were copied over. Is there an ABAP program or some other workaround that can expedite/facilitate in recreating the variants on the multiprovider queries?
Your help is much appreciated.
Thanks,
KK
Edited by: Kristin Kalalau on Jan 29, 2009 10:48 PMIt is possible to copy but the only requirement is your target cube structure should match with the source cube structure.
Thanks...
Shambhu
Edited by: Shambhu Kumar Gupta on Jan 30, 2009 12:01 PM -
Call PL/SQL Procedure (not stored) from SQLPLUS
Hello,
the following code creates a stored procedure and allows to call the procedure from SQLPLUS using EXEC.
CREATE or REPLACE PROCEDURE welcome IS
BEGIN
dbms_output.put_line('Welcome user ' || user);
END;
exec welcome;I would like to do the same without storing the procedure. The procedure should be defined in an PL/SQL-Script and called in a SQLPLUS loop. On the one hand I do not have the privileges to create stored procdures. On the other hand I want to use put_line in the loop. Without passing control to SQLPLUS (e.g. the loop-master) all output is kept in the buffer and no information are shown during processing the data.
Regards, Rainernetaktiv wrote:
There should be a repair job updating many hundredthousends records. A script should be created and called only once and the calling user should be informed about the processing status. There is no need for heavy output, but after 5000 or 10000 records I would like to display a message saying nnnnn records processed.Then you need another mechanism to report the current status to the user.
You cannot use the current session to do that. Sessions are serialised. That means they can do only service a single request at a time. So if the session executes procedure foo that updates 100's of 1000's of rows - then that is what the process will be doing. The procedure can only report back to the client after it has completed. It cannot interact directly with the client during the executing of that procedure.
This means that if you want to actually send a notification to the client, you need to do that via a separate session. E.g. the 1st session executes procedure foo that performs the update. That procedure sends a notification (using DBMS_ALERT or DBMS_PIPE for example) to the 2nd session - where the 2nd session receives the asynchronous notification and reports that to the user.
Another method would be for the update procedure to register a long operation using DBMS_APPLICATION_INFO. This enables another session to view the status and progress of the update procedure via virtual (v$) performance views.
Another method would be for the client session not to start the update procedure itself. Instead it can schedule a background job (using DBMS_JPB or DBMS_SCHEDULER interfaces) - and then monitor the status of the job.
Also suggest that you spend some time familiarising yourself with application developer fundamentals and concepts for Oracle. There are guides for both at http://tahiti.orcacle.com for the Oracle version you use. You cannot correctly use Oracle if you do not understand how Oracle works and what the application development features are. And your current approach using DBMS_OUTPUT is pretty much flawed and not how Oracle sessions should report their processing status to a client. -
Querying data from the maintenance view.
Hi Experts,
Well, i need the STEXT field value from the maintanance view V_T591A created for the standard table T591A.
Table T591A has the field Subtype but doesn't have the field Stext, which consists the description of the subtype. The Stext field is there in the maintenance view V_T591A.
So, if i want to query the respective description of the specific subtype, how do i get the values from the maintenance view?
Please advice.
Thanks in anticipation to all!
Cheers,
Sundar.Atish,
It is not possible that way! U cannot Query directly from MV as a DB table.
Anyways, i managed to find the answer.
Thanks though.
Regards,
Sundar.
Maybe you are looking for
-
Is a value for MXREF_MX_PRIVILEGE restricted to be numeric?
Hi expert. AS ABAP Initial Load job has failed with Error bellow === putNextEntry failed storingY.NAKAMURA Exception from Modify operation:com.sap.idm.ic.ToPassException: ToIDStore.modEntry failed modifying entry 'Y.NAKAMURA'. IDStore returned error
-
No longer able to install packages
HI, My remote desktop (3.5.1) crashed about a week ago. After the crash I have been unable to "Install packages" to any client from this laptop. There have been no changes in our network, or the client machines, or my login/password. Under ARD prefe
-
Payment Terms based on Value Date (UDF)
Hi, is it possible and if how? I want to create a new Payment Term based on a value date which is maybe months ahead. So the docduedate is after this value date but the document shall already go into accounting. how is this easily possible?
-
Table creation in Oracle back end
Hi Gurus, Can we create a oracle table in SAP schema directly from back-end and update it by taking snapshot from other oracle system. I know its not a recommended solution and DB link / DBCon would be better solution but the problem is other oracle
-
I cant add music or restore my 5th generation
it says the required folder cannot be found and doesnt allow me to do anything with it