11 2013 档案
RH033读书笔记(10)-Lab 11 Process Control
摘要:Lab 11 Process ControlSequence 1: Job Control1. [student@stationX ~]$ su -2. Begin some jobs in the background:[root@stationX ~]# tail -n0 -f /var/log/messages &[root@stationX ~]# updatedb &3. [root@stationX ~]# service syslog restart4. [root@stationX ~]# jobs5. [root@stationX ~]# kill %1 [r 阅读全文
posted @ 2013-11-26 20:41 逝者如斯(乎) 阅读(247) 评论(0) 推荐(0) 编辑
RH033读书笔记(9)-Lab 10 Understanding the Configuration Tools
摘要:Lab 10Understanding the Configuration ToolsSequence 1: Configuring the Network with system-config-network1. Select System->Administration->Network.2. Click New, highlight Ethernet Connection, and click Forward.3. Highlight the device associated with eth0 and click Forward.4. Enter 192.168.50.X 阅读全文
posted @ 2013-11-25 16:54 逝者如斯(乎) 阅读(181) 评论(0) 推荐(0) 编辑
RH033读书笔记(8)-Lab 9 Using vim
摘要:Lab 9 Using vimSequence 1: Navigating with vim1. Log in as user student2. [student@stationX ~]$ cp /etc/passwd ~3. [student@stationX ~]$ vim ~/passwd4. First, try moving around using such as the arrows, PgUp, PgDn.They should all work as expected. Note, however, that on older systems they mightnot.5 阅读全文
posted @ 2013-11-25 14:53 逝者如斯(乎) 阅读(212) 评论(0) 推荐(0) 编辑
RH033读书笔记(7)-Lab 8 Introduction to String Processing
摘要:Lab 8 Introduction to String ProcessingSequence 1: Exercises in string processing1. Other than the man page, how could you get a summary of options for the aspell command,displayed one page at a time?aspell --help | less2. How many files are in the directory /usr/bin?ls /usr/bin | wc -l3. List the m 阅读全文
posted @ 2013-11-25 07:18 逝者如斯(乎) 阅读(279) 评论(0) 推荐(0) 编辑
RH033读书笔记(6)-Lab 7 Standard I/O and Pipes
摘要:Lab 7 Standard I/O and Pipes1. [student@stationX ~]$ cat /proc/cpuinfo /proc/meminfo2. [student@stationX ~]$ cat /proc/cpuinfo /proc/meminfo | less3. [student@stationX ~]$ cat /proc/cpuinfo /proc/meminfo | mail -s "System Stats for $(hostname)" root@localhost4. Check the email account root 阅读全文
posted @ 2013-11-24 22:55 逝者如斯(乎) 阅读(174) 评论(0) 推荐(0) 编辑
RH133读书笔记(2)-Lab 2 Working with packages
摘要:Lab 2 Working with packages Goal: To gain working experience with package management System Setup: A working install of Red Hat Enterprise Linux 5 con 阅读全文
posted @ 2013-11-22 16:09 逝者如斯(乎) 阅读(278) 评论(0) 推荐(0) 编辑
RH133读书笔记(1)-Lab 1 Managing Startup
摘要:Lab 1 Managing Startup Goal: To familiarize yourself with the startup process System Setup: A system installed with Red Hat Enterprise Linux Sequence 阅读全文
posted @ 2013-11-22 15:43 逝者如斯(乎) 阅读(171) 评论(0) 推荐(0) 编辑
RH033读书笔记(5)-Lab 6 Exploring the Bash Shell
摘要:Lab 6 Exploring the Bash ShellSequence 1: Directory and file organization1. Log in as user student with the password student.2. [student@stationX ~]$ pwd/home/student3. [student@stationX ~]$ touch {report,memo,graph}_{sep,oct,nov,dec}_{a,b,c}_{1,2,3}4. Use the ls command to examine the results of th 阅读全文
posted @ 2013-11-22 14:56 逝者如斯(乎) 阅读(211) 评论(0) 推荐(0) 编辑
RH033读书笔记(4)-Lab 5 File Permissions
摘要:Lab 5 File PermissionsSequence 1: Determining File Permissions1. What is the symbolic representation644 rw-r--r--755 rwxr-xr-x000 ---------711 rwx--x--x700 rwx------777 rwxrwxrwx555 r-xr-xr-x111 --x--x--x600 rw-------731 rwx-wx--x2. Given a file with permissions 755, what commands would change the p 阅读全文
posted @ 2013-11-22 14:22 逝者如斯(乎) 阅读(250) 评论(0) 推荐(0) 编辑
RH033读书笔记(3)-Lab 4 Browsing the Filesystem
摘要:Lab 4 Browsing the FilesystemSequence 1: Directory and File Organization1. Log in as user student with the password student.2. [student@stationX ~]$ pwd/home/student3. ls ls -a ls -al-a option includes files whose names begin with a period and used for storing configuration informationThe fifth co.. 阅读全文
posted @ 2013-11-22 13:25 逝者如斯(乎) 阅读(228) 评论(0) 推荐(0) 编辑
RH033读书笔记(2)-Lab 3 Getting Help with Commands
摘要:Lab 3 Getting Help with CommandsSequence 1: Using the Help Tools1. man -f keyword whatis keyword list all man pages.2. man -k keyword list all manual pages. 3. man -K keyword will be asked whether or not you would like to read it.4. man 3 basename -- basename() function from chapter 3 of the Red ... 阅读全文
posted @ 2013-11-22 12:25 逝者如斯(乎) 阅读(296) 评论(0) 推荐(0) 编辑
T-SQL基础(7) - 透视,逆透视和分组集
摘要:透视转换:use tempdb;if object_id('dbo.Orders', 'U') is not null drop table dbo.Orders;create table dbo.Orders( orderid int not null, orderdate date not null, empid int not null, custid varchar(5) not null, aty int not null, constraint pk_Orders primary key(... 阅读全文
posted @ 2013-11-05 09:56 逝者如斯(乎) 阅读(290) 评论(0) 推荐(0) 编辑
T-SQL基础(6) - 集合运算
摘要:{TODO:} 阅读全文
posted @ 2013-11-05 09:52 逝者如斯(乎) 阅读(136) 评论(0) 推荐(0) 编辑
T-SQL基础(5) - 表表达式
摘要:1.派生表(derived table)select YEAR(orderdate) as orderyear, COUNT(distinct custid) as numcustsfrom Sales.Ordersgroup by YEAR(orderdate);内联别名select orderyear, COUNT(distinct custid)from (select YEAR(orderdate)as orderyear, custid from Sales.Orders) as Dgroup by orderyear外部命名select orderyear, COUNT(disti 阅读全文
posted @ 2013-11-05 09:48 逝者如斯(乎) 阅读(241) 评论(0) 推荐(0) 编辑
T-SQL基础(4) - 子查询
摘要:简单子查询select * from (select custid, companyname from Sales.Customers where country = N'USA') as USACusts关联子查询select custid, orderid, orderdate, empidfrom Sales.Orders as o1where orderid = (select max(o2.orderid) from Sales.Orders as o2 where o2.custid = o1.custid)select orderid, custid, val.. 阅读全文
posted @ 2013-11-05 09:41 逝者如斯(乎) 阅读(186) 评论(0) 推荐(0) 编辑
T-SQL基础(3) - 连接查询
摘要:{TODO:} 阅读全文
posted @ 2013-11-05 09:39 逝者如斯(乎) 阅读(159) 评论(0) 推荐(0) 编辑
T-SQL基础(2) - 单表查询
摘要:开窗函数overselect orderid, custid, val,SUM(val) over() as totalvalue,SUM(val) over(partition by custid) as custtotalvaluefrom Sales.OrderValuesselect orderid, custid, val,100. * val / SUM(val) over() as pctall,100. * val / SUM(val) over(partition by custid) as pctcustfrom Sales.OrderValuesover 子句也支持四种排 阅读全文
posted @ 2013-11-04 21:49 逝者如斯(乎) 阅读(213) 评论(0) 推荐(0) 编辑
T-SQL基础(1) - T-SQL查询和编程基础
摘要:第一范式: 第一范式要求表中的行必须是唯一的,属性应该是原子的(atomic)。这个范式对于关系的定义来说是冗余的,换句话说,如果一个表真可以表示一个关系,那么它一定符合第一范式。行的唯一性是可以通过在表中定义一个唯一的主键而实现的。对于属性,只能使用随属性的数据类型定义一起定义的操作来对它们进行操... 阅读全文
posted @ 2013-11-04 20:31 逝者如斯(乎) 阅读(233) 评论(0) 推荐(0) 编辑
Oracle SQL Lesson (11) - 创建其他数据库对象(试图/序列/索引/同义词)
摘要:schema(模式)一个用户下一组对象的集合,一般与用户名一致。视图CREATE [OR REPLACE] [FORCE|NOFORCE] VIEW view[(alias[, alias]...)]AS subquery[WITH CHECK OPTION [CONSTRAINT constraint]][WITH READ ONLY [CONSTRAINT constraint]];create view empvu80 as select employee_id, last_name, salary from employees where department_id = 80;desc 阅读全文
posted @ 2013-11-03 16:13 逝者如斯(乎) 阅读(326) 评论(0) 推荐(0) 编辑
Oracle SQL Lesson (10) - 使用DDL语句创建和管理表
摘要:数据库对象TableViewSequenceIndexSynonym对象名称最长30个字符,不能与当前用户下其他对象重名。create table "select" as select * from emp;select * from "select";必须有创建表的权限CREATE TABLE [schema.]table (column datatype [DEFAULT expr][, ...]);conn / as sysdba;create user test identified by test default tablespace user 阅读全文
posted @ 2013-11-03 16:09 逝者如斯(乎) 阅读(364) 评论(0) 推荐(0) 编辑
Oracle SQL Lesson (9) - 操作数据(增删改)
摘要:使用INSERT语句INSERT INTO table [(column [, column...])]VALUES (value [, value...]);INSERT INTO departments(department_id, department_name, manager_id, location_id)VALUES (70, 'Public Relations', 100, 1700);字符和日期需要用单引号INSERT INTO employeesVALUES (114, 'Den', 'Raphealy', ... 阅读全文
posted @ 2013-11-03 16:07 逝者如斯(乎) 阅读(300) 评论(0) 推荐(0) 编辑
Oracle SQL Lesson (8) - 使用集合操作符(Union,Intersect,Minus)
摘要:集合操作符UNION/UNION ALLINTERSECTMINUSUnion All不排序,不去重,其余均升序且去重。create table e1 as select * from emp where deptno in (10,20);create table e2 as select * from emp where deptno in (20,30);select * from e1 union select * from e2 order by 8select * from e1 union all select * from e2 order by 8select * from 阅读全文
posted @ 2013-11-03 11:55 逝者如斯(乎) 阅读(304) 评论(0) 推荐(0) 编辑
Oracle SQL Lesson (7) - 使用子查询
摘要:使用子查询简单子查询SELECT select_listFROM tableWHERE expr operator (SELECT select_list FROM table);子查询可以出现在select,from和where之后,都是可以的。SELECT last_name, salaryFROM employeesWHERE salary > (SELECT salary FROM employees WHERE last_name = 'Abel');SELEC... 阅读全文
posted @ 2013-11-03 11:53 逝者如斯(乎) 阅读(219) 评论(0) 推荐(0) 编辑
Oracle SQL Lesson (6) - 使用Join进行联合查询
摘要:使用连接SQL 1999SELECT table1.column, table2.columnFROM table1[NATURAL JOIN table2] |[JOIN table2 USING (column_name)] |[JOIN table2 ON (table1.column_name = table2.column_name)]|[LEFT|RIGHT|FULL OUTER JOIN table2 ON (table1.column_name = table2.column_name)]|[CROSS JOIN table2];自然连接:SELECT departme... 阅读全文
posted @ 2013-11-03 11:49 逝者如斯(乎) 阅读(746) 评论(0) 推荐(0) 编辑
Oracle SQL Lesson (5) - 使用组函数输出聚合数据
摘要:组函数AVGCOUNTMAXMINSUMVARIANCE:方差STDDEV:标准差SELECT AVG(salary), MAX(salary),MIN(salary), SUM(salary)FROM employeesWHERE job_id LIKE '%REP%';SELECT MIN(hire_date), MAX(hire_date)FROM employees;COUNT(expr) 返回expr为非空值的行数:SELECT COUNT(commission_pct)FROM employeesWHERE department_id = 80;select cou 阅读全文
posted @ 2013-11-02 19:26 逝者如斯(乎) 阅读(230) 评论(0) 推荐(0) 编辑
Oracle SQL Lesson (4) - 使用转换函数和条件表达式
摘要:隐式转换select * from emp where empno='7788'字符(char,varchar2)转换为数字(number)或日期(date)数字或日期转换为字符显式转换字符转换为数字或日期(TO_NUMBER, TO_DATE)数字或日期转换为字符(TO_CHAR)TO_CHAR(date, 'format_model')select sysdate, to_char(sysdate,'yyyy') yyyy, to_char(sysdate,'year') year,from dual;select sysda 阅读全文
posted @ 2013-11-02 19:25 逝者如斯(乎) 阅读(448) 评论(0) 推荐(0) 编辑
Oracle SQL Lesson (3) - 使用单行函数自定义输出
摘要:大小写转换函数LOWER('SQL Course') = sql courseUPPER('SQL Course') = SQL COURSEINITCAP('SQL Course') = Sql CourseSELECT employee_id, last_name, department_idFROM employeesWHERE last_name = 'higgins';SELECT employee_id, last_name, department_idFROM employeesWHERE LOWER(last_na 阅读全文
posted @ 2013-11-02 19:20 逝者如斯(乎) 阅读(293) 评论(0) 推荐(0) 编辑
Oracle SQL Lesson (2) - 限制和排序数据
摘要:重建scott用户@?/rdbms/admin/utlsampl.sql@--执行?--$ORACLE_HOME字符区分大小写:SELECT last_name, job_id, department_idFROM employeesWHERE last_name = 'Whalen' ;使用字符函数:SELECT last_name, job_id, department_idFROM employeesWHERE upper(last_name) = 'WHALEN' ;SELECT last_name, job_id, department_idFROM 阅读全文
posted @ 2013-11-02 19:19 逝者如斯(乎) 阅读(284) 评论(0) 推荐(0) 编辑
Oracle SQL Lesson (1) - 使用SQL Select语句获取数据
摘要:第一节课:启动数据库并且使用特定用户连接:su - oracle;启动sqlplus并且使用sys连接:conn / as sysdba;启动数据库:startup;解锁用户:alter user hr identified by hr;alter user hr account unlock;使用hr连接:conn hr/hr;select * from tab;desc employees;select * from departments;开发工具:plsql developer;toad特殊字符:SELECT department_name || q'[ Department& 阅读全文
posted @ 2013-11-02 19:18 逝者如斯(乎) 阅读(329) 评论(0) 推荐(0) 编辑