Here are the mount commands for different *nix systems.
HP-UX
nohup /usr/sbin/pfsd &
/usr/sbin/pfs_mount -t rrip -x unix /dev/dsk/c5t2d0 /SD_CDROM
AIX
Solaris Intel
SPARC Solaris
TRU64
Linux
Here are the mount commands for different *nix systems. HP-UX nohup /usr/sbin/pfs_mountd & nohup /usr/sbin/pfsd & /usr/sbin/pfs_mount -t rrip -x unix /dev/dsk/c5t2d0 /SD_CDROM AIX mount -r -v cdrfs /dev/cd0 /cdrom Solaris Intel mount -F hsfs -r /dev/dsk/c0t6d0p0 /cdrom SPARC Solaris mount -r -F hsfs /dev/dsk/c0t6d0s2 /cdrom TRU64 mount -t cdfs -r -o nodefperm,noversion,rrip /dev/rz4c /cdrom Linux mount -t iso9660 /dev/cdrom /cdrom Let’s search for the word “brave” in the string “Hello, new brave world!”. #1 – use POS function #2 – use $PREMATCH variable use English ; $txt = "Hello, brave new world!" ; $txt =~ m/(brave)/g; ###my $pos = length $` my $pos = length $PREMATCH; #3 – use @LAST_MATCH_START variable use English qw( -no_match_vars ); $txt = "Hello, brave new world!" ; $txt =~ m/(brave)/g; ### $pos = $-[0]; $pos = $LAST_MATCH_START[0]; The command to kill Oracle is simple: ALTER SYSTEM KILL SESSION '&sid,&serial'; sid – session ID
If the version 11g and this is RAC, additional syntax is possible: ALTER SYSTEM KILL SESSION '&sid,&serial,@&inst_id'; inst_id – instance id number (1, 2, 3 …)
Script to find the TOAD session older than 1 day and kill them: SELECT 'ALTER SYSTEM KILL SESSION ''' || sid || ',' || serial# || ''' immediate;' CMD FROM v$session WHERE program LIKE '%TOAD%' AND logon_time AND status != 'KILLED' ;
If the session is killed on the Oracle level and still stays in the list for very long time with status ‘KILLED’, it could be killed on the OS level. SELECT sess.sid, sess.serial#, 'OS:' || proc.spid SPID, 'App:' || sess.process process, SUBSTR(sess.username,1,15) username , sess.program, logon_time , sess.status FROM v$session sess, v$process proc WHERE sess.paddr = proc.addr AND sess.status = 'KILLED' ORDER BY 1,2; Check if “App:” process still exist – maybe, it’s worth to stop the application first. If the password for the mysql “root” user is lost, it’s still possible reset it to some other value. The following should be done: Stop the server /etc/init.d/mysql stop or effectively: ps -ef | grep mysql ... mysql 25079 1 0 Jan 31 ? 0:00 /usr/bin/mysqld ... kill -9 25079 Please ensure that the proper process is killed! Start MySQL server without security checking mysqld_safe --skip-grant-tables & Connect to mySQL without password mysql -u root Reset mySQL root password Use the real new password instead of the string “NEW_PASSWORD”. Restart mySQL server /etc/init.d/mysql stop /etc/init.d/mysql start Check the connection mysql -u root -p This is just example, how to read text file in Visual Basic for Applications (for example, in Excel macro). It’s just a stub: there is no error processing here, the source file is really text file, no problems with permissions etc. Sub read_from_text_file() txtFile = Application.GetOpenFilename("Text Files (*.txt), *.txt") If txtFile = False Then MsgBox "No file to process" Exit Sub End If Open txtFile For Input As #1 Input #1, myString MsgBox myString Close #1 End Sub Change the password for the user (as root): passwd username Reset the login counter and unlock the user: chsec -f /etc/security/lastlog -a "unsuccessful_login_count=0" -s username chuser "account_locked=false" username The easiest method to get the tablespace structure is to use the dbms_metadata package: SET linesize 200 LONG 50000 pagesize 5000 SELECT dbms_metadata.get_ddl('TABLESPACE',tablespace_name ) FROM dba_tablespaces WHERE tablespace_name IN ( '&your_tablespace' ); Additionally, exp/imp (or expdp/impdp) utilities could be used. They could generate the DDL statements for all objects in the database, which could be very useful. exp/imp exp userid=" '/ as sysdba' " rows=n file=my.dmp full=y imp userid=" '/ as sysdba' " file=my.dmp full=y show=y > full_structure.sql 2>&1 Warning! exp could not get the contents of the encrypted tablespaces. expdp/impdp expdp "'/ as sysdba'" dumpfile=mydp.dmp directory=DATA_PUMP_DIR content=metadata_only full=y impdp "'/ as sysdba'" dumpfile=mydp.dmp directory=DATA_PUMP_DIR sqlfile=full_structure.sql I think, the “Options” window in Outlook is one of the most tangled things in IT. The programmers were so smart to create real “spaghetti” window! Did they ever hear about “user friendly” interfaces? They could at least add the “Search” field somewhere – otherwise, it’s not possible to find anything. Here is the way to change the default font:
It’s nice, isn’t it? Here there are even more paths for different options. |