Windows Stuff

A web-iv internal document covering background & details associated with windows bundle patches.
Please review the posts in thread
http://myforums.oracle.com/jive3/thread.jspa?messageID=4187315

Limitations with symbols files availability for diagnosing the process dump/crash
Please review the posts in thread
http://myforums.oracle.com/jive3/thread.jspa?threadID=380110

Effective Port Specific(Windows) Bug and/or OOB Screening
Please review the posts in thread
http://myforums.oracle.com/jive3/thread.jspa?threadID=380113

Web-iv document covering competency or issue specific data set required (common FAQ) for Bug screening.
Please review the posts in thread
http://myforums.oracle.com/jive3/thread.jspa?threadID=380136

How to collect debug info in windows? Like attaching to a process outside oracle and taking stacks using pstack – anything exist equivalent in windows?
Please go to posting
http://myforums.oracle.com/jive3/thread.jspa?threadID=380063

How to find thread id when oracle.exe is consuming too much of memory /cpu and unable to login db?
Please go to posting
http://myforums.oracle.com/jive3/thread.jspa?threadID=380069

Windows test machine env like our embde in unix machines many a times it is like I applied patchset n and this problem reproduces we dont seem to have test servers or we are not aware so if we can get that where we can have embde type of env there
Please go to posting
http://myforums.oracle.com/jive3/thread.jspa?threadID=380072

Any specific patch suggestion is difficult, since txn level patch application is not feasible in windows and it has to go thru bundles.
Please go to posting
http://myforums.oracle.com/jive3/thread.jspa?threadID=380074

Windows Software Versions

Windows 7 will be build 6.1.7600.16385. SQL Server 2008 SP1 with Cumulative Rollup 3 applied has a build number of 10.00.2723. Who cares, right? Well, as time goes on, you’ll probably run across a situation in which you need to know something deeper than just the service pack you’re running. In that instance, you’ll probably need to resort to using cryptic build numbers and matching up these build numbers against something that makes a little more sense. Scott Lowe brings you a list of dozens of versions of Windows, Exchange, and SQL Server and outlines the release date, version, and build number for each release.

——————————————————————————————————————-

Here’s the scenario: You’re installing a new software product and can’t remember if you’re at SQL Server 2005 SP2 yet and that’s the database version required by the product you intend to install. After pausing the installation process, you connect to the database server, run a script, and get the version name and number. Alternatively, you look for the SQL version identifier and match it up against a resource you locate via the all-knowing Google. However, it can still be hard sometimes to figure out exactly where you stand with regard to SQL, Exchange, and even Windows.

There are a lot of common pieces of Microsoft software out there, and a lot of resources for finding exactly which version of software you’re running. Microsoft software internal version numbering is not generally well-known (e.g., Windows 7 will be build 6.1.7600.16385), but the overall product versions are understood (e.g., Windows Vista RTM, SP1, etc.). As another example, SQL version 9.00.4035 corresponds to SQL Server 2005 SP3 without any cumulative updates applied.

I’ve culled version information from various Web resources in an effort to help you more quickly and easily identify the exact versions of software that you may be running. To say that locating and verifying this information has been a relatively difficult undertaking would be a pretty accurate statement. Although there are resources out there that have some of the necessary information, I searched through, literally, dozens of sites to piece together the information you see below. While I believe (to the best of my ability) that the information is accurate, if you identify a discrepancy or if you have additional information that could be useful, please leave a comment. I intend to periodically review, update, and republish this piece as substantive changes are made. I’d also like to add additional products over time. You’ll notice that I focused on the Windows NT line of operating systems and have not included Windows 95 and its brethren; I plan to add that in the future.

The table below is broken down into four columns:

  • Release date. This is the month and year in which a particular release was made available. Bear in mind that there can be multiple release dates. For example, is Windows 7 being released in August 2009 or October 2009? Well, it depends on how you look at it. The RTM bits will be available starting August 6, 2009, but general availability doesn’t hit until October 22, 2009. If anyone knows what the original release dates were for SQL Server 6.5, I’d be interested in adding that information to this page.
  • Software title/branded version. For example, Windows XP, Exchange Server 2003
  • Version. RTM, SP1, etc.
    • CU stands for Cumulative Update
    • CH stands for Cumulative Hotfix
    • RTM stands for Release to Manufacturing. I use RTM to describe the initial release of a product. Technically, every release has an RTM period, but RTM is commonly used in the manner in which I’ve described.
  • Internal build number. The internal build number often causes confusion as it doesn’t always match the product name. For example, Windows 7 RTM has a build number of 6.1.7600.16385, thereby “proving” to some that Windows 7 is a minor release. The build number is simply an interval versioning mechanism. If you see any discrepancies in the build information, please leave a comment. Also, if you know where I can find additional build information (e.g., the complete Windows 2003 RTM build number), please let me know.

 

Windows (NT line, 2000+)
February 2000 Windows 2000 RTM 5.0.2195
August 2000 Windows 2000 SP1 5.0.2195 Service Pack 1
May 2001 Windows 2000 SP2 5.0.2195 Service Pack 2
August 2002 Windows 2000 SP3 5.0.2195 Service Pack 3
June 2003 Windows 2000 SP4 5.0.2195 Service Pack 4
October 2001 Windows XP RTM 5.1.2600
September 2002 Windows XP SP1 5.1.2600.1106
August 2004 Windows XP SP2 5.1.2600.2180
April 2008 Windows XP SP3 5.1.2600.5512
April 2003 Windows Server 2003 RTM 5.2.3790
March 2005 Windows Server 2003 SP1 5.2.3790.1180
March 2007 Windows Server 2003 SP2 5.2.3790.3959
December 2005 Windows Server 2003 R2 SP1 5.2.3790.1180
July 2006 Windows Fundamentals
 for Legacy PCs
  5.1.2600
November 2006 Windows Vista RTM 6.0.6000.16386
February 2008 Windows Vista SP1 6.0.6001.18000
April 2009 Windows Vista SP2 6.0.6002.18005
July 2007 Windows Home Server   5.2.4500
February 2008 Windows Server 2008 RTM/SP1 6.0.6001.18000
April 2009 Windows Server 2008 SP2 6.0.6002.18005
October 2009 Windows 7 RTM 6.1.7600.16385
October 2009 Windows Server 2008 R2 RTM 6.1.7600.16385
SQL Server
SQL Server 6.5 RTM 6.50.201
  SQL Server 6.5 SP1 6.50.213
  SQL Server 6.5 SP2 6.50.240
  SQL Server 6.5 SP3 6.50.258
  SQL Server 6.5 SP4 6.50.281
  SQL Server 6.5 SP5 6.50.415
  SQL Server 6.5 SP5a 6.50.416
  SQL Server 6.5 Post SP5 6.50.479
January 1999 SQL Server 7.0 RTM 7.00.623
July 1999 SQL Server 7.0 SP1 7.00.699
March 2000 SQL Server 7.0 SP2 7.00.842
December 2000 SQL Server 7.0 SP3 7.00.961
April 2002 SQL Server 7.0 SP4 7.00.1063
November 2000 SQL Server 2000 RTM 8.00.194
June 2001 SQL Server 2000 SP1 8.00.384
November 2001 SQL Server 2000 SP2 8.00.534
January 2003 SQL Server 2000 SP3 8.00.760
May 2003 SQL Server 2000 SP3a 8.00.760 (8.00.766)
June 2005 SQL Server 2000 SP4 8.00.2039
January 2006 SQL Server 2005 RTM 9.00.1399
April 2006 SQL Server 2005 SP1 9.00.2047
February 2009 SQL Server 2005 SP2 9.00.3042
March 2007 SQL Server 2005 SP2a 9.00.3042.01
March 2007 SQL Server 2005 SP2 CH 9.00.3152
April 2007 SQL Server 2005 SP2 CU1 9.00.3161
June 2007 SQL Server 2005 SP2 CU2 9.00.3175
August 2007 SQL Server 2005 SP2 CU3 9.00.3186
October 2007 SQL Server 2005 SP2 CU4 9.00.3200
December 2007 SQL Server 2005 SP2 CU5 9.00.3215
February 2008 SQL Server 2005 SP2 CU6 9.00.3228
April 2008 SQL Server 2005 SP2 CU7 9.00.3239
June 2008 SQL Server 2005 SP2 CU8 9.00.3257
August 2008 SQL Server 2005 SP2 CU9 9.00.3282
October 2008 SQL Server 2005 SP2 CU10 9.00.3294
December 2008 SQL Server 2005 SP2 CU11 9.00.3301
February 2009 SQL Server 2005 SP2 CU12 9.00.3315
April 2009 SQL Server 2005 SP2 CU13 9.00.3225
June 2009 SQL Server 2005 SP2 CU14 9.00.3328
December 2008 SQL Server 2005 SP3 9.00.4035
December 2008 SQL Server 2005 SP3 CU1 9.00.4207
February 2009 SQL Server 2005 SP3 CU2 9.00.4211
April 2009 SQL Server 2005 SP3 CU3 9.00.4220
June 2009 SQL Server 2005 SP3 CU4 9.00.4226
August 2008 SQL Server 2008 RTM 10.00.1600
September 2008 SQL Server 2008 RTM CU1 10.00.1763
November 2008 SQL Server 2008 RTM CU2 10.00.1779
January 2009 SQL Server 2008 RTM CU3 10.00.1787
March 2009 SQL Server 2008 RTM CU4 10.00.1798
May 2009 SQL Server 2008 RTM CU5 10.00.1806
July 2009 SQL Server 2008 RTM CU6 10.00.1812
April 2009 SQL Server 2008 SP1 10.00.2531
April 2009 SQL Server 2008 SP1 CU1 10.00.2710
May 2009 SQL Server 2008 SP1 CU2 10.00.2714
July 2009 SQL Server 2008 SP1 CU3 10.00.2723
Exchange Server
April 1996 Exchange Server 4.0 RTM 4.0.837
May 1996 Exchange Server 4.0 SP1 4.0.838
August 1996 Exchange Server 4.0 SP2 4.0.993
November 1996 Exchange Server 4.0 SP3 4.0.994
April 1997 Exchange Server 4.0 SP4 4.0.995
May 1998 Exchange Server 4.0 SP5 4.0.996
March 1997 Exchange Server 5.0 RTM 5.0.1457
June 1997 Exchange Server 5.0 SP1 5.0.1458
February 1998 Exchange Server 5.0 SP2 5.0.1460
November 1997 Exchange Server 5.5 RTM 5.5.1960
July 1998 Exchange Server 5.5 SP1 5.5.2232
December 1998 Exchange Server 5.5 SP2 5.5.2448
September 1999 Exchange Server 5.5 SP3 5.5.2650
November 2000 Exchange Server 5.5 SP4 5.5.2653
October 2000 Exchange 2000 Server RTM 6.0.4417
July 2001 Exchange 2000 Server SP1 6.0.4712
December 2001 Exchange 2000 Server SP2 6.0.5762
August 2002 Exchange 2000 Server SP3 6.0.6249
September 2003 Exchange 2000 Server Post SP3 update 6.0.6487
April 2004 Exchange 2000 Server Post SP3 update 6.0.6556
August 2004 Exchange 2000 Server Post SP3 update 6.0.6603
October 2003 Exchange Server 2003 RTM 6.5.6944
May 2004 Exchange Server 2003 SP1 6.5.7226
October 2005 Exchange Server 2003 SP2 6.5.7638
December 2006 Exchange Server 2007 RTM 8.0.685.24 or 8.0.685.25
November 2007 Exchange Server 2007 SP1 8.1.0240.006

Undo Usage Query


create or replace view undo_user_usage as (
SELECT V.SID sid, V.SERIAL# serial#, V.USERNAME username, sum(E.BYTES)/1024/1024 mb
FROM V$SESSION V, V$TRANSACTION T, DBA_ROLLBACK_SEGS R, dba_undo_extents e
WHERE V.SADDR=T.SES_ADDR AND T.XIDUSN=R.SEGMENT_ID AND R.TABLESPACE_NAME in
(select tablespace_name from dba_tablespaces where contents='UNDO')
and e.status='ACTIVE'
group by sid, serial#, username )
);

select nvl(max(mb),0) from user_undo_usage;

SQL> desc dba_undo_extents;
Name Null? Type
----------------------------------------- -------- ----------------------------
OWNER CHAR(3)
SEGMENT_NAME NOT NULL VARCHAR2(30)
TABLESPACE_NAME NOT NULL VARCHAR2(30)
EXTENT_ID NUMBER
FILE_ID NOT NULL NUMBER
BLOCK_ID NUMBER
BYTES NUMBER
BLOCKS NUMBER
RELATIVE_FNO NUMBER
COMMIT_JTIME NUMBER
COMMIT_WTIME VARCHAR2(20)
STATUS VARCHAR2(9)

SQL> select text from dba_views where view_name='DBA_UNDO_EXTENTS';

TEXT
--------------------------------------------------------------------------------
select /*+ ordered use_nl(e) use_nl(f) */
'SYS', --OWNER
u.name, --SEGMENT_NAME
t.name, --TABLESPACE_NAME
e.ktfbueextno, --EXTENT_ID
f.file#, --FILE_ID
e.ktfbuebno, --BLOCK_ID
e.ktfbueblks * t.BLOCKSIZE, --BYTES
e.ktfbueblks, --BLOCKS
e.ktfbuefno, --RELATIVE_FNO
nullif(e.ktfbuectm, e.ktfbuectm), --COMMIT_JTIME
nullif(e.ktfbuestt, e.ktfbuestt), --COMMIT_WTIME
decode(e.ktfbuesta, 1, 'ACTIVE', 2, 'EXPIRED', 3, 'UNEXPIRED','UNDEFINED') --STATUS
from undo$ u, ts$ t, sys.x$ktfbue e, sys.file$ f
where
e.ktfbuesegfno = u.file#
and e.ktfbuesegbno = u.block#
and e.ktfbuesegtsn = u.ts#
and u.spare1 = 1
and t.ts# = u.ts#
and e.ktfbuefno = f.relfile#
and u.ts# = f.ts#

SMON Events


event="10513 trace name context forever, level 2" --disable transaction recovery
event="10061 trace name context forever, level 10" --disable temp segment cleanup
event="10269 trace name context forever, level 10" --disable coelescing of free space

Plesk Backup Command Usage

/usr/local/psa/bin/pleskbackup --help
Usage: pleskbackup  <command> [<options>] <arguments>

Commands:

  server         Backs up whole Plesk.

  resellers-name Backs up selected resellers. Reseller's logins are read from command line,
                 space-separated. If no resellers provided, backs up all resellers
                 on the host.

  resellers-id   Backs up selected resellers. Reseller's identificators are read from command line,
                 space-separated. If no resellers provided, backs up all resellers
                 on the host.

  clients-name   Backs up selected clients. Client's logins are read from command line,
                 space-separated. If no clients provided, backs up all clients
                 on the host.

  clients-id     Backs up selected clients. Client's identificators are read from command line,
                 space-separated. If no clients provided, backs up all clients
                 on the host.

  domains-name   Backs up selected domains. Domain's names are read from command line,
                 space-separated. If no domains provided, backs up all domains
                 on the host.

  domains-id     Backs up selected domains. Domain's identificators are read from command line,
                 space-separated. If no domains provided, backs up all domains
                 on the host.

                 Use Exclude options to exclude some resellers/clients/domains.

  help           Shows this help page

General options:

  -f|--from-file=<file>
                 Read list of domains/clients/resellers from file, not from command line.
                 File should contain list of domains/clients/resellers one per line.

  -v|--verbose
                 Show more information about backup process. Multiple -v
                 options increase verbosity.

  -s|--split[=<size>]
                 Split the generated backups to the parts. Parts are numbered
                 by appending NNN suffixes.

                 Size may be specified in kilobytes (<nn>K), megabytes (<nn>M)
                 and gigabytes (<nn>G). By default in bytes.

                 '-s' option without argument selects default split size:
                 2 gigabytes.

  -z|--no-gzip   Do not compress content files

  -c|--configuration
                 Backup only configuration of objects, not the content.

  --only-mail
                 Backup only mail configuration and content of selected objects.
  --only-hosting
     Backup only hosting configuration and content of selected objects.
  --suspend
     Suspend domains during backup operation.

  --skip-logs    Do not save log files in the backup file

  --prefix=<prefix>
     Backup file name prefix. Used to customize backup file name ( default is 'backup' ).

  -d|--description=<description>
    Add description to the dump

FTP options:

 --ftp-login=<ftp_login>
                 Specify the FTP login
 --ftp-password=<ftp_password>
   Specify the FTP password (used with '--ftp-login')
 --ftp-passive-mode
   Use FTP passive mode

Exclude options:

  --exclude-reseller=<obj1>,<obj2>,...
                 Exclude resellers from backup list.
                 Reseller's logins are read from command line, comma-separated.
                 If no resellers provided, resellers are not backuped

  --exclude-reseller-file=<file>
                 Exclude resellers listed in file from backup list.
                 File should contain list of reseller's logins one per line.

  --exclude-client=<obj1>,<obj2>,...
                 Exclude clients from backup list.
     Client's logins are read from command line, comma-separated.
                 If no clients provided, clients are not backuped

  --exclude-client-file=<file>
                 Excludes clients listed in file from backup list.
                 File should contain list of client's logins one per line.

  --exclude-domain=<obj1>,<obj2>,...
                 Exclude domains from backup list.
                 Domain's names are read from command line, comma-separated.
                 If no domains provided, domains are not backuped

  --exclude-domain-file=<file>
                 Exclude domains listed in file from backup list.
                 File should contain list of domain's names one per line.


Output file option:
  --output-file=<output_file>
   /fullpath/filename  - regular file,
        -      - use stdout for output,

  ftp://[<login>[:<password>]@]<server>/<filepath> - storing the backup to ftp server.
   FTP_PASSWORD environment variable can be used for setting password.
   FTP option '--ftp-login' can be used for setting login.
   FTP option '--ftp-password' (with '--ftp-login') can be used for setting password.

        Used to import dump from repository into the single file.

Oracle to/from unix time

CREATE OR REPLACE FUNCTION TO_UNIXTIME
 ( oratime IN timestamp DEFAULT SYSTIMESTAMP)
 RETURN  number IS
  temp_days interval day(6) to second(6);
  num_val number;

BEGIN
   temp_days := (oratime - to_timestamp('01-JAN-1970','DD-MON-YYYY'));
   
         num_val := to_number(extract(second from temp_days))*1000 +
              to_number(extract(minute from temp_days)) * 60 *1000 + 
              to_number(extract(hour from temp_days))   * 60 * 60 *1000+ 
              to_number(extract(day from temp_days))  * 60 * 60* 24 *1000;

   RETURN num_val;
END;
/

SQL> alter session set nls_timestamp_format='mm/dd/yyyy hh:mi:ssxff am';
SQL> column ts form 999999999999999
SQL> select to_unixtime('7/28/2011 5:19:15.833000 PM') ts from dual;

              TS
----------------
   1311873555833



CREATE OR REPLACE FUNCTION FROM_UNIXTIME
 ( unixtime IN number DEFAULT 0)
 RETURN  varchar2 IS
  oracle_date date;

BEGIN
   oracle_date := to_date(trunc((unixtime/1000)/86400 + 2440588), 'J')+(((unixtime/1000)/86400+2440588)-(trunc((unixtime/1000)/86400 + 2440588)));
   RETURN oracle_date;
END;
/

ALTER SESSION SET NLS_DATE_FORMAT='dd-mon-yyyy hh24:mi:ss';
select from_unixtime(1316184485675) from dual;

SQL>
FROM_UNIXTIME(1316184485675)
--------------------------------------------------------------------------------
16-sep-2011 14:48:06

CREATE OR REPLACE FUNCTION FROM_UNIXTIME_ts
( unixtime IN number DEFAULT 0)
RETURN  varchar2 IS
 oracle_date timestamp(6);
BEGIN
  oracle_date := to_timestamp('01-JAN-1970','DD-MON-YYYY')+numtodsinterval(unixtime/1000,'SECOND');
  RETURN oracle_date;
END;
/ 

select from_unixtime_ts(1316184485675) from dual;

FROM_UNIXTIME_TS(1316184485675)
--------------------------------------------------------------------------------
16-SEP-11 02.48.05.675000 PM

ORA-1555 Query


spool dba_hist_undostat.txt
set linesize 260
column "Begin Time" format a22
column "End Time" format a22
column "Undo TS#" format 99999999
column "Undo Blks Used" format 99999999999999999
column "Xact Count" format 99999999999999999
column "Tuned Undo Rtn" format 99999999999999999
column "Max Query Len" format 99999999999999999
column "Max Concurrancy" format 99999999999999999
column "Unexp Steal Cnt" format 99999999999999999
column "Unexp Release Cnt" format 99999999999999999
column "Unexp Reuse Cnt" format 99999999999999999
column "Exp Steal Cnt" format 99999999999999999
column "Exp Release Cnt" format 99999999999999999
column "Exp Reuse Cnt" format 99999999999999999
column "ORA-1555" format 999999999
column "ORA-30036" format 999999999

SELECT TO_CHAR(v.begin_time, 'DD-Mon-YYYY HH24:MI:SS') "Begin Time",
TO_CHAR(v.end_time, 'DD-Mon-YYYY HH24:MI:SS') "End Time",
v.undotsn "Undo TS#",
v.undoblks "Undo Blks Used",
v.txncount "Xact Count",
v.tuned_undoretention "Tuned Undo Rtn",
v.maxquerylen "Max Query Len",
v.maxconcurrency "Max Concurrancy",
v.unxpstealcnt "Unexp Steal Cnt",
v.unxpblkrelcnt "Unexp Release Cnt",
v.unxpblkreucnt "Unexp Reuse Cnt",
v.expstealcnt "Exp Steal Cnt",
v.expblkrelcnt "Exp Release Cnt",
v.expblkreucnt "Exp Reuse Cnt",
v.ssolderrcnt "ORA-1555",
v.nospaceerrcnt "ORA-30036"
FROM dba_hist_undostat v
where v.begin_time>to_date('05-DEC-2007 06:00:00','DD-Mon-YYYY HH24:MI:SS');
spool off

multipart email


?php

# -=-=-=- PHP FORM VARIABLES (add as many as you would like)

$name = $_POST["name"];
$email = $_POST["email"];
$invoicetotal = $_POST["invoicetotal"];

# -=-=-=- MIME BOUNDARY

$mime_boundary = "----Your_Company_Name----".md5(time());

# -=-=-=- MAIL HEADERS

$to = "$email";
$subject = "This text will display in the email's Subject Field";

$headers = "From: Our Company n";
$headers .= "Reply-To: Our Company n";
$headers .= "MIME-Version: 1.0n";
$headers .= "Content-Type: multipart/alternative; boundary="$mime_boundary"n";

# -=-=-=- TEXT EMAIL PART

$message = "--$mime_boundaryn";
$message .= "Content-Type: text/plain; charset=UTF-8n";
$message .= "Content-Transfer-Encoding: 8bitnn";

$message .= "$name:nn";
$message .= "This email is to confirm that "Our Company" has received your order.n";
$message .= "Please send payment of $invoicetotal to our company address.nn";
$message .= "Thank You.nn";

# -=-=-=- HTML EMAIL PART

$message .= "--$mime_boundaryn";
$message .= "Content-Type: text/html; charset=UTF-8n";
$message .= "Content-Transfer-Encoding: 8bitnn";

$message .= "n";
$message .= "n";
$message .= "$name:
n";
$message .= "
n";
$message .= "This email is to confirm that "Our Company" has received your order.
n";
$message .= "Please send payment of $invoicetotal to our company address.
nn";
$message .= "
n";
$message .= "Thank You.
nn";
$message .= "n";
$message .= "n";

# -=-=-=- FINAL BOUNDARY

$message .= "--$mime_boundary--nn";

# -=-=-=- SEND MAIL

$mail_sent = @mail( $to, $subject, $message, $headers );
echo $mail_sent ? "Mail sent" : "Mail failed";

?>

JVM Removal


exec rmjvm.run(true);
truncate table java$jvm$status;
commit;

delete from obj$ where obj#=0 and type#=0;
commit;

delete from sys.registry$ where cid in ('CATJAVA', 'JAVAVM');
commit;

--These 3 statements should all return 0 rows

select owner, count(*) from all_objects
where object_type like '%JAVA%' group by owner;
select obj#, name from obj$
where type#=28 or type#=29 or type#=30 or namespace=32;
select o1.name from obj$ o1,obj$ o2
where o1.type#=5 and o1.owner#=1 and o1.name=o2.name and o2.type#=29;

If the 3 selects all return 0 rows then shutdown the database. This is very important! Do not skip!
Once the db is shutdown then continue with fulljvm_inst.sql

-- Start of File full_jvminst.sql
spool full_jvminst.log;
set echo on
connect / as sysdba
startup mount
alter system set "_system_trig_enabled" = false scope=memory;
alter database open;
select obj#, name from obj$
where type#=28 or type#=29 or type#=30 or namespace=32;
@?/javavm/install/initjvm.sql
select count(*), object_type from all_objects
where object_type like '%JAVA%' group by object_type;
@?/xdk/admin/initxml.sql
select count(*), object_type from all_objects
where object_type like '%JAVA%' group by object_type;
@?/xdk/admin/xmlja.sql
select count(*), object_type from all_objects
where object_type like '%JAVA%' group by object_type;
@?/rdbms/admin/catjava.sql
select count(*), object_type from all_objects
where object_type like '%JAVA%' group by object_type;
@?/rdbms/admin/catexf.sql
select count(*), object_type from all_objects
where object_type like '%JAVA%' group by object_type;
shutdown immediate
set echo off
spool off
exit
-- End of File full_jvminst.sql

JVM Queries


select role from dba_roles where role like ‘%JAVA%’;

SELECT o.owner ,o.objects,NVL(i.invalids, 0) invalid
FROM (SELECT owner, count(*) objects
FROM dba_objects
WHERE object_type like ‘JAVA%’
GROUP by owner) o,
(SELECT owner, count(*) invalids
FROM dba_objects
WHERE object_type like ‘JAVA%’
AND status = ‘INVALID’
GROUP by owner) i
WHERE o.owner = i.owner(+);

java.lang.OutOfMemory

From bug 8549635:

As noted, the array in the testcase requires 500MB of memory. In OJVM (the
Java VM which runs in the RDBMS server), this memory must be contiguous and
is allocated from the RDBMS memory system (KGH), from the space known there
as PGA. The maximum allocation allowed in PGA is controlled by
the OSD function sskgmqprvtmaxalloc, for which the commentary says
We hardcode this to 64MB or 256MB, depending on the size of ubig_ora.
Note that this must be an exact multiple of skgmqprotectsize().

There isn’t much point in increasing this beyond 64MB for 32-bit
platforms, or 2GB for 64-bit platforms, since we can’t use kgh to
allocate anything larger than that.
So it is an Oracle/RDBMS restriction that no array that requires more than
256MB (or 64MB on 32bit platforms) can be allocated by OJVM. One
might think that it is a bug that OracleRuntime.getMaxMemorySize
doesn’t reflect this fact, but in fact that method refers to the
limit on the total amount of memory used by a part of the memory
manager, not the limit on individual object size.

Invalid Object Queries


column comp_name format a40
column version format a12
select comp_name,version,status from dba_registry;

column owner format a15
column object_name format a40
column object_type format a20
select owner, object_name, object_type from dba_objects where status='INVALID' order by owner,object_name;

set linesize 260
column owner format a12
column name format a30
column position format a10
column text format a150
SELECT e.owner, e.name, TO_CHAR(e.line) || '/' || TO_CHAR(e.position) "POSITION", e.text
FROM dba_errors e
ORDER BY e.owner, e.name, e.sequence;

Duplicate invalid types
========================
select object_id, owner, object_name, object_type, status from dba_objects where object_name in (select distinct object_name from dba_objects where object_type='TYPE' and status='INVALID') order by owner, object_name;

SR 7227690.992
I am helping out Walter with some of his calls. The 16 invalid objects in the SYS schema are all stale types. Types work a little different than other objects in that you can have multiple types by the same name in the same schema. It's not really multiple types, but rather multiple versions of the same type. As long as there is one of each name that is valid, then you can ignore the invalid ones by the same name. They are referred to as "stale" types. There is an open bug (bug 6599034) which lists the same invalid types that you have. There is a comment from development in the bug which states it is OK to ignore the stale types. They do not cause any problems. Furthermore, it is extremely difficult to get rid of them.

SYS AQ$_DESCRIPTOR TYPE INVALID
SYS AQ$_EVENT_MESSAGE TYPE INVALID
SYS AQ$_REG_INFO TYPE INVALID
SYS AQ$_REG_INFO_LIST TYPE INVALID
SYS AQ$_SRVNTFN_MESSAGE TYPE INVALID
SYS DBMS_XPLAN_TYPE TYPE INVALID
SYS DBMS_XPLAN_TYPE_TABLE TYPE INVALID
SYS LCR$_ROW_LIST TYPE INVALID
SYS LCR$_ROW_UNIT TYPE INVALID
SYS MSG_PROP_T TYPE INVALID
SYS XMLGENFORMATTYPE TYPE INVALID

How to use sa-learn to teach spamassassin

This guide is to describe the steps to give you the ability to teach spamassassin what spam is.  The guide is for the Maildir format.  The mbox format can be found here.

This will assume that you’ve already installed spamassassin, and have it running in it’s default state.

The domain will be called “domain.com” for system account “username”, and email user “bob”.

The folders will be called teach-isspam and teach-isnotspam, but you can use whatever you want.

1) Create a new imap folder that you can place your spam into, and a new folder that you can place false positives into (so it doesn’t tag them again)

cd /home/username/imap/domain.com/bob/Maildir

mkdir .INBOX.teach-isspam .INBOX.teach-isnotspam

chown -R username:mail .INBOX.teach-*

chmod 770 .INBOX.teach-*

echo INBOX.teach-isspam >> subscriptions

echo INBOX.teach-isnotspam >> subscriptions

Note that this can also be done via any imap client (eg: squirrelmail), just create the “teach-spam” folder under INBOX.

You can also create the 2 folders in /home/username/Maildir if you wish, to let the system account train spam.

Now you have 2 new mailboxes under user bob when accessed via IMAP (squirrelmail or roundcube).  Test these out, try putting messages in them to ensure they function correctly.

2) Now that you have the ability to put your spam and non-spam messages into their correct places, you’ll need to setup a cronjob to check these locations with sa-learn.

Create an sh file in /home/username/.spamassassin/teach.sh.

In it, put:

#!/bin/sh

DA_USER=username

DA_HOME=/home/${DA_USER}

#set this to 1 if you want the spam be removed after the run

DELETE_TEACH_DATA=0

learn_Maildir()

{

FILESPAM=${1}/.INBOX.teach-isspam

FILEHAM=${1}/.INBOX.teach-isnotspam

if [ -e ${FILESPAM}/new ] || [ -e ${FILESPAM}/cur ]; then

echo “learning spam via ${FILESPAM}…”;

sa-learn –no-sync –spam  ${FILESPAM}/{cur,new}

fi

if [ -e ${FILEHAM}/new ] || [ -e ${FILEHAM}/cur ]; then

echo “”;

echo “learning ham via $FILEHAM…”;

sa-learn –no-sync –ham ${FILEHAM}/{cur,new}

fi

if [ “$DELETE_TEACH_DATA” -eq 1 ]; then

rm -f ${FILESPAM}/new/* ${FILESPAM}/cur/*

rm -f ${FILEHAM}/new/* {FILEHAM}/cur/*

fi

}

if [ -e $DA_HOME/Maildir ]; then

learn_Maildir $DA_HOME/Maildir

fi

for d in `ls $DA_HOME/imap`; do

{

DOMAIN_DIR=${DA_HOME}/imap/${d}

if [ -h $DOMAIN_DIR ]; then

continue;

fi

for maildir in `ls -d ${DOMAIN_DIR}/*/Maildir 2>/dev/null`; do

{

learn_Maildir ${maildir}

};

done;

};

done;

echo “”;

echo “syncing…”;

sa-learn –sync

echo “”;

echo “current status:”

sa-learn –dump magic

exit 0;

Save, chmod the teach.sh to 700.

Don’t forget to replace username with the name of the actual DA user (owner of the domain).

At this point, you should be able to manually run the teach.sh to see if it works.  If you test it out, run it as username so that you make sure all files written are chowned to username, and not root.

3) Now to automate the frequent running of the teach.sh so you don’t have to run it manually every time.

Log into DirectAdmin as username and go to the cronjobs section.  Enter the commmand

/home/username/.spamassassin/teach.sh

and for the times, put minute=0, hour=*/12 (twice  day), a * character in all other filelds.

That’s it.

To use it, if you get email that wasn’t tagged as spam, drag it into your teach-isspam folder.

If you get email that was tagged as spam that should have been, move it to your teach-isnotspam folder.

You can delete the email you’ve place there aftera day or so, to ensure it’s been caught by the sa-learn program.

Note that sa-learn can process the same email twice and it won’t hurt anything.

If you want to empty these 2 folders after each run, set:

DELETE_TEACH_DATA=1

This will reset those folders to 0 bytes, so that you don’t have to delete the messages after they’re processed.

How to Remove a Stuck Mouthpiece

Tools you need — two open-end wrenches 3/8 inch, 7/16 inch, (the actual sizes you need may vary) and a metal spacer about 1.25 inches wide.
Put the 3/8 wrench on the mouth piece stem, it should be a snug fit, resting on the top of the lead tube.
Put the 7/16 wrench on the mouth piece just under the bowl (you might need a 1/2 wrench instead).
Put the metal spacer between the two wrenches so that it is touching the mouth piece. Any strong metal will work, but it must be a perfect fit. I used a large flat file for a spacer.
Squeeze the two wrenches together. The spacer between them will act as a fulcrum and the mouthpiece will pop out!
If it doesn’t work, you may need a larger spacer. Make sure it is close to the mouth piece for best leverage.

DBMS_SPACE Usage

declare
v_unformatted_blocks number;
v_unformatted_bytes number;
v_fs1_blocks number;
v_fs1_bytes number;
v_fs2_blocks number;
v_fs2_bytes number;
v_fs3_blocks number;
v_fs3_bytes number;
v_fs4_blocks number;
v_fs4_bytes number;
v_full_blocks number;
v_full_bytes number;
begin
dbms_space.space_usage ('SYS', 'CHRIS_AUTO', 'TABLE',
v_unformatted_blocks, v_unformatted_bytes, v_fs1_blocks,
v_fs1_bytes, v_fs2_blocks, v_fs2_bytes, v_fs3_blocks,
v_fs3_bytes, v_fs4_blocks, v_fs4_bytes, v_full_blocks,
v_full_bytes);
dbms_output.put_line('Unformatted Blocks = '||v_unformatted_blocks);
dbms_output.put_line('Unformatted Bytes = '||v_unformatted_bytes);
dbms_output.put_line('FS1 Bytes = '||v_fs1_bytes);
dbms_output.put_line('FS1 Blocks = '||v_fs1_blocks);
dbms_output.put_line('FS2 Bytes = '||v_fs2_bytes);
dbms_output.put_line('FS2 Blocks = '||v_fs2_blocks);
dbms_output.put_line('FS3 Bytes = '||v_fs3_bytes);
dbms_output.put_line('FS3 Blocks = '||v_fs3_blocks);
dbms_output.put_line('FS4 Bytes = '||v_fs4_bytes);
dbms_output.put_line('FS4 Blocks = '||v_fs4_blocks);
dbms_output.put_line('Full Blocks = '||v_full_blocks);
dbms_output.put_line('Full Bytes = '||v_full_bytes);
end;
/

Copy To…/Move To… Registry Hack

1. Start Regedit by navigating to Start | Run and typing regedit in the dialog box.

2. Navigate to this key in the Registry file:

HKEY_CLASSES_ROOTAllFilesystemObjectsshellexContextMenuHandlers

3. Right-click on the ContextMenuHandlers folder and select New | Key to add a new key.

4. Give it the name Copy To and then double-click the (Default) value of the new key s right-hand pane.

5. Type in this code as the new data:

{C2FBB630-2971-11D1-A18C-00C04FD75D13}

6. Right-click on the ContextMenuHandlersfolder and select New | Key to add a new key.

7. Give it the name Move To and then double-click the (Default) value of the new key s right-hand pane.

8. Type in this code as the new data:

{C2FBB631-2971-11D1-A18C-00C04FD75D13}

9. Click OK and close Regedit.

Compiling mcrypt for php

Download php installation source from http://www.php.net/.

1. tar -zxf php-5.1.6.tar.gz
2. cd to php-5.1.6/ext/mcrypt
3. phpize
4. aclocal
5. ./configure
6. make clean
7. make
8. make install
9. vi /etc/php.d/mcrypt.ini and add the following lines:

; Enable mbstring extension module
extension=mcrypt.so

10. Restart apache

Found at http://www.outofcontrol.ca/2008/04/01/installing-mcrypt-into-php5-as-a-module/

checkvalid.sql


set serveroutput on;
declare
start_time date;
end_time date;
object_name varchar(100);
object_id char(10);
begin
SELECT date_loading, date_loaded into start_time, end_time FROM registry$ WHERE
cid = 'CATPROC';
SELECT obj#,name into object_id,object_name
FROM obj$
WHERE status > 1 AND
(ctime BETWEEN start_time AND end_time OR
mtime BETWEEN start_time AND end_time OR
stime BETWEEN start_time AND end_time) AND
ROWNUM <=1; dbms_output.put_line('Please compile Invalid object '||object_name||' Object_id '||object_id ); EXCEPTION WHEN NO_DATA_FOUND THEN dbms_output.put_line('CATPROC can be validated now' ); end;

Breezing Forms Absolute Positioning Problem

http://crosstec.de/en/forums/15-usage/8320-absolute-positioning-in-classic-mode.html

I need a way to turn off absolute positioning. BF has hard codeded the css property position:absolute into an inline style. Inline styles override what is in the css stylesheet. Thus, unless I am missing something, it is impossible to to relatively position an element.

Here is the problem. I have a text/html field which returns a variable amount of data (anywhere from 1 line to thousands of lines). Since the element is positioned absolutely, it’s finial size has no influence on the size of the containing block. If I size the form to be large enough to always include everything that is returned then I waste a tremendous amount of space. If I size it to satisfy most results then I either still have wasted space or it shows what it can and the rest is not visible (and there is no way to scroll).

I have tried adding position:relative in a css file. It does not work.

I have tried using the auto height feature. This is even worse. If the element is larger than the containing block then it doesn’t display at all. It doesn’t matter how big I make the bottom margin. It seems to ignore it.

The only way I have been able to get this to work is to modify facileforms.process.php. My current hack is to comment out the absolute and change it to relative like this:
// $attribs = ‘position:absolute;z-index:’.$i.’;’;
$attribs = ‘position:relative;z-index:’.$i.’;’;

I don’t like doing this because then I have to remember to change it every time I upgrade. It seems to me that what makes the most sense is to do one of the following:
1) have an option to turn off inline styles for forms and/or elements
2) have an option in the form to disable absolute positioning for all elements.
3) have an option in the element to disable absolute positioning
4) don’t even use inline styles if a class has been specified

Maybe I am missing something obvious. If so please show me. Otherwise, please fix this. Don’t tell me to use one of the other modes. I’ve already written thousands of lines of custom php code for this application in classic mode.

Thanks,
Greg

ASCII Chart

HEX OCT DEC CHAR
00 000 000 NUL
01 001 001 SOH
02 002 002 STX
03 003 003 ETX
04 004 004 EOT
05 005 005 ENQ
06 006 006 ACK
07 007 007 BEL
08 010 008 BS
09 011 009 HT
0A 012 010 LF
0B 013 011 VT
0C 014 012 FF
0D 015 013 CR
0E 016 014 SOH
0F 017 015 SI
10 020 016 DLE
11 021 017 DC1
12 022 018 DC2
13 023 019 DC3
14 024 020 DC4
15 025 021 NAK
16 026 022 SYN
17 027 023 ETB
18 030 024 CAN
19 031 025 EM
1A 032 026 SUB
1B 033 027 ESC
1C 034 028 FS
1D 035 029 GS
1E 036 030 RS
1F 037 031 US
20 040 032 SPACE
21 041 033 !
22 042 034 "
23 043 035 #
24 044 036 $
25 045 037 %
26 046 038 &
27 047 039 ‘
28 050 040 (
29 051 041 )
2A 052 042 *
2B 053 043 +
2C 054 044 ,
2D 055 045 –
2E 056 046 .
2F 057 047 /
30 060 048 0
31 061 049 1
32 062 050 2
33 063 051 3
34 064 052 4
35 065 053 5
36 066 054 6
37 067 055 7
38 070 056 8
39 071 057 9
3A 072 058 :
3B 073 059 ;
3C 074 060 <
3D 075 061 =
3E 076 062 >
3F 077 063 ?
40 100 064 @
41 101 065 A
42 102 066 B
43 103 067 C
44 104 068 D
45 105 069 E
46 106 070 F
47 107 071 G
48 110 072 H
49 111 073 I
4A 112 074 J
4B 113 075 K
4C 114 076 L
4D 115 077 M
4E 116 078 N
4F 117 079 O
50 120 080 P
51 121 081 Q
52 122 082 R
53 123 083 S
54 124 084 T
55 125 085 U
56 126 086 V
57 127 087 W
58 130 088 X
59 131 089 Y
5A 132 090 Z
5B 133 091 [
5C 134 092
5D 135 093 ]
5E 136 094 ^
5F 137 095 _
60 140 096 `
61 141 097 a
62 142 098 b
63 143 099 c
64 144 100 d
65 145 101 e
66 146 102 f
67 147 103 g
68 150 104 h
69 151 105 i
6A 152 106 j
6B 153 107 k
6C 154 108 l
6D 155 109 m
6E 156 110 n
6F 157 111 o
70 160 112 p
71 161 113 q
72 162 114 r
73 163 115 s
74 164 116 t
75 165 117 u
76 166 118 v
77 167 119 w
78 170 120 x
79 171 121 y
7A 172 122 z
7B 173 123 {
7C 174 124 |
7D 175 125 }
7E 176 126 ~
7F 177 127 DEL