oracle11g

giving correct username& password, get ORA-01017: invalid username/password; logon denied

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-18 12:44:50
问题 I have oracle database configuration in tomcat's server.xml <Resource name="jdbc/sgfdb" auth="Container" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@databaseurl:1521:schema" username="username" password="password" maxActive="20" maxIdle="10" maxWait="-1" factory="oracle.jdbc.pool.OracleDataSourceFactory" type="oracle.jdbc.pool.OracleDataSource"/> Then in my web app (spring mvc project), i declear this in context.xml <Context> <ResourceLink name="jdbc/sgfdb" global="jdbc

SQL Error: ORA-00942 table or view does not exist

假如想象 提交于 2019-12-18 12:17:58
问题 I use SQL developer and i made a connection to my database with the system user, after I created a user and made a another connection with that user with all needed privileges. But when I try to proceed following I get the SQL Error ORA-00942 table or view does not exist.: INSERT INTO customer (c_id,name,surname) VALUES ('1','Micheal','Jackson') 回答1: Because this post is the top one found on stackoverflow when searching for "ORA-00942: table or view does not exist insert", I want to mention

Add days Oracle SQL

Deadly 提交于 2019-12-18 12:07:28
问题 SELECT ORDER_NUM, CUSTOMER_NUM, CUSTOMER_NAME, ADD_DAYS (ORDER_DATE, 20) FROM CUSTOMER, ORDERS; Oracle Express says ADD_DAYS invalid? Any ideas what Am I doing wrong? 回答1: If you want to add N days to your days. You can use the plus operator as follows - SELECT ( SYSDATE + N ) FROM DUAL; 回答2: You can use the plus operator to add days to a date. order_date + 20 回答3: In a more general way you can use "INTERVAL". Here some examples: 1) add a day select sysdate + INTERVAL '1' DAY from dual; 2)

Oracle SQL Developer: Failure - Test failed: The Network Adapter could not establish the connection?

試著忘記壹切 提交于 2019-12-18 11:59:47
问题 Problem Please note that I changed details for security purposes. However, the problem remains intact. I installed an Oracle 11g database on a server at location, say, herp-devDV.derp.edu. Now I have another Oracle 11g database on a server at location, say, derp-db.derp.edu. I entered the connection name, username, password, hostname, and service name in Oracle SQL developer for both herp-devDV.derp.edu and derp-db.derp.edu. I can connect to schema in derp-db.derp.edu, but not herp-devDV.derp

How to SELECT from object type column in Oracle 11g?

给你一囗甜甜゛ 提交于 2019-12-18 11:49:43
问题 Hy guys, I have following two Oracle objects: CREATE OR REPLACE TYPE car AS OBJECT( name VARCHAR( 80 ) ) NOT FINAL; And also, there is another object: CREATE OR REPLACE TYPE truck UNDER car ( doors NUMBER, seats NUMBER ); There is also following table: CREATE TABLE vehicles ( id NUMBER NOT NULL, vehicle car, PRIMARY KEY (id) ); Here is some data: INSERT INTO vehicles ( id, vehicle ) VALUES ( 1, truck( 'ford', 4, 4 ) ); INSERT INTO vehicles ( id, vehicle ) VALUES ( 2, truck( 'toyota', 4, 5 ) )

How to SELECT from object type column in Oracle 11g?

六月ゝ 毕业季﹏ 提交于 2019-12-18 11:49:06
问题 Hy guys, I have following two Oracle objects: CREATE OR REPLACE TYPE car AS OBJECT( name VARCHAR( 80 ) ) NOT FINAL; And also, there is another object: CREATE OR REPLACE TYPE truck UNDER car ( doors NUMBER, seats NUMBER ); There is also following table: CREATE TABLE vehicles ( id NUMBER NOT NULL, vehicle car, PRIMARY KEY (id) ); Here is some data: INSERT INTO vehicles ( id, vehicle ) VALUES ( 1, truck( 'ford', 4, 4 ) ); INSERT INTO vehicles ( id, vehicle ) VALUES ( 2, truck( 'toyota', 4, 5 ) )

Oracle XE stopped working. TNS listener refused connection

喜欢而已 提交于 2019-12-18 11:13:19
问题 I'm working on an application which uses Oracle XE 11g as its RDBMS. It was working for several weeks but now I started to get an error message about the connection being refused. I restarted my system but it did not help. I uninstalled XE, deleted all remaining files (even from registry) and reinstalled it. Now I get another error message: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor I've read

Creating a trigger in Oracle Express

谁说我不能喝 提交于 2019-12-18 10:44:41
问题 I was trying to do something like auto-increment in Oracle 11g Express and SQL Developer. I know very little about Oracle and I am also new to triggers. I tried running this, but I don't know how to do it properly. CREATE TABLE theschema.thetable (id NUMBER PRIMARY KEY, name VARCHAR2(30)); CREATE SEQUENCE theschema.test1_sequence START WITH 1 INCREMENT BY 1; create or replace trigger insert_nums before insert on theschema.thetable for each row begin select test1_sequence.nextval into :new.id

Java: Reading Blob from Oracle

强颜欢笑 提交于 2019-12-18 09:39:06
问题 I have this code that converts a Treemap into bytes and store them in database (Oracle 11g). Now that storage seems to be working fine. I want to retrieve the map now, but it is in bytes in blob field. How can I retrieve and re-construct the map? The code for storing the map is: public void StoreMapDB(TreeMap<DateTime, Integer> map) throws IOException, FileNotFoundException{ try { Connection con = null; Class.forName("oracle.jdbc.driver.OracleDriver"); con=DriverManager.getConnection( "jdbc

oracle 11g and integration of hibernate spring and jsf

懵懂的女人 提交于 2019-12-18 09:38:26
问题 i am using jsf 2,hibernate 4.1.4,spring 3.1,oracle 11g and maven 3. but it can not connect to oracle and has error. i downloaded the latest version ojdbc6. applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context" xmlns:lang="http://www.springframework.org/schema