This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select Schemaname into v_ObjectType | |
from v$session | |
where audsid = TO_NUMBER( sys_context('userenv','sessionid') ) | |
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=utf-8 | |
import os | |
for name in os.listdir ( '.' ) : | |
if '.' not in name : | |
for dir , subDirs , files in os.walk ( name ) : | |
for file in files : | |
print file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iptables -I INPUT -p tcp --dport 1521 -j ACCEPT | |
iptables -I INPUT -p tcp --dport 1522 -j ACCEPT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Description: /opt/tomcat7 Start Stop Restart | |
# processname: tomcat7 | |
# chkconfig: 2345 20 80 | |
export JDK_HOME=/usr/java/jdk1.6.0_37 | |
export JRE_HOME=/usr/java/jdk1.6.0_37/jre | |
CATALINA_HOME=/opt/tomcat7 | |
CATALINA_OPTS="-Xms512M -Xmx1024M" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# description: Starts and stops the Oracle database and listeners | |
# processname: oracle | |
# chkconfig: 2345 20 80 | |
export ORACLE_BASE=/opt/oracle/app/oracle | |
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1 | |
export ORACLE_SID=vo2 | |
export PATH=$ORACLE_HOME/bin:$PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
semanage fcontext -a -t samba_share_t /root/downloads | |
chcon -R -t samba_share_t /root/downloads |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select s.sql_id, t.sql_text | |
from V$SESSION s, v$sqltext_with_newlines t | |
where | |
s.status = 'ACTIVE' | |
and s.username = :p_schema | |
and s.machine = :p_machine | |
and t.address =s.sql_address | |
and t.hash_value = s.sql_hash_value | |
and s.sid = :p_sid | |
and s.type <>'BACKGROUND' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT s.username, | |
sl.sid, | |
sq.executions, | |
sl.last_update_time, | |
sl.sql_id, | |
sl.sql_hash_value, | |
opname, | |
target, | |
elapsed_seconds, | |
time_remaining, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare | |
v_error_message varchar2(4000); | |
function is_empty_field(p_field_name in varchar2, p_field_value in varchar2, p_error_message out varchar2) | |
return boolean is | |
begin | |
IF p_field_value is not null then | |
p_error_message := 'заполнено поле "'||p_field_name||'"'; | |
return true; | |
end if; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set serveroutput on; | |
DECLARE | |
v_cursor_id number; | |
v_last_scale_division_idx number; | |
v_column_int number; | |
v_column_str varchar2(4000); | |
v_fetched_cnt number; | |
BEGIN | |
select max(column_id) | |
into v_last_scale_division_idx |
OlderNewer