Monday, February 20, 2012

Preventing driver from creating nuisance temp files

Hi,
I am using the Microsoft SQL Server 2000 Driver for JDBC, Service Pack 2,
Version 2.2.0037 with windows XP and j2sdk1.4.2_03.
I am having trouble with the driver creating huge numbers of temporary files
and never deleting them.
Each time I call the getPrimaryKeys(catalog, schema, table) method of the
DatabaseMetaData class I get two temperary file saved to the windows
temporary directory, a srt_XXXXX.tmp and a scb_YYYYY.tmp (XXXXX and YYYYY are
numbers).
The code I am using is as follows;
try {
Class.forName(com.microsoft.jdbc.sqlserver.SQLServ erDriver);
}
catch (ClassNotFoundException ce) {
}
Connection con;
con =
DriverManager.getConnection(jdbc:microsoft:sqlserv er://Server1:1433;SelectMethod=cursor;DatabaseName=data base1, user, passwd);
DatabaseMetaData md = con.getMetaData();
String catalog = null;
String schema = null;
String table = "table1";
ResultSet rs = rs = md.getPrimaryKeys(catalog, schema, tables);
The scb file is empty and the srt file always containes the same binary
number 00 00 00 01. These files are never deleted and quickly build up to
many thousands of files.
Can anybody suggest how to prevent these files from being created?
Any assistance would be much appreciated.
Regards,
Ian555
| Thread-Topic: Preventing driver from creating nuisance temp files
| thread-index: AcS7DnlA9D48A8QHSk6192TimiCXsQ==
| X-WBNR-Posting-Host: 203.59.26.12
| From: =?Utf-8?B?SWFuNTU1?= <Ian555@.discussions.microsoft.com>
| Subject: Preventing driver from creating nuisance temp files
| Date: Mon, 25 Oct 2004 20:47:11 -0700
| Lines: 43
| Message-ID: <248D2293-B2AF-4FF0-B5E2-DB42E12357DD@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.jdbcdriver
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.jdbcdriver:6419
| X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
|
| Hi,
|
| I am using the Microsoft SQL Server 2000 Driver for JDBC, Service Pack 2,
| Version 2.2.0037 with windows XP and j2sdk1.4.2_03.
|
| I am having trouble with the driver creating huge numbers of temporary
files
| and never deleting them.
|
| Each time I call the getPrimaryKeys(catalog, schema, table) method of the
| DatabaseMetaData class I get two temperary file saved to the windows
| temporary directory, a srt_XXXXX.tmp and a scb_YYYYY.tmp (XXXXX and YYYYY
are
| numbers).
|
| The code I am using is as follows;
|
| try {
| Class.forName(com.microsoft.jdbc.sqlserver.SQLServ erDriver);
| }
| catch (ClassNotFoundException ce) {
| }
| Connection con;
| con =
|
DriverManager.getConnection(jdbc:microsoft:sqlserv er://Server1:1433;SelectMe
thod=cursor;DatabaseName=database1, user, passwd);
|
| DatabaseMetaData md = con.getMetaData();
|
| String catalog = null;
| String schema = null;
| String table = "table1";
|
| ResultSet rs = rs = md.getPrimaryKeys(catalog, schema, tables);
|
| The scb file is empty and the srt file always containes the same binary
| number 00 00 00 01. These files are never deleted and quickly build up
to
| many thousands of files.
|
| Can anybody suggest how to prevent these files from being created?
|
| Any assistance would be much appreciated.
|
| Regards,
|
| Ian555
|
Hello,
We are going to investigate this problem and post back the results. Thanks
for bringing this to our attention.
Carb Simien, MCSE MCDBA MCAD
Microsoft Developer Support - Web Data
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
|||| X-Tomcat-ID: 447862052
| References: <248D2293-B2AF-4FF0-B5E2-DB42E12357DD@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: CarbinoS@.online.microsoft.com ("Carb Simien [MSFT]")
| Organization: Microsoft Corporation
| Date: Tue, 26 Oct 2004 17:41:42 GMT
| Subject: RE: Preventing driver from creating nuisance temp files
| X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
| Message-ID: <YIBoRM4uEHA.2092@.cpmsftngxa10.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.jdbcdriver
| Lines: 77
| Path: cpmsftngxa10.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.jdbcdriver:6423
| NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
|
|
| --
| | Thread-Topic: Preventing driver from creating nuisance temp files
| | thread-index: AcS7DnlA9D48A8QHSk6192TimiCXsQ==
| | X-WBNR-Posting-Host: 203.59.26.12
| | From: =?Utf-8?B?SWFuNTU1?= <Ian555@.discussions.microsoft.com>
| | Subject: Preventing driver from creating nuisance temp files
| | Date: Mon, 25 Oct 2004 20:47:11 -0700
| | Lines: 43
| | Message-ID: <248D2293-B2AF-4FF0-B5E2-DB42E12357DD@.microsoft.com>
| | MIME-Version: 1.0
| | Content-Type: text/plain;
| | charset="Utf-8"
| | Content-Transfer-Encoding: 7bit
| | X-Newsreader: Microsoft CDO for Windows 2000
| | Content-Class: urn:content-classes:message
| | Importance: normal
| | Priority: normal
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| | Newsgroups: microsoft.public.sqlserver.jdbcdriver
| | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| | Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
| | Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.jdbcdriver:6419
| | X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
| |
| | Hi,
| |
| | I am using the Microsoft SQL Server 2000 Driver for JDBC, Service Pack
2,
| | Version 2.2.0037 with windows XP and j2sdk1.4.2_03.
| |
| | I am having trouble with the driver creating huge numbers of temporary
| files
| | and never deleting them.
| |
| | Each time I call the getPrimaryKeys(catalog, schema, table) method of
the
| | DatabaseMetaData class I get two temperary file saved to the windows
| | temporary directory, a srt_XXXXX.tmp and a scb_YYYYY.tmp (XXXXX and
YYYYY
| are
| | numbers).
| |
| | The code I am using is as follows;
| |
| | try {
| |
Class.forName(com.microsoft.jdbc.sqlserver.SQLServ erDriver);
| | }
| | catch (ClassNotFoundException ce) {
| | }
| | Connection con;
| | con =
| |
|
DriverManager.getConnection(jdbc:microsoft:sqlserv er://Server1:1433;SelectMe
| thod=cursor;DatabaseName=database1, user, passwd);
| |
| | DatabaseMetaData md = con.getMetaData();
| |
| | String catalog = null;
| | String schema = null;
| | String table = "table1";
| |
| | ResultSet rs = rs = md.getPrimaryKeys(catalog, schema, tables);
| |
| | The scb file is empty and the srt file always containes the same binary
| | number 00 00 00 01. These files are never deleted and quickly build up
| to
| | many thousands of files.
| |
| | Can anybody suggest how to prevent these files from being created?
| |
| | Any assistance would be much appreciated.
| |
| | Regards,
| |
| | Ian555
| |
|
| Hello,
|
| We are going to investigate this problem and post back the results.
Thanks
| for bringing this to our attention.
|
| Carb Simien, MCSE MCDBA MCAD
| Microsoft Developer Support - Web Data
|
| Please reply only to the newsgroups.
| This posting is provided "AS IS" with no warranties, and confers no
rights.
|
| Are you secure? For information about the Strategic Technology
Protection
| Program and to order your FREE Security Tool Kit, please visit
| http://www.microsoft.com/security.
|
|
Hello,
Are you closing your ResultSet in your repro code? If I close the
ResultSet in my test, then the files are not left over any more. Please
post back indicating whether or not this changes the behavior.
Carb Simien, MCSE MCDBA MCAD
Microsoft Developer Support - Web Data
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
|||Hi Carb,
Yes, explicitly closing the resultset has prevented the temp files from
remaining in the windows temp directory.
Thank you for your assistance with this problem.
Best regards,
Ian
""Carb Simien [MSFT]"" wrote:

> --
> | X-Tomcat-ID: 447862052
> | References: <248D2293-B2AF-4FF0-B5E2-DB42E12357DD@.microsoft.com>
> | MIME-Version: 1.0
> | Content-Type: text/plain
> | Content-Transfer-Encoding: 7bit
> | From: CarbinoS@.online.microsoft.com ("Carb Simien [MSFT]")
> | Organization: Microsoft Corporation
> | Date: Tue, 26 Oct 2004 17:41:42 GMT
> | Subject: RE: Preventing driver from creating nuisance temp files
> | X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
> | Message-ID: <YIBoRM4uEHA.2092@.cpmsftngxa10.phx.gbl>
> | Newsgroups: microsoft.public.sqlserver.jdbcdriver
> | Lines: 77
> | Path: cpmsftngxa10.phx.gbl
> | Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.jdbcdriver:6423
> | NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
> |
> |
> | --
> | | Thread-Topic: Preventing driver from creating nuisance temp files
> | | thread-index: AcS7DnlA9D48A8QHSk6192TimiCXsQ==
> | | X-WBNR-Posting-Host: 203.59.26.12
> | | From: =?Utf-8?B?SWFuNTU1?= <Ian555@.discussions.microsoft.com>
> | | Subject: Preventing driver from creating nuisance temp files
> | | Date: Mon, 25 Oct 2004 20:47:11 -0700
> | | Lines: 43
> | | Message-ID: <248D2293-B2AF-4FF0-B5E2-DB42E12357DD@.microsoft.com>
> | | MIME-Version: 1.0
> | | Content-Type: text/plain;
> | | charset="Utf-8"
> | | Content-Transfer-Encoding: 7bit
> | | X-Newsreader: Microsoft CDO for Windows 2000
> | | Content-Class: urn:content-classes:message
> | | Importance: normal
> | | Priority: normal
> | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> | | Newsgroups: microsoft.public.sqlserver.jdbcdriver
> | | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> | | Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
> | | Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.jdbcdriver:6419
> | | X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
> | |
> | | Hi,
> | |
> | | I am using the Microsoft SQL Server 2000 Driver for JDBC, Service Pack
> 2,
> | | Version 2.2.0037 with windows XP and j2sdk1.4.2_03.
> | |
> | | I am having trouble with the driver creating huge numbers of temporary
> | files
> | | and never deleting them.
> | |
> | | Each time I call the getPrimaryKeys(catalog, schema, table) method of
> the
> | | DatabaseMetaData class I get two temperary file saved to the windows
> | | temporary directory, a srt_XXXXX.tmp and a scb_YYYYY.tmp (XXXXX and
> YYYYY
> | are
> | | numbers).
> | |
> | | The code I am using is as follows;
> | |
> | | try {
> | |
> Class.forName(com.microsoft.jdbc.sqlserver.SQLServ erDriver);
> | | }
> | | catch (ClassNotFoundException ce) {
> | | }
> | | Connection con;
> | | con =
> | |
> |
> DriverManager.getConnection(jdbc:microsoft:sqlserv er://Server1:1433;SelectMe
> | thod=cursor;DatabaseName=database1, user, passwd);
> | |
> | | DatabaseMetaData md = con.getMetaData();
> | |
> | | String catalog = null;
> | | String schema = null;
> | | String table = "table1";
> | |
> | | ResultSet rs = rs = md.getPrimaryKeys(catalog, schema, tables);
> | |
> | | The scb file is empty and the srt file always containes the same binary
> | | number 00 00 00 01. These files are never deleted and quickly build up
> | to
> | | many thousands of files.
> | |
> | | Can anybody suggest how to prevent these files from being created?
> | |
> | | Any assistance would be much appreciated.
> | |
> | | Regards,
> | |
> | | Ian555
> | |
> |
> | Hello,
> |
> | We are going to investigate this problem and post back the results.
> Thanks
> | for bringing this to our attention.
> |
> | Carb Simien, MCSE MCDBA MCAD
> | Microsoft Developer Support - Web Data
> |
> | Please reply only to the newsgroups.
> | This posting is provided "AS IS" with no warranties, and confers no
> rights.
> |
> | Are you secure? For information about the Strategic Technology
> Protection
> | Program and to order your FREE Security Tool Kit, please visit
> | http://www.microsoft.com/security.
> |
> |
> Hello,
> Are you closing your ResultSet in your repro code? If I close the
> ResultSet in my test, then the files are not left over any more. Please
> post back indicating whether or not this changes the behavior.
> Carb Simien, MCSE MCDBA MCAD
> Microsoft Developer Support - Web Data
> Please reply only to the newsgroups.
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Are you secure? For information about the Strategic Technology Protection
> Program and to order your FREE Security Tool Kit, please visit
> http://www.microsoft.com/security.
>

No comments:

Post a Comment