1

Topic: Request under sqlplus

There is a task, to write request for sqlplus.
Owing to the , sqlplus delivered - demands connection. Oracle SQL Developer is not connected, Network Adapter not that. The firewall on 10-ke checked.
Problem essence:
As normal sql-inquiry to alter in a script for sqlplus

2

Re: Request under sqlplus

exileman wrote:

sqlplus delivered - demands connection. Oracle SQL Developer is not connected, Network Adapter not that. The firewall on 10-ke checked.

As it is information. At me at once ten recommendations about such detailed description of a problem. But I am better than them I will adhere.

exileman wrote:

a problem Essence:
As normal sql-inquiry to alter in a script for sqlplus

So. .

select user from dual;

How it to rewrite?
[spoiler]

:\ora11\orahome\network\admin> sqlplus user1/1@DMASLOV
SQL*Plus: Release 11.2.0.1.0 Production on Pn Sen 11 9:01:33 PM 2017
Copyright (c) 1982, 2010, Oracle. All rights reserved.
It is connected to:
Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
SQL> select user from dual;
USER
------------------------------
USER1

[/spoiler]

3

Re: Request under sqlplus

exileman;
In this post all is fine both a subject, and the task description, both a course of actions and a question.

4

Re: Request under sqlplus

dmdmdm;

SQL> SELECT DISTINCT personal, (SELECT SUM (
2 IF (
3 ((HOUR (outTime)> 9) AND (HOUR (inTime) <18));
4 (IF (HOUR (inTime) <9, CASE
5 WHEN HOUR (outTime) <= 13 THEN (HOUR (outTime)-9)
6 WcontrolsHEN HOUR (outTime) <= 18 THEN (HOUR (outTime)-10)
7 WHEN HOUR (outTime)> 18 THEN 8 END;
8 (IF (HOUR (inTime) <=13, (CASE
9 WHEN HOUR (outTime) <= 13 THEN (HOUR (outTime)-HOUR (inTime))
10 WHEN HOUR (outTime) <= 18 THEN (HOUR (outTime)-HOUR (inTime)-1)
11 WHEN HOUR (outTime)> 18 THEN (18-HOUR (inTime)-1) END);
12 (IF (HOUR (inTime) <=18, (CASE
13 WHEN HOUR (outTime) <= 18 THEN (HOUR (outTime)-HOUR (inTime))
14 WHEN HOUR (outTime)> 18 THEN (18-HOUR (inTime)) END), 0)
15)))
16)), 0
17)) hours FROM controls WHERE personal = c1.personal) hours
18 FROM controls AS c1 WHERE DAYOFWEEK (inTime) NOT IN (7,1) ';
SP2-0640: Not connected

5

Re: Request under sqlplus

dmdmdm;
What to do further?

6

Re: Request under sqlplus

MaximaXXL;
There is a task, there is a problem, the decision - that is necessary for you not clearly?
The task - a file with the request working under sqlplus
Problem - I can not check up on the computer (SP2-0640: Not connected), google did not help, tried to install sql developer and registered in firewall Win10 - did not help. Not to dig in the computer, I solve the task a simple method - how to make a request file so that it oracle sqlplus could fulfill by other machine. The request is in the text file, but under sqlplus does not work.
The decision is necessary how to prepare the text file that it worked on sqlplus

7

Re: Request under sqlplus

exileman;
It seems silly, but it is necessary to do that speaks plus: at first to be connected to Orakel. Namely:
SQL> connect user/pass;

8

Re: Request under sqlplus

Relic Hunter wrote:

exileman;
It seems silly, but it is necessary to do that speaks plus: at first to be connected to Orakel. Namely:
SQL> connect user/pass@tns_name;

Better so smile

9

Re: Request under sqlplus

exileman wrote:

There is a task, to write request for sqlplus.
Owing to the , sqlplus delivered - demands connection. Oracle SQL Developer is not connected, Network Adapter not that. The firewall on 10-ke checked.
Problem essence:
As normal sql-inquiry to alter in a script for sqlplus

That you understood the answer
Try to answer following questions:
- What is the technology the client/server?
- Whether the client without the server can work in this technology?
- What is the DBMS
- What is SQL
- Than is (the server or the client) installed at you sqlplus