oracle-sqldeveloper

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

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

Oracle sqldeveloper - how to connect DB from command line

ぃ、小莉子 提交于 2019-12-18 05:49:05
问题 I am writing a small DB utility. I would like to give the user the ability to open an instance of Oracle sqldeveloper directly from this utility. Is it possible to open Oracle sqldeveloper IDE that already connected to a specific DB? Something like sqldeveloper USERID/PASSWORD@DATABASE 回答1: /? works rather than /h. There are options to override the cofiguration file so whether you can do that or not is probably determined by the facilities offered by the config file. 回答2: It doesn't seem so.

How to extract only Time from a DateTime field in Oracle SQL Developer?

假装没事ソ 提交于 2019-12-18 05:43:41
问题 I tried To_Timestamp and other methods for SQL Developer but only this one worked fine for me. Select To_Number(To_Char(DateTime_FieldName, 'HH24')) || ':' || to_number(to_char(DateTime_FieldName, 'MI')) || ':' ||to_number(to_char(DateTime_FieldName, 'SS')) from TABLE_NAME Is there a better solution to this? 回答1: Assuming your goal is to generate a string representing the time (which is what the query you posted returns despite the extraneous to_number calls) SELECT to_char( <<column_name>>,

Rudimentary issue: basic PL/SQL console output? [duplicate]

余生颓废 提交于 2019-12-17 22:46:02
问题 This question already has answers here : Why no output when PLSQL Anonymous block completes? [duplicate] (7 answers) Printing the value of a variable in SQL Developer (8 answers) Closed last year . I am using SQL Developer and want to output the contents of a variable to the console using DBMS_OUTPUT.PUT_LINE(). I am running the following code that adds the numbers 1 through 5 inclusive but I'm not seeing any output. SET SERVEROUTPUT ON; DECLARE n_counter NUMBER := 5; -- Substitute this

SQLDeveloper displays no tables under connections where it says tables

僤鯓⒐⒋嵵緔 提交于 2019-12-17 20:02:28
问题 I am not sure why but I just installed SQLdeveloper 32 bit (3.0.0.4). When I click to expand the tables/views/indexes or etc it displays nothing at all! But when I do the following: SELECT owner, table_name FROM dba_tables I see the list of tables and I have read access to these tables since I can do a select * from anytable and data shows. Any thoughts? 回答1: The SQL Developer tree shows you what objects you own, not what objects you have access to. If you want to see the objects that you

Oracle: export a table with blobs to an .sql file that can be imported again

醉酒当歌 提交于 2019-12-17 16:33:14
问题 I have a table "Images" with two fields: Name VARCHAR2 Data BLOB I would like to export that table to a .sql file which I could import on another system. I tried to do so using the "Database unload" assistant of Oracle SQL Developer. However the generated file does just have the content for the names in it but not the data. Thus after importing I would end up with all the names but the data field would be null everywhere. I'd really prefer it just to be one file (I saw some examples that

Oracle SqlDeveloper JDK path

感情迁移 提交于 2019-12-17 16:13:06
问题 I have recently installed sqldeveloper but i'm getting the below warning window when I try to launch it. This is causing the sqldeveloper to run very very slow and it hangs frequently I have tried editing the file sqldeveloper.cong as suggested in the window above but does not work Original SetJavaHome ../../jdk Update 1 SetJavaHome C:\Program Files\Java\jdk1.7.0_60\bin\ and all other variations but still getting the above warning window Update 2 SetJavaHome C:\Program Files (x86)\Java\jre7

Oracle : select maximum value from different columns of the same row

主宰稳场 提交于 2019-12-17 15:55:08
问题 The whole question is pretty much in the title. For each row of the table I'd like to select the maximum of a subset of columns. For example, from this table name m1 m2 m3 m4 A 1 2 3 4 B 6 3 4 5 C 1 5 2 1 the result would be name max A 4 B 6 C 5 The query must be compatible oracle 8i. 回答1: Given this test data ... SQL> select * 2 from your_table 3 / NAME M1 M2 M3 M4 ---- ---------- ---------- ---------- ---------- A 1 2 3 4 B 6 3 4 5 C 1 5 2 1 SQL> ... a straightforward GREATEST() call will

Spool Command: Do not output SQL statement to file

巧了我就是萌 提交于 2019-12-17 06:14:14
问题 I am wanting to output a Query to a CSV file and am using the below as a small test; spool c:\test.csv select /*csv*/ username, user_id, created from all_users; spool off; but the output has the actual select statment as the first line > select /*csv*/ username user_id created from all_users USERNAME USER_ID CREATED REPORT 52 11-Sep-13 WEBFOCUS 51 18-Sep-12 Is there a way to prevent this? I tried SET Heading Off thinking that might do it, but it did not change. I am using SQL Developer an