xcopy dos command
Copies files and directory trees.XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W] [/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U] [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [/EXCLUDE:file1[+file2][+file3]...] source Specifies the file(s) to copy. destination Specifies the location and/or name of new files. /A Copies only files with the archive attribute set, doesn't
ls command
ls [-a] [-A] [-b] [-c] [-C] [-d] [-f] [-F] [-g] [-i] [-l] [-L] [-m] [-o] [-p] [-q] [-r] [-R] [-s] [-t] [-u] [-x] [pathnames]-aShows you all files, even files that are hidden (these files begin with a dot.)-AList all files including the hidden files. However, does not display the working directory (.) or the parent directory (..).-bForce printing of non-printable characters to be in octal ddd notation.-cUse time of last modification of the i-node (file created, mode changed, and so forth) for sor
del folder, subfolder and content of the folder by dos command
1. delete the folder DELTREE D:Work1DGEDA_D'DELTREE' is not recognized as an internal or external command,operable program or batch file.deltree /y D:Work1DGEDA_D2. delete the content del /q /s /a:-r D:Worktest*.*This will delete all files in D:Worktest and all files in any subfolders under c:testexam, but will leave the empty subfolders Del FileDEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] namesERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] namesnamesSpecifies a list of one or more files or direct
ORA-02298 error
ORA-02298: cannot validate (A.TE_ID ) - parent keys not foundsolution:select xxxxx from child_table a where not exists (select 'x' fromparent_table where primary_key = a.key_values);This will show you the row (or rows) that exists in the child table thatdon't exist in the parent table. Once you have either (added rowsto the parent table to match the child rows) or (removed the childrows that don't have parents), then you can enable your RI constraintsSQL> select count(te_id)2 from A a3 where
chmod chown owner
1. change 属组# change //tmp/src owner to john, 属组buildchown -R john:build /tmp/src2. change 文件权限chmod 777 /tmp/srcrwxrwxrwx --[@more@]
tar
1. tar foldertar cpf /u05/workarea/helen/tomcat_config.tar /**/app/tomcat/tomcat/2. tar file3. tar file recurringtar cpf filename file[@more@]r
crontab
#!/bin/ksh一、cron在3个地方查找配置文件1. cronjob file 位置/var/spool/cron/ 这个目录下存放的是每个用户包括root的crontab任务,每个任务以创建者的名字命名,比如tom建的crontab任务对应的文件就是/var/spool/cron/tom。root@rtcl-geda01 # pwd/var/spool/cronroot@rtcl-geda01 # ls -ltrtotal 4drwx------ 2 root sys 512 Sep 27 01:46 atjobsdrwx------ 2 root sys 512 Nov 30 03:46 crontabsroot@rtcl-geda01 # cd crontabsroot@rtcl-geda01 # lsadm gedaop oracle root sys tomcat2
AWR --生成AWR报表
1. generate AWR report, AWR可以支持HTML .TXT格式的报表cd $ORACLE_HOME/rdbms/admin@awrrpt.sql2.生成指定数据库实例的统计报表@$ORACLE_HOME/rdbms/admin/awrrpti.sql 3. 生成指定SQL语句的统计报表 这项统计专门用来分析某条指定的SQL语句,通过awrsqrpt.sql脚本,awr能够生成指定sql(曾经执行过的SQL)的执行计划,消耗的资源等等信息,有助于DBA进行SQL调优。 SQL> @$ORACLE_HOME/rdbms/admin/awrsqrpt.sql 4. 生成不同时间段时的统计对比报表 在没有awr之前,如果希望对不同时间段时,数据库的整体影响进行对比,只能依靠DB
ssh-keygen -t rsa
C:Documents and Settingstomcat>mkdir .sshC:Documents and Settingstomcat>ssh-keygen -t rsaGenerating public/private rsa key pair.Enter file in which to save the key (/cygdrive/c/Documents and Settings/tomcat/ssh/id_rsa):Enter passphrase (empty for no passphrase):Enter same passphrase again:open /cygdrive/c/Documents and Settings/tomcat/.ssh/id_rsa failed: Permission dnied.Saving the key failed: /cygdrive/c/Documents and Settings/tomcat/.ssh/id_rsa.C:Documents and Settingstomcat>--check p
DBMS_SCHEDULER privilege
1. SCHEDULER_ADMINThe SCHEDULER_ADMIN role gives a user the ability to control every aspect of the scheduler, as well as generating jobs to run as any other user. For this reason you should avoid granting it to anyone other than trusted DBAs.grant scheduler_admin to test;2. create job or create any jogFor the majority of users, the CREATE JOB privilege will be sufficient.grant create job to test3. manage schedulergrant manage scheduler to testFor users requiring some level of scheduler administr
create job class
SQL> SELECT consumer_group FROM dba_rsrc_consumer_groups;CONSUMER_GROUP------------------------------OTHER_GROUPSDEFAULT_CONSUMER_GROUPSYS_GROUPLOW_GROUPAUTO_TASK_CONSUMER_GROUP-- Create a job class.BEGINDBMS_SCHEDULER.create_job_class (job_class_name => 'test_job_class',resource_consumer_group => 'AUTO_TASK_CONSUMER_GROUP');END;/PL/SQL procedure successfully completed.SQL> SELECT job_class_name, resource_consumer_group FROM dba_scheduler_job_classes;JOB_CLASS_NAME RESOURCE_CONSUMER_