Showing posts with label failed. Show all posts
Showing posts with label failed. Show all posts

Tuesday, March 20, 2012

[Transfer SQL Server Objects Task] Error: Execution failed with the following error: "Canno

Anybody know what causes this?When you use SSIS, does both ends of the connection have to use SQL Server 2005 when you use a Transfer Server Objects Task?|||I also get this error. I'm trying to transfer one table between two SQL2005 servers (local and remote). Both connections test OK in the Connection Manager Editor.|||I, too, get this error. Has anyone been able to resolve this?

[Transfer SQL Server Objects Task] Error: Execution failed with the following error: "Canno

Anybody know what causes this?When you use SSIS, does both ends of the connection have to use SQL Server 2005 when you use a Transfer Server Objects Task?|||I also get this error. I'm trying to transfer one table between two SQL2005 servers (local and remote). Both connections test OK in the Connection Manager Editor.|||I, too, get this error. Has anyone been able to resolve this?sql

[Transfer SQL Server Objects Task] Error: Execution failed with the following error: "Canno

Anybody know what causes this?When you use SSIS, does both ends of the connection have to use SQL Server 2005 when you use a Transfer Server Objects Task?|||I also get this error. I'm trying to transfer one table between two SQL2005 servers (local and remote). Both connections test OK in the Connection Manager Editor.|||I, too, get this error. Has anyone been able to resolve this?

Monday, March 19, 2012

[sqsrvres] CheckQueryProcessorAlive: sqlexecdirect failed

Hi,
Anyone seeing these errors before?
[sqsrvres] CheckQueryProcessorAlive: sqlexecdirect failed
[sqsrvres] printODBCError: sqlstate = 01000; native error = 2746; message =
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (recv()).
[sqsrvres] printODBCError: sqlstate = 08S01; native error = b; message =
[Microsoft][ODBC SQL Server Driver][DBNETLIB]General network error.
[sqsrvres] OnlineThread: QP is not online.
active/active sql2k cluster with sp3a plus MS03-031 hotfix. I have seen
these errors couple of times before. I have searched on newsgroup and did not
find any answer. Really appreciate if anyone can help.
thanks in advance.
David
These are generated when the cluster service fails to connect to SQL Server
during its check of the resource. Some error occurred to affect the
connection.
Rand
This posting is provided "as is" with no warranties and confers no rights.
|||Thanks Rand for the reply.
I did not see any sql error in the sql log. In system log, there is no sign
of failover. I think i might need to setup performance monitor to trap the
resource usage if it happens next time.
thanks
David
"Rand Boyd [MSFT]" wrote:

> These are generated when the cluster service fails to connect to SQL Server
> during its check of the resource. Some error occurred to affect the
> connection.
> Rand
> This posting is provided "as is" with no warranties and confers no rights.
>
|||There probably will not be any error in the SQL errorlog. It could be a
transient error. Teh cluister serveice will try several times before it
will fail the resource.
Ranf
This posting is provided "as is" with no warranties and confers no rights.

[sqsrvres] CheckQueryProcessorAlive: sqlexecdirect failed

Hi,
Anyone seeing these errors before?
[sqsrvres] CheckQueryProcessorAlive: sqlexecdirect failed
[sqsrvres] printODBCError: sqlstate = 01000; native error = 2746; messag
e =
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (rec
v()).
[sqsrvres] printODBCError: sqlstate = 08S01; native error = b; message =
[Microsoft][ODBC SQL Server Driver][DBNETLIB]General network err
or.
[sqsrvres] OnlineThread: QP is not online.
active/active sql2k cluster with sp3a plus MS03-031 hotfix. I have seen
these errors couple of times before. I have searched on newsgroup and did no
t
find any answer. Really appreciate if anyone can help.
thanks in advance.
DavidThese are generated when the cluster service fails to connect to SQL Server
during its check of the resource. Some error occurred to affect the
connection.
Rand
This posting is provided "as is" with no warranties and confers no rights.|||Thanks Rand for the reply.
I did not see any sql error in the sql log. In system log, there is no sign
of failover. I think i might need to setup performance monitor to trap the
resource usage if it happens next time.
thanks
David
"Rand Boyd [MSFT]" wrote:

> These are generated when the cluster service fails to connect to SQL Serve
r
> during its check of the resource. Some error occurred to affect the
> connection.
> Rand
> This posting is provided "as is" with no warranties and confers no rights.
>|||There probably will not be any error in the SQL errorlog. It could be a
transient error. Teh cluister serveice will try several times before it
will fail the resource.
Ranf
This posting is provided "as is" with no warranties and confers no rights.

[sqsrvres] CheckQueryProcessorAlive: sqlexecdirect failed

Hi,
Anyone seeing these errors before?
[sqsrvres] CheckQueryProcessorAlive: sqlexecdirect failed
[sqsrvres] printODBCError: sqlstate = 01000; native error = 2746; message = [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (recv()).
[sqsrvres] printODBCError: sqlstate = 08S01; native error = b; message = [Microsoft][ODBC SQL Server Driver][DBNETLIB]General network error.
[sqsrvres] OnlineThread: QP is not online.
active/active sql2k cluster with sp3a plus MS03-031 hotfix. I have seen
these errors couple of times before. I have searched on newsgroup and did not
find any answer. Really appreciate if anyone can help.
thanks in advance.
DavidThese are generated when the cluster service fails to connect to SQL Server
during its check of the resource. Some error occurred to affect the
connection.
Rand
This posting is provided "as is" with no warranties and confers no rights.|||Thanks Rand for the reply.
I did not see any sql error in the sql log. In system log, there is no sign
of failover. I think i might need to setup performance monitor to trap the
resource usage if it happens next time.
thanks
David
"Rand Boyd [MSFT]" wrote:
> These are generated when the cluster service fails to connect to SQL Server
> during its check of the resource. Some error occurred to affect the
> connection.
> Rand
> This posting is provided "as is" with no warranties and confers no rights.
>|||There probably will not be any error in the SQL errorlog. It could be a
transient error. Teh cluister serveice will try several times before it
will fail the resource.
Ranf
This posting is provided "as is" with no warranties and confers no rights.

[SQL Server]Login failed for user

I am using Crystal Reports, VB.net, SQL Server 2000sp3, MDAC 8.0, and Windows XP. When I try to make a connection from a Crystal Report to SQL Server via an ODBC connection, I get the following message:

Details: 28000:[Microsoft][SQL Server Driver][SQL Server]Login failed for user domain/username

In the odbc, I specify SQL Server authentication and provide a username and password but these are being ignored. Why is Windows authentication being used in place of the SQL Server authentication that I specify in my odbc?

Thanks in advance,

MattThat's Crystal for you :)|||What version of Crystal Reports are you using?|||Originally posted by awsterling
What version of Crystal Reports are you using?

I am the version that came with Visual Studio .Net 2003. I don't know how to get the version number from it.

Thanks.|||Get ActiveReport from DataDynamics and you won't have to deal with these issues any more :)

Sunday, March 11, 2012

[S0001][unixODBC][Easysoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'test1'

Hello,

I am new to SQL Server, sorry for my ignorance !!!

I have installed SQL Server 2005 Express on my desktop (Win 2000 Pro.)

I have created a new database.

I just created a new login/user (SQL Authentication) and when I try to login, it

errors out:

[S0001][unixODBC][Easysoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'test1'

I believe the error is from SQL Server and not from ODBC driver.

I am also only able to connect by using my own userid (the one that I am connected to my desktop): domain\userid, and then I am only able to connect to 'master' db:

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/usr/local/etc>isql SQLSERVER_POS -v
++
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
++
SQL> use pcspos
[S0001][unixODBC][Easysoft][ODBC SQL Server Driver][SQL Server]Could not locate entry in sysdatabases for database 'pcspos'. No entry found with that name. Make sure that the name is entered correctly.
[ISQL]ERROR: Could not SQLExecute
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Hello,

While I browse the SSMSE (SQL Server Management Studion Express) , I see that the database state (from the

Database Properties Windows) is NORMAL | SHUTDOWN !!!!!!

Is this OK ?

In the meantime when I login via SSMSE, I can see all the tables and data in the database !!!!!!!!!

Thanks,

Tom

|||

Hello, I was able to change the Database State to NORMAL (I changed the 'Auto Close' option to False).

BUT I am still not able to connect:

/usr/local/etc>isql SQLSERVER_POS -v
[S0001][unixODBC][Easysoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'test1'.
[ISQL]ERROR: Could not SQLConnect

|||If you are using Windows Authentication only, you cannot use SQL Server logins to connect to the server. (see how to switch the authentication mode on my website under the Screencasts). If you want to use WIndows authentication you will have to be aware that you cannot explicitly pass a user name within the connectionstring, the username is passed implicitly through Windows. If you have enabled Mixed authentication already, make sure that you are using the right password.


Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||

Hi Jens, thank you for your reply.

I am using the SQL Authentication mode, see below I am able to connect from the DOS prompt (localy),

but I can NOT connect from a Linux server by using the ODBC driver:

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

C:\>isql -S (local)\SQLEXPRESS -U pos_sql05 -P passwd
1> select db_name()
2> go

--

--

--
POS

(1 row affected)
1> select * from pcs_lookup_active_status;
2> go
ACTIVE_STATUS_KEY ACTIVE_STATUS_DESC
-- --
1 Active
2 Inactive
3 Deleted

(3 rows affected)

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

|||I don′t know how the tool for Linux works but if you do not pass a username using SQL Server authentication there has to be somewhere a setting file where these information is stored.
|||

I am using a config file by the name odbc.ini.

It looks like the following:

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

[SQLSERVER_POS]
Driver = /usr/local/easysoft/sqlserver/lib/libessqlsrv.so
Description = Easysoft SQL Server ODBC driver (unixODBC 2.2.12)
Server = 10.20.30.40\SQLEXPRESS
Port = 1433
Database = POS
User = pos_sql05
Password = passwd
Mars_Connection = No
Logging = 31
LogFile = /tmp/sqlserver.log
QuotedId = Yes
AnsiNPW = Yes
Language =
Version7 = No
ClientLB = No
Failover_Partner =
VarMaxAsLong = No

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

As you cann tell, the user id and password are there.

Thanks again.

Regards,

Tom

|||

Make sure that you are using the right password for the mentioned user. In addition make sure taht the user is priviledged for the POS database, cause authentication or the connection will also fail if the initial database is not one of the allowed ones. if you are not sure, try to connect to the master database. A user which is granted access to the server should have access to the master database.

Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||

Hi Jens, thanks again.

The userid and password are correct (I am able to connect via isql from the DOS prompt).

I think the problem relies on the fact that I am coming remotetly (from a Linux server), BUT I have

enabled the TCP/IP protocol connection properties. What else can I look for ?

Thank you.

Tom

|||

How are you authenticating? Is your server set to authenticate using Windows authentication only or integrated authentication? Perhaps this unix driver is trying to use SQL authentication and your SQL installation only accepts windows authenticated connections. That would explain this problem.

Hope this helps!

John (MSFT)

|||

Hi John & Jens, the issue has been resolved. I contacted the ODBC driver's vendor and they provided me with an updated copy of it.

Thank you for your help and suggestions.

Keep up the GREAT job.

Best regards,

Tom

Tuesday, March 6, 2012

[mssql][ant] Failed to execute: GO

Hi,

I am trying to execute a simple sql file thru ant task. The file is:

use [centivaTest]
GO

However I get the errror message:
[sql] Failed to execute: use [centivaTest] GO

So I changed the file to:

use [centivaTest] ;
GO

as ant treats ';' as a delimiter. However another erro message
appears:

[mssql][ant] Failed to execute: GO

Do you know how to execute my simple sql statements thru ant (or
generally what wrong am I doing)?

Best regards,
Maciek Zywno"maciek zywno" wrote:

> I am trying to execute a simple sql file thru ant task. The file is:

<snip
> However I get the errror message:
> [sql] Failed to execute: use [centivaTest] GO

Maciek,

GO isn't understood by SQL Server: it's used as a batch delimiter for isql,
osql, and QA. I'm not an ant expert, but a few choices I see are:

- Have ant execute your SQL file via osql.

- Removed unnecessary GO's and/or manually break your script into separate
scripts (since that's what GO does anyway).

Craig

[Microsoft][SQLServer 2000 Driver for JDBC]Row update failed

I am getting an error "[Microsoft][SQLServer 2000 Driver for JDBC]Row update
failed" while updating an int value on result set. Below is the code snippet
that i use in java. The error is occurring occasionally. Not able to
replicate.
strSQL = "SELECT intCol FROM Table1 WHERE intCol = 1";
PreparedStatement objPS = null;
...get the connection object, prepare object...using msjdbc driver with SQL
server 2000
ResultSet objRS = objPS.executeQuery();
objRS.updateInt("intCol", 2);
objRS.updateRow();
any help is appreciated.
Thanks in advance.
| Thread-Topic: [Microsoft][SQLServer 2000 Driver for JDBC]Row update failed
| thread-index: AcUbT0uzY+NiEZNfSCeDqAYi6cibWQ==
| X-WBNR-Posting-Host: 152.160.15.58
| From: "=?Utf-8?B?U2FyYW4=?=" <Saran@.discussions.microsoft.com>
| Subject: [Microsoft][SQLServer 2000 Driver for JDBC]Row update failed
| Date: Fri, 25 Feb 2005 07:33:03 -0800
| Lines: 15
| Message-ID: <05BEC007-4670-4D11-9C3F-E46F19A60BDC@.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: TK2MSFTNGXA02.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFT NGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.jdbcdriver:6702
| X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
|
| I am getting an error "[Microsoft][SQLServer 2000 Driver for JDBC]Row
update
| failed" while updating an int value on result set. Below is the code
snippet
| that i use in java. The error is occurring occasionally. Not able to
| replicate.
|
| strSQL = "SELECT intCol FROM Table1 WHERE intCol = 1";
| PreparedStatement objPS = null;
| ...get the connection object, prepare object...using msjdbc driver with
SQL
| server 2000
| ResultSet objRS = objPS.executeQuery();
| objRS.updateInt("intCol", 2);
| objRS.updateRow();
|
| any help is appreciated.
| Thanks in advance.
|
What is the frequency of this problem? Did the problem occur while other
activity the same database was occurring? Do you have a primary key
defined on the table? Which options did you use when preparing the
statement? Are you using the most recent build of the JDBC driver?
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, thanks for your reply, here is my answers for your questions. Hope
that will help us to resolve the issue.
1. What is the frequency of this problem? - not able to determine,
occurring occasinoaly.
2. Did the problem occur while other activity the same database was
occurring? - I couldn't make sure it 100% though, i am possitive that there
could be some other activity on the database.
3. Do you have a primary key defined on the table? - Yes e.g. table script
tbl1(col1 varchar(100) NOT NULL, col2 int NULL)
here: col1 is primary key - but i am trying to update col2
4. Which options did you use when preparing the statement? - here is e.g.
objCon.prepareStatement(strSQL, ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY)
5. Are you using the most recent build of the JDBC driver? MS-JDBC SP2
thanks
-Saran
""Carb Simien [MSFT]"" wrote:

> --
> | Thread-Topic: [Microsoft][SQLServer 2000 Driver for JDBC]Row update failed
> | thread-index: AcUbT0uzY+NiEZNfSCeDqAYi6cibWQ==
> | X-WBNR-Posting-Host: 152.160.15.58
> | From: "=?Utf-8?B?U2FyYW4=?=" <Saran@.discussions.microsoft.com>
> | Subject: [Microsoft][SQLServer 2000 Driver for JDBC]Row update failed
> | Date: Fri, 25 Feb 2005 07:33:03 -0800
> | Lines: 15
> | Message-ID: <05BEC007-4670-4D11-9C3F-E46F19A60BDC@.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: TK2MSFTNGXA02.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFT NGXA03.phx.gbl
> | Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.jdbcdriver:6702
> | X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
> |
> | I am getting an error "[Microsoft][SQLServer 2000 Driver for JDBC]Row
> update
> | failed" while updating an int value on result set. Below is the code
> snippet
> | that i use in java. The error is occurring occasionally. Not able to
> | replicate.
> |
> | strSQL = "SELECT intCol FROM Table1 WHERE intCol = 1";
> | PreparedStatement objPS = null;
> | ...get the connection object, prepare object...using msjdbc driver with
> SQL
> | server 2000
> | ResultSet objRS = objPS.executeQuery();
> | objRS.updateInt("intCol", 2);
> | objRS.updateRow();
> |
> | any help is appreciated.
> | Thanks in advance.
> |
> What is the frequency of this problem? Did the problem occur while other
> activity the same database was occurring? Do you have a primary key
> defined on the table? Which options did you use when preparing the
> statement? Are you using the most recent build of the JDBC driver?
> 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.
>
|||saran wrote:
> 4. Which options did you use when preparing the statement? - here is
e.g.
> objCon.prepareStatement(strSQL, ResultSet.TYPE_SCROLL_INSENSITIVE,
> ResultSet.CONCUR_READ_ONLY)
And if the ResultSet was created as read only how do you expect
updateRow() to work? Speaking of which, if the error message would have
been "General error" or simply "Error", it would have been just as easy
to track down the cause.
Alin,
The jTDS Project.
|||| Thread-Topic: [Microsoft][SQLServer 2000 Driver for JDBC]Row update failed
| thread-index: AcUpfTtxzBvD5vNlRPaQXIKezzsWHg==
| X-WBNR-Posting-Host: 152.160.15.58
| From: "=?Utf-8?B?c2FyYW4=?=" <saran@.discussions.microsoft.com>
| References: <05BEC007-4670-4D11-9C3F-E46F19A60BDC@.microsoft.com>
<zQR4wCMKFHA.1136@.TK2MSFTNGXA02.phx.gbl>
| Subject: RE: [Microsoft][SQLServer 2000 Driver for JDBC]Row update failed
| Date: Tue, 15 Mar 2005 08:37:09 -0800
| Lines: 86
| Message-ID: <4F9F2476-D4EE-4EA1-8288-B9C2EB8D5A30@.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: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.jdbcdriver:6756
| X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
|
| Hi Carb, thanks for your reply, here is my answers for your questions.
Hope
| that will help us to resolve the issue.
|
| 1. What is the frequency of this problem? - not able to determine,
| occurring occasinoaly.
|
| 2. Did the problem occur while other activity the same database was
| occurring? - I couldn't make sure it 100% though, i am possitive that
there
| could be some other activity on the database.
|
| 3. Do you have a primary key defined on the table? - Yes e.g. table script
| tbl1(col1 varchar(100) NOT NULL, col2 int NULL)
| here: col1 is primary key - but i am trying to update col2
|
| 4. Which options did you use when preparing the statement? - here is e.g.
| objCon.prepareStatement(strSQL, ResultSet.TYPE_SCROLL_INSENSITIVE,
| ResultSet.CONCUR_READ_ONLY)
|
| 5. Are you using the most recent build of the JDBC driver? MS-JDBC SP2
|
| thanks
| -Saran
|
| ""Carb Simien [MSFT]"" wrote:
|
| >
| > --
| > | Thread-Topic: [Microsoft][SQLServer 2000 Driver for JDBC]Row update
failed
| > | thread-index: AcUbT0uzY+NiEZNfSCeDqAYi6cibWQ==
| > | X-WBNR-Posting-Host: 152.160.15.58
| > | From: "=?Utf-8?B?U2FyYW4=?=" <Saran@.discussions.microsoft.com>
| > | Subject: [Microsoft][SQLServer 2000 Driver for JDBC]Row update failed
| > | Date: Fri, 25 Feb 2005 07:33:03 -0800
| > | Lines: 15
| > | Message-ID: <05BEC007-4670-4D11-9C3F-E46F19A60BDC@.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: TK2MSFTNGXA02.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFT NGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.jdbcdriver:6702
| > | X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
| > |
| > | I am getting an error "[Microsoft][SQLServer 2000 Driver for JDBC]Row
| > update
| > | failed" while updating an int value on result set. Below is the code
| > snippet
| > | that i use in java. The error is occurring occasionally. Not able to
| > | replicate.
| > |
| > | strSQL = "SELECT intCol FROM Table1 WHERE intCol = 1";
| > | PreparedStatement objPS = null;
| > | ...get the connection object, prepare object...using msjdbc driver
with
| > SQL
| > | server 2000
| > | ResultSet objRS = objPS.executeQuery();
| > | objRS.updateInt("intCol", 2);
| > | objRS.updateRow();
| > |
| > | any help is appreciated.
| > | Thanks in advance.
| > |
| >
| > What is the frequency of this problem? Did the problem occur while
other
| > activity the same database was occurring? Do you have a primary key
| > defined on the table? Which options did you use when preparing the
| > statement? Are you using the most recent build of the JDBC driver?
| >
| > 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.
| >
| >
|
Yes, you will need to use Resultset.CONCUR_UPDATABLE to allow the updates..
Also, the most recent build of the Microsoft JDBC driver is JDBC SP3
(build 2.2.0040):
SQL Server 2000 Driver for JDBC Service Pack 3
http://www.microsoft.com/downloads/d...B11-0502-461A-
B138-2AA54BFDC03A&displaylang=en
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.

[Microsoft][ODBC SQL Server Driver]Timeout expired"

Could anyone help?
"Connection failed:
SQLState: '01S00'
SQL Server Error: 0
[Microsoft][ODBC SQL Server Driver]Invalid connection string attribute
Connection failed:
SQLState: 'S1T00'
SQL server Error: 0
[Microsoft][ODBC SQL Server Driver]Timeout expired"
Thanks in advancePlease post your connection string.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Alexis Robles" <AlexisRobles@.discussions.microsoft.com> wrote in message
news:9F8B08B1-26CF-4601-8457-C7E810149812@.microsoft.com...
> Could anyone help?
> "Connection failed:
> SQLState: '01S00'
> SQL Server Error: 0
> [Microsoft][ODBC SQL Server Driver]Invalid connection string attribute
> Connection failed:
> SQLState: 'S1T00'
> SQL server Error: 0
> [Microsoft][ODBC SQL Server Driver]Timeout expired"
> Thanks in advance|||Here is the connection string:
OPEN=ODBC;DATABASE=AFM_CALLISTO;DSN=AFM_CALLISTO;
"Dan Guzman" wrote:
> Please post your connection string.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Alexis Robles" <AlexisRobles@.discussions.microsoft.com> wrote in message
> news:9F8B08B1-26CF-4601-8457-C7E810149812@.microsoft.com...
> > Could anyone help?
> >
> > "Connection failed:
> > SQLState: '01S00'
> > SQL Server Error: 0
> > [Microsoft][ODBC SQL Server Driver]Invalid connection string attribute
> > Connection failed:
> > SQLState: 'S1T00'
> > SQL server Error: 0
> > [Microsoft][ODBC SQL Server Driver]Timeout expired"
> >
> > Thanks in advance
>
>|||The 'invalid connection string attribute' informational error is due to the
extraneous 'OPEN=ODBC' specification. Try removing it:
DATABASE=AFM_CALLISTO;DSN=AFM_CALLISTO
I don't know what API you are using but the default command timeout is 30
seconds. In the case of ADO, you can specify a longer interval with the
CommandTimeout command object property. Specify 0 for unlimitted. You
might also consider query/index tuning to speed up the query and also check
for blocking.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Alexis Robles" <AlexisRobles@.discussions.microsoft.com> wrote in message
news:4A6C5752-A705-40CC-81B7-8FAAF54F2AE8@.microsoft.com...
> Here is the connection string:
> OPEN=ODBC;DATABASE=AFM_CALLISTO;DSN=AFM_CALLISTO;
> "Dan Guzman" wrote:
>> Please post your connection string.
>> --
>> Hope this helps.
>> Dan Guzman
>> SQL Server MVP
>> "Alexis Robles" <AlexisRobles@.discussions.microsoft.com> wrote in message
>> news:9F8B08B1-26CF-4601-8457-C7E810149812@.microsoft.com...
>> > Could anyone help?
>> >
>> > "Connection failed:
>> > SQLState: '01S00'
>> > SQL Server Error: 0
>> > [Microsoft][ODBC SQL Server Driver]Invalid connection string attribute
>> > Connection failed:
>> > SQLState: 'S1T00'
>> > SQL server Error: 0
>> > [Microsoft][ODBC SQL Server Driver]Timeout expired"
>> >
>> > Thanks in advance
>>|||It hs been always working with that string. Anyway, I'm going to try to see
if it works.
Thanks
"Dan Guzman" wrote:
> The 'invalid connection string attribute' informational error is due to the
> extraneous 'OPEN=ODBC' specification. Try removing it:
> DATABASE=AFM_CALLISTO;DSN=AFM_CALLISTO
> I don't know what API you are using but the default command timeout is 30
> seconds. In the case of ADO, you can specify a longer interval with the
> CommandTimeout command object property. Specify 0 for unlimitted. You
> might also consider query/index tuning to speed up the query and also check
> for blocking.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Alexis Robles" <AlexisRobles@.discussions.microsoft.com> wrote in message
> news:4A6C5752-A705-40CC-81B7-8FAAF54F2AE8@.microsoft.com...
> > Here is the connection string:
> >
> > OPEN=ODBC;DATABASE=AFM_CALLISTO;DSN=AFM_CALLISTO;
> >
> > "Dan Guzman" wrote:
> >
> >> Please post your connection string.
> >>
> >> --
> >> Hope this helps.
> >>
> >> Dan Guzman
> >> SQL Server MVP
> >>
> >> "Alexis Robles" <AlexisRobles@.discussions.microsoft.com> wrote in message
> >> news:9F8B08B1-26CF-4601-8457-C7E810149812@.microsoft.com...
> >> > Could anyone help?
> >> >
> >> > "Connection failed:
> >> > SQLState: '01S00'
> >> > SQL Server Error: 0
> >> > [Microsoft][ODBC SQL Server Driver]Invalid connection string attribute
> >> > Connection failed:
> >> > SQLState: 'S1T00'
> >> > SQL server Error: 0
> >> > [Microsoft][ODBC SQL Server Driver]Timeout expired"
> >> >
> >> > Thanks in advance
> >>
> >>
> >>
>
>|||It didn't connect when I remove 'OPEN=ODBC'
"Dan Guzman" wrote:
> The 'invalid connection string attribute' informational error is due to the
> extraneous 'OPEN=ODBC' specification. Try removing it:
> DATABASE=AFM_CALLISTO;DSN=AFM_CALLISTO
> I don't know what API you are using but the default command timeout is 30
> seconds. In the case of ADO, you can specify a longer interval with the
> CommandTimeout command object property. Specify 0 for unlimitted. You
> might also consider query/index tuning to speed up the query and also check
> for blocking.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Alexis Robles" <AlexisRobles@.discussions.microsoft.com> wrote in message
> news:4A6C5752-A705-40CC-81B7-8FAAF54F2AE8@.microsoft.com...
> > Here is the connection string:
> >
> > OPEN=ODBC;DATABASE=AFM_CALLISTO;DSN=AFM_CALLISTO;
> >
> > "Dan Guzman" wrote:
> >
> >> Please post your connection string.
> >>
> >> --
> >> Hope this helps.
> >>
> >> Dan Guzman
> >> SQL Server MVP
> >>
> >> "Alexis Robles" <AlexisRobles@.discussions.microsoft.com> wrote in message
> >> news:9F8B08B1-26CF-4601-8457-C7E810149812@.microsoft.com...
> >> > Could anyone help?
> >> >
> >> > "Connection failed:
> >> > SQLState: '01S00'
> >> > SQL Server Error: 0
> >> > [Microsoft][ODBC SQL Server Driver]Invalid connection string attribute
> >> > Connection failed:
> >> > SQLState: 'S1T00'
> >> > SQL server Error: 0
> >> > [Microsoft][ODBC SQL Server Driver]Timeout expired"
> >> >
> >> > Thanks in advance
> >>
> >>
> >>
>
>|||In my ADO test, ODBC ignored the ODBC attribute in the connection string,
returned an informational message and successfully connected. Without the
attribute, the connection was successful without the message. What API are
you using? Perhaps the ODBC attribute is required by a high-level API that
you are using. I'd expect the API to remove the attribute before passing it
to ODBC, though.
In any case, I suggest you follow the suggestions in my earlier response to
resolve the timeout problem.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Alexis Robles" <AlexisRobles@.discussions.microsoft.com> wrote in message
news:87584EDE-BCFE-401D-81DF-38A260BFD0D5@.microsoft.com...
> It didn't connect when I remove 'OPEN=ODBC'
>|||Can I remove the MDAC?
"AnthonyThomas" wrote:
> Try changing the order of the parameters. Normally, the DSN will have a designated DATABASE parameter, although this can be overridden. But how could it be if it hasn't loaded from the DSN yet.
> Try 'OPEN=ODBC;DSN=AFM_CALLISTO;DATABASE=AFM_CALLISTO'
> Another possibility is that a recent MDAC release or patch has been applied to the client. This has a nasty habit of messing with ODBC. You might want to use the ODBC Administrator and recheck the DSN attributes. When you're done, use the TEST CONNECTION capability to validate the attributes.
> Sincerely,
>
> Anthony Thomas
>
> --
> "Alexis Robles" <AlexisRobles@.discussions.microsoft.com> wrote in message news:87584EDE-BCFE-401D-81DF-38A260BFD0D5@.microsoft.com...
> It didn't connect when I remove 'OPEN=ODBC'
>
> "Dan Guzman" wrote:
> > The 'invalid connection string attribute' informational error is due to the
> > extraneous 'OPEN=ODBC' specification. Try removing it:
> >
> > DATABASE=AFM_CALLISTO;DSN=AFM_CALLISTO
> >
> > I don't know what API you are using but the default command timeout is 30
> > seconds. In the case of ADO, you can specify a longer interval with the
> > CommandTimeout command object property. Specify 0 for unlimitted. You
> > might also consider query/index tuning to speed up the query and also check
> > for blocking.
> >
> > --
> > Hope this helps.
> >
> > Dan Guzman
> > SQL Server MVP
> >
> > "Alexis Robles" <AlexisRobles@.discussions.microsoft.com> wrote in message
> > news:4A6C5752-A705-40CC-81B7-8FAAF54F2AE8@.microsoft.com...
> > > Here is the connection string:
> > >
> > > OPEN=ODBC;DATABASE=AFM_CALLISTO;DSN=AFM_CALLISTO;
> > >
> > > "Dan Guzman" wrote:
> > >
> > >> Please post your connection string.
> > >>
> > >> --
> > >> Hope this helps.
> > >>
> > >> Dan Guzman
> > >> SQL Server MVP
> > >>
> > >> "Alexis Robles" <AlexisRobles@.discussions.microsoft.com> wrote in message
> > >> news:9F8B08B1-26CF-4601-8457-C7E810149812@.microsoft.com...
> > >> > Could anyone help?
> > >> >
> > >> > "Connection failed:
> > >> > SQLState: '01S00'
> > >> > SQL Server Error: 0
> > >> > [Microsoft][ODBC SQL Server Driver]Invalid connection string attribute
> > >> > Connection failed:
> > >> > SQLState: 'S1T00'
> > >> > SQL server Error: 0
> > >> > [Microsoft][ODBC SQL Server Driver]Timeout expired"
> > >> >
> > >> > Thanks in advance
> > >>
> > >>
> > >>
> >
> >
> >

[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for us

We changed from sql 7 to 2000, crissis mode.
One use with a laptop keeps getting the error when connecting to the sql
server.
SQL 2000 latest, mixed mode.
Laptop xp pro latest, mdac is latest.
I looked up sql server 26000 and 18452. I was not able to resolve the
problem. Still an untrusted connection.
I do know it is in the user profile but what?
Hi Brian,
Just to be sure, you have some machines working and one particular machine
(the laptop) is not working, right? Are you using Named Pipes or TCP-IP? Is
the laptop using a trusted connection or SQL Server security mode? What was
the exact text of the error message? What things have you tried that did not
resolve the problem?
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@.msn.com www.cindywinegarden.com
"BrianMultiLanguage" <BrianMultiLanguage@.discussions.microsoft.com> wrote in
message news:3D81F886-58B5-4C09-AA8A-1529B54CE72B@.microsoft.com...
> We changed from sql 7 to 2000, crissis mode.
> One use with a laptop keeps getting the error when connecting to the sql
> server.
> SQL 2000 latest, mixed mode.
> Laptop xp pro latest, mdac is latest.
> I looked up sql server 26000 and 18452. I was not able to resolve the
> problem. Still an untrusted connection.
> I do know it is in the user profile but what?

Sunday, February 19, 2012

[DBNETLIB][ConnectionRead (WrapperRead()).]General network error.

I am intermittantly getting this error in a background VB app. It runs
from task scheduler before I get to work. The last 5 days it has failed
every day. The task opens a connection to an MSDE instance, deletes all
rows from two tables and then reloads them from another database. Then
when attempting to delete all rows from a third table it dies. If I
rerun it once I get to work it has no problems. If I schedule the task
to run again right after the problem run, it works fine.
Ideas?
TomLooks like I'll have to reply to my own post.
In my case it appears that the problem was a command which was taking
longer than 30 seconds to complete.
cnEI.Execute "Delete from Empinfo", , adCmdText
I changed the connection command timeout
cnEI.CommandTimeout = 90
and now all is well.
Tom
Tom Wells wrote:
> I am intermittantly getting this error in a background VB app. It runs
> from task scheduler before I get to work. The last 5 days it has failed
> every day. The task opens a connection to an MSDE instance, deletes all
> rows from two tables and then reloads them from another database. Then
> when attempting to delete all rows from a third table it dies. If I
> rerun it once I get to work it has no problems. If I schedule the task
> to run again right after the problem run, it works fine.
> Ideas?
> Tom
>

Thursday, February 16, 2012

[AdventureWorks] database backup failed with error: 3013

SQL Server 2005
A couple nights ago I got several failures on my 3 AM database backups, my
program generated the message:
[AdventureWorks] database backup failed with error: 3013
on several databases, including: AdventureWorks, AdventureWorksDW, master,
model & msdb.
The error number was captured using @.@.ERROR.
When I saw the error, I did the following:
- Check drive space. Fine.
- Check Windows Event Log - no pertinant messages (particulary drive
space)
- Check SQL Server logs
BACKUP failed to complete the command BACKUP LOG msdb. Check the
backup application log for details
Error 3041, Severity 16, State 1
(repeats for several databases)
- Ran DBCC CHECKALLOC, DBCC CHECKCATALOG, DBCC CHECKDB and all were
fine.
- Re-ran a full backup without any issues.
I know I will see error 3013 if I run out of space on a drive, but that
wasn't the case here.
The only thing "wrong" with this install is that the data and backups are
all on the E: drive and while the drive itself is fragmened, but with only
some minor exceptions, none of the .*df files are in the list.
Oh, and not that I think it matters, but AutoShrink is off on all DB's.
I would appreciate any assistance anyone can give helping me to understand
what may have gone wrong.
Thanks,
Jay
PS. I decided to do some resizing of datafiles and run a defrag.
Apparently something changed in the nightly backups so that it is
trying to backup the logs on those databases.
The databases you list all default to SIMPLE recovery mode. The
example you showed for msdb was a failure to backup the log. You can
not backup the log on a database in SIMPLE recovery mode.
Roy Harvey
Beacon Falls, CT
On Wed, 14 Nov 2007 09:40:37 -0800, "Jay" <nospam@.nospam.org> wrote:

>SQL Server 2005
>A couple nights ago I got several failures on my 3 AM database backups, my
>program generated the message:
>[AdventureWorks] database backup failed with error: 3013
>on several databases, including: AdventureWorks, AdventureWorksDW, master,
>model & msdb.
>The error number was captured using @.@.ERROR.
>When I saw the error, I did the following:
> - Check drive space. Fine.
> - Check Windows Event Log - no pertinant messages (particulary drive
>space)
> - Check SQL Server logs
> BACKUP failed to complete the command BACKUP LOG msdb. Check the
>backup application log for details
> Error 3041, Severity 16, State 1
> (repeats for several databases)
> - Ran DBCC CHECKALLOC, DBCC CHECKCATALOG, DBCC CHECKDB and all were
>fine.
> - Re-ran a full backup without any issues.
>I know I will see error 3013 if I run out of space on a drive, but that
>wasn't the case here.
>The only thing "wrong" with this install is that the data and backups are
>all on the E: drive and while the drive itself is fragmened, but with only
>some minor exceptions, none of the .*df files are in the list.
>Oh, and not that I think it matters, but AutoShrink is off on all DB's.
>I would appreciate any assistance anyone can give helping me to understand
>what may have gone wrong.
>Thanks,
>Jay
>PS. I decided to do some resizing of datafiles and run a defrag.
>
|||You are correct sir.
I have been dealing with the difference between 2000 & 2005 on the issue of
backing up the transaction log for simple mode databases and had just
included extra error traps. I also have a version that won't try the simple
mode log backup on version 9.
I supose I just managed to confuse myself.
Thanks,
Jay
"Roy Harvey (SQL Server MVP)" <roy_harvey@.snet.net> wrote in message
news:h4fmj392cv2vmstka6dkk07qfiovlvgsnu@.4ax.com... [vbcol=seagreen]
> Apparently something changed in the nightly backups so that it is
> trying to backup the logs on those databases.
> The databases you list all default to SIMPLE recovery mode. The
> example you showed for msdb was a failure to backup the log. You can
> not backup the log on a database in SIMPLE recovery mode.
> Roy Harvey
> Beacon Falls, CT
> On Wed, 14 Nov 2007 09:40:37 -0800, "Jay" <nospam@.nospam.org> wrote:
|||To add to Roy's comments, I would recommend not backing up the
AdventureWorks sample databases at all. You can always reinstall or download
these later if you need to.
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
Download the latest version of Books Online from
http://technet.microsoft.com/en-us/sqlserver/bb428874.aspx
"Jay" <nospam@.nospam.org> wrote in message
news:%238yk4VuJIHA.6108@.TK2MSFTNGP03.phx.gbl...
> SQL Server 2005
> A couple nights ago I got several failures on my 3 AM database backups, my
> program generated the message:
> [AdventureWorks] database backup failed with error: 3013
> on several databases, including: AdventureWorks, AdventureWorksDW, master,
> model & msdb.
> The error number was captured using @.@.ERROR.
> When I saw the error, I did the following:
> - Check drive space. Fine.
> - Check Windows Event Log - no pertinant messages (particulary drive
> space)
> - Check SQL Server logs
> BACKUP failed to complete the command BACKUP LOG msdb. Check
> the backup application log for details
> Error 3041, Severity 16, State 1
> (repeats for several databases)
> - Ran DBCC CHECKALLOC, DBCC CHECKCATALOG, DBCC CHECKDB and all were
> fine.
> - Re-ran a full backup without any issues.
> I know I will see error 3013 if I run out of space on a drive, but that
> wasn't the case here.
> The only thing "wrong" with this install is that the data and backups are
> all on the E: drive and while the drive itself is fragmened, but with only
> some minor exceptions, none of the .*df files are in the list.
> Oh, and not that I think it matters, but AutoShrink is off on all DB's.
> I would appreciate any assistance anyone can give helping me to understand
> what may have gone wrong.
> Thanks,
> Jay
> PS. I decided to do some resizing of datafiles and run a defrag.
>
|||Thanks, but no thanks. All databases get backed up.
Besides, I activly monitor these systems, so I'll know if space is an issue
before it becomes an issue.
"Gail Erickson [MS]" <gaile@.online.microsoft.com> wrote in message
news:%23m8HfIvJIHA.3820@.TK2MSFTNGP03.phx.gbl...
> To add to Roy's comments, I would recommend not backing up the
> AdventureWorks sample databases at all. You can always reinstall or
> download these later if you need to.
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
> Download the latest version of Books Online from
> http://technet.microsoft.com/en-us/sqlserver/bb428874.aspx
> "Jay" <nospam@.nospam.org> wrote in message
> news:%238yk4VuJIHA.6108@.TK2MSFTNGP03.phx.gbl...
>

[AdventureWorks] database backup failed with error: 3013

SQL Server 2005
A couple nights ago I got several failures on my 3 AM database backups, my
program generated the message:
[AdventureWorks] database backup failed with error: 3013
on several databases, including: AdventureWorks, AdventureWorksDW, master,
model & msdb.
The error number was captured using @.@.ERROR.
When I saw the error, I did the following:
- Check drive space. Fine.
- Check Windows Event Log - no pertinant messages (particulary drive
space)
- Check SQL Server logs
BACKUP failed to complete the command BACKUP LOG msdb. Check the
backup application log for details
Error 3041, Severity 16, State 1
(repeats for several databases)
- Ran DBCC CHECKALLOC, DBCC CHECKCATALOG, DBCC CHECKDB and all were
fine.
- Re-ran a full backup without any issues.
I know I will see error 3013 if I run out of space on a drive, but that
wasn't the case here.
The only thing "wrong" with this install is that the data and backups are
all on the E: drive and while the drive itself is fragmened, but with only
some minor exceptions, none of the .*df files are in the list.
Oh, and not that I think it matters, but AutoShrink is off on all DB's.
I would appreciate any assistance anyone can give helping me to understand
what may have gone wrong.
Thanks,
Jay
PS. I decided to do some resizing of datafiles and run a defrag.Apparently something changed in the nightly backups so that it is
trying to backup the logs on those databases.
The databases you list all default to SIMPLE recovery mode. The
example you showed for msdb was a failure to backup the log. You can
not backup the log on a database in SIMPLE recovery mode.
Roy Harvey
Beacon Falls, CT
On Wed, 14 Nov 2007 09:40:37 -0800, "Jay" <nospam@.nospam.org> wrote:
>SQL Server 2005
>A couple nights ago I got several failures on my 3 AM database backups, my
>program generated the message:
>[AdventureWorks] database backup failed with error: 3013
>on several databases, including: AdventureWorks, AdventureWorksDW, master,
>model & msdb.
>The error number was captured using @.@.ERROR.
>When I saw the error, I did the following:
> - Check drive space. Fine.
> - Check Windows Event Log - no pertinant messages (particulary drive
>space)
> - Check SQL Server logs
> BACKUP failed to complete the command BACKUP LOG msdb. Check the
>backup application log for details
> Error 3041, Severity 16, State 1
> (repeats for several databases)
> - Ran DBCC CHECKALLOC, DBCC CHECKCATALOG, DBCC CHECKDB and all were
>fine.
> - Re-ran a full backup without any issues.
>I know I will see error 3013 if I run out of space on a drive, but that
>wasn't the case here.
>The only thing "wrong" with this install is that the data and backups are
>all on the E: drive and while the drive itself is fragmened, but with only
>some minor exceptions, none of the .*df files are in the list.
>Oh, and not that I think it matters, but AutoShrink is off on all DB's.
>I would appreciate any assistance anyone can give helping me to understand
>what may have gone wrong.
>Thanks,
>Jay
>PS. I decided to do some resizing of datafiles and run a defrag.
>|||You are correct sir.
I have been dealing with the difference between 2000 & 2005 on the issue of
backing up the transaction log for simple mode databases and had just
included extra error traps. I also have a version that won't try the simple
mode log backup on version 9.
I supose I just managed to confuse myself.
Thanks,
Jay
"Roy Harvey (SQL Server MVP)" <roy_harvey@.snet.net> wrote in message
news:h4fmj392cv2vmstka6dkk07qfiovlvgsnu@.4ax.com...
> Apparently something changed in the nightly backups so that it is
> trying to backup the logs on those databases.
> The databases you list all default to SIMPLE recovery mode. The
> example you showed for msdb was a failure to backup the log. You can
> not backup the log on a database in SIMPLE recovery mode.
> Roy Harvey
> Beacon Falls, CT
> On Wed, 14 Nov 2007 09:40:37 -0800, "Jay" <nospam@.nospam.org> wrote:
>>SQL Server 2005
>>A couple nights ago I got several failures on my 3 AM database backups, my
>>program generated the message:
>>[AdventureWorks] database backup failed with error: 3013
>>on several databases, including: AdventureWorks, AdventureWorksDW, master,
>>model & msdb.
>>The error number was captured using @.@.ERROR.
>>When I saw the error, I did the following:
>> - Check drive space. Fine.
>> - Check Windows Event Log - no pertinant messages (particulary drive
>>space)
>> - Check SQL Server logs
>> BACKUP failed to complete the command BACKUP LOG msdb. Check
>> the
>>backup application log for details
>> Error 3041, Severity 16, State 1
>> (repeats for several databases)
>> - Ran DBCC CHECKALLOC, DBCC CHECKCATALOG, DBCC CHECKDB and all were
>>fine.
>> - Re-ran a full backup without any issues.
>>I know I will see error 3013 if I run out of space on a drive, but that
>>wasn't the case here.
>>The only thing "wrong" with this install is that the data and backups are
>>all on the E: drive and while the drive itself is fragmened, but with only
>>some minor exceptions, none of the .*df files are in the list.
>>Oh, and not that I think it matters, but AutoShrink is off on all DB's.
>>I would appreciate any assistance anyone can give helping me to understand
>>what may have gone wrong.
>>Thanks,
>>Jay
>>PS. I decided to do some resizing of datafiles and run a defrag.|||To add to Roy's comments, I would recommend not backing up the
AdventureWorks sample databases at all. You can always reinstall or download
these later if you need to.
--
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
Download the latest version of Books Online from
http://technet.microsoft.com/en-us/sqlserver/bb428874.aspx
"Jay" <nospam@.nospam.org> wrote in message
news:%238yk4VuJIHA.6108@.TK2MSFTNGP03.phx.gbl...
> SQL Server 2005
> A couple nights ago I got several failures on my 3 AM database backups, my
> program generated the message:
> [AdventureWorks] database backup failed with error: 3013
> on several databases, including: AdventureWorks, AdventureWorksDW, master,
> model & msdb.
> The error number was captured using @.@.ERROR.
> When I saw the error, I did the following:
> - Check drive space. Fine.
> - Check Windows Event Log - no pertinant messages (particulary drive
> space)
> - Check SQL Server logs
> BACKUP failed to complete the command BACKUP LOG msdb. Check
> the backup application log for details
> Error 3041, Severity 16, State 1
> (repeats for several databases)
> - Ran DBCC CHECKALLOC, DBCC CHECKCATALOG, DBCC CHECKDB and all were
> fine.
> - Re-ran a full backup without any issues.
> I know I will see error 3013 if I run out of space on a drive, but that
> wasn't the case here.
> The only thing "wrong" with this install is that the data and backups are
> all on the E: drive and while the drive itself is fragmened, but with only
> some minor exceptions, none of the .*df files are in the list.
> Oh, and not that I think it matters, but AutoShrink is off on all DB's.
> I would appreciate any assistance anyone can give helping me to understand
> what may have gone wrong.
> Thanks,
> Jay
> PS. I decided to do some resizing of datafiles and run a defrag.
>|||Thanks, but no thanks. All databases get backed up.
Besides, I activly monitor these systems, so I'll know if space is an issue
before it becomes an issue.
"Gail Erickson [MS]" <gaile@.online.microsoft.com> wrote in message
news:%23m8HfIvJIHA.3820@.TK2MSFTNGP03.phx.gbl...
> To add to Roy's comments, I would recommend not backing up the
> AdventureWorks sample databases at all. You can always reinstall or
> download these later if you need to.
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
> Download the latest version of Books Online from
> http://technet.microsoft.com/en-us/sqlserver/bb428874.aspx
> "Jay" <nospam@.nospam.org> wrote in message
> news:%238yk4VuJIHA.6108@.TK2MSFTNGP03.phx.gbl...
>> SQL Server 2005
>> A couple nights ago I got several failures on my 3 AM database backups,
>> my program generated the message:
>> [AdventureWorks] database backup failed with error: 3013
>> on several databases, including: AdventureWorks, AdventureWorksDW,
>> master, model & msdb.
>> The error number was captured using @.@.ERROR.
>> When I saw the error, I did the following:
>> - Check drive space. Fine.
>> - Check Windows Event Log - no pertinant messages (particulary drive
>> space)
>> - Check SQL Server logs
>> BACKUP failed to complete the command BACKUP LOG msdb. Check
>> the backup application log for details
>> Error 3041, Severity 16, State 1
>> (repeats for several databases)
>> - Ran DBCC CHECKALLOC, DBCC CHECKCATALOG, DBCC CHECKDB and all were
>> fine.
>> - Re-ran a full backup without any issues.
>> I know I will see error 3013 if I run out of space on a drive, but that
>> wasn't the case here.
>> The only thing "wrong" with this install is that the data and backups are
>> all on the E: drive and while the drive itself is fragmened, but with
>> only some minor exceptions, none of the .*df files are in the list.
>> Oh, and not that I think it matters, but AutoShrink is off on all DB's.
>> I would appreciate any assistance anyone can give helping me to
>> understand what may have gone wrong.
>> Thanks,
>> Jay
>> PS. I decided to do some resizing of datafiles and run a defrag.
>

[AdventureWorks] database backup failed with error: 3013

SQL Server 2005
A couple nights ago I got several failures on my 3 AM database backups, my
program generated the message:
[AdventureWorks] database backup failed with error: 3013
on several databases, including: AdventureWorks, AdventureWorksDW, master,
model & msdb.
The error number was captured using @.@.ERROR.
When I saw the error, I did the following:
- Check drive space. Fine.
- Check Windows Event Log - no pertinant messages (particulary drive
space)
- Check SQL Server logs
BACKUP failed to complete the command BACKUP LOG msdb. Check the
backup application log for details
Error 3041, Severity 16, State 1
(repeats for several databases)
- Ran DBCC CHECKALLOC, DBCC CHECKCATALOG, DBCC CHECKDB and all were
fine.
- Re-ran a full backup without any issues.
I know I will see error 3013 if I run out of space on a drive, but that
wasn't the case here.
The only thing "wrong" with this install is that the data and backups are
all on the E: drive and while the drive itself is fragmened, but with only
some minor exceptions, none of the .*df files are in the list.
Oh, and not that I think it matters, but AutoShrink is off on all DB's.
I would appreciate any assistance anyone can give helping me to understand
what may have gone wrong.
Thanks,
Jay
PS. I decided to do some resizing of datafiles and run a defrag.Apparently something changed in the nightly backups so that it is
trying to backup the logs on those databases.
The databases you list all default to SIMPLE recovery mode. The
example you showed for msdb was a failure to backup the log. You can
not backup the log on a database in SIMPLE recovery mode.
Roy Harvey
Beacon Falls, CT
On Wed, 14 Nov 2007 09:40:37 -0800, "Jay" <nospam@.nospam.org> wrote:

>SQL Server 2005
>A couple nights ago I got several failures on my 3 AM database backups, my
>program generated the message:
>[AdventureWorks] database backup failed with error: 3013
>on several databases, including: AdventureWorks, AdventureWorksDW, master,
>model & msdb.
>The error number was captured using @.@.ERROR.
>When I saw the error, I did the following:
> - Check drive space. Fine.
> - Check Windows Event Log - no pertinant messages (particulary drive
>space)
> - Check SQL Server logs
> BACKUP failed to complete the command BACKUP LOG msdb. Check th
e
>backup application log for details
> Error 3041, Severity 16, State 1
> (repeats for several databases)
> - Ran DBCC CHECKALLOC, DBCC CHECKCATALOG, DBCC CHECKDB and all were
>fine.
> - Re-ran a full backup without any issues.
>I know I will see error 3013 if I run out of space on a drive, but that
>wasn't the case here.
>The only thing "wrong" with this install is that the data and backups are
>all on the E: drive and while the drive itself is fragmened, but with only
>some minor exceptions, none of the .*df files are in the list.
>Oh, and not that I think it matters, but AutoShrink is off on all DB's.
>I would appreciate any assistance anyone can give helping me to understand
>what may have gone wrong.
>Thanks,
>Jay
>PS. I decided to do some resizing of datafiles and run a defrag.
>|||You are correct sir.
I have been dealing with the difference between 2000 & 2005 on the issue of
backing up the transaction log for simple mode databases and had just
included extra error traps. I also have a version that won't try the simple
mode log backup on version 9.
I supose I just managed to confuse myself.
Thanks,
Jay
"Roy Harvey (SQL Server MVP)" <roy_harvey@.snet.net> wrote in message
news:h4fmj392cv2vmstka6dkk07qfiovlvgsnu@.
4ax.com...[vbcol=seagreen]
> Apparently something changed in the nightly backups so that it is
> trying to backup the logs on those databases.
> The databases you list all default to SIMPLE recovery mode. The
> example you showed for msdb was a failure to backup the log. You can
> not backup the log on a database in SIMPLE recovery mode.
> Roy Harvey
> Beacon Falls, CT
> On Wed, 14 Nov 2007 09:40:37 -0800, "Jay" <nospam@.nospam.org> wrote:
>|||To add to Roy's comments, I would recommend not backing up the
AdventureWorks sample databases at all. You can always reinstall or download
these later if you need to.
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
Download the latest version of Books Online from
http://technet.microsoft.com/en-us/...r/bb428874.aspx
"Jay" <nospam@.nospam.org> wrote in message
news:%238yk4VuJIHA.6108@.TK2MSFTNGP03.phx.gbl...
> SQL Server 2005
> A couple nights ago I got several failures on my 3 AM database backups, my
> program generated the message:
> [AdventureWorks] database backup failed with error: 3013
> on several databases, including: AdventureWorks, AdventureWorksDW, master,
> model & msdb.
> The error number was captured using @.@.ERROR.
> When I saw the error, I did the following:
> - Check drive space. Fine.
> - Check Windows Event Log - no pertinant messages (particulary drive
> space)
> - Check SQL Server logs
> BACKUP failed to complete the command BACKUP LOG msdb. Check
> the backup application log for details
> Error 3041, Severity 16, State 1
> (repeats for several databases)
> - Ran DBCC CHECKALLOC, DBCC CHECKCATALOG, DBCC CHECKDB and all were
> fine.
> - Re-ran a full backup without any issues.
> I know I will see error 3013 if I run out of space on a drive, but that
> wasn't the case here.
> The only thing "wrong" with this install is that the data and backups are
> all on the E: drive and while the drive itself is fragmened, but with only
> some minor exceptions, none of the .*df files are in the list.
> Oh, and not that I think it matters, but AutoShrink is off on all DB's.
> I would appreciate any assistance anyone can give helping me to understand
> what may have gone wrong.
> Thanks,
> Jay
> PS. I decided to do some resizing of datafiles and run a defrag.
>|||Thanks, but no thanks. All databases get backed up.
Besides, I activly monitor these systems, so I'll know if space is an issue
before it becomes an issue.
"Gail Erickson [MS]" <gaile@.online.microsoft.com> wrote in message
news:%23m8HfIvJIHA.3820@.TK2MSFTNGP03.phx.gbl...
> To add to Roy's comments, I would recommend not backing up the
> AdventureWorks sample databases at all. You can always reinstall or
> download these later if you need to.
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
> Download the latest version of Books Online from
> http://technet.microsoft.com/en-us/...r/bb428874.aspx
> "Jay" <nospam@.nospam.org> wrote in message
> news:%238yk4VuJIHA.6108@.TK2MSFTNGP03.phx.gbl...
>

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x0

This error occurs when the ActiveX task tries to execute:

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x001B6438.

Anybody know how to troubleshoot these errors? I can't find anything on this error code. The same script works in DTS.

I have got the same error, the code is different but couldn't figure out what to do...|||

Hi Igor,

This isn't much of an answer but it is true: you should try to move away from the ActiveX Script Task and use the Script Task instead.

Hope this helps,
Andy

|||Script Task does mean that there is a different scripting language?

I tryed a different thing: I moved all the script from a SSIS task to a SQL Server job (a job with one "activeX script" step).

It sounds great, but I have a different error in the step that says that
"The command script does not destroy all the objects that it creates. Revise the command script. (Microsoft SQL Server, Error: 14277)"

I am not a VB programmer, so I think I have to ask someone to revise the script.

Thanks for the help|||

ActiveX scripts in SQL Jobs (all versions) appear to have a major bug in that they report Error: 14277 whenever the string "createobject(" appears more than once anywhere in the script. It does not matter whether the string is just part of a character expression such as: sTemp = "..... createobject( ...."; whether it appears in a comment or whether it is used to actually create an object. Any combination of the above that puts "createobject(" in the script more than once will cause the 14277 error to appear when you try to close the Job modifier.

There is a trick that I have found to overcome this. That is, to create any and all objects in a single common subroutine. Even in this subroutine, you have to trick the system into thinking that you have just destroyed the object that you are trying to create.

The subroutine is cobj. It takes the variable that will become the object and a string that defines the activex control. The "set ... = Nothing" that appears after the "Exit Sub" is the trick that makes the system think that the object is destroyed within the scope of cobj. Note: be sure to destroy the object in the scope where the object variable was defined.

Here is a code sample that sends an email using ASPMAIL, which contains data from an ADO SQL query.


'*********************************************
' ActiveX Script - no 14277 error
'*********************************************
MailMe readSQL(1006), "mymail@.mail.com"

Sub cobj(newobj, ax)
Set newobj = createobject(ax) ' only appears once, here
exit sub
Set newobj = Nothing ' never executed but tricks checker
End Sub

sub MailMe (sMsg, sAddress)
dim Mailer, vRet
if instr(sAddress,"@.")<1 then exit sub

cobj Mailer, "SMTPsvg.Mailer"

Mailer.FromName = "ASP_Debug"
Mailer.FromAddress = sAddress
Mailer.RemoteHost = "127.0.0.1"
Mailer.AddRecipient "", sAddress
Mailer.Subject = "Debug ActiveX Script - 14277 Error"
Mailer.BodyText = sMsg
Mailer.SendMail
Set Mailer=Nothing
end sub

Function readSQL(ndx)
Dim SQL, sConn, oRst
readSQL = "No Record"
SQL = "SELECT Note FROM NoteTable WHERE [ID]=" & CStr(ndx)
sConn = "Provider=SQLOLEDB.1;Initial Catalog=xx;Data Source=zz"

cobj oRst, "ADODB.Recordset"

oRst.Open SQL, sConn
If oRst.State = 1 Then
readSQL = oRst(0)
oRst.Close
End If
Set oRst = Nothing
End Function

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x0

This error occurs when the ActiveX task tries to execute:

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x001B6438.

Anybody know how to troubleshoot these errors? I can't find anything on this error code. The same script works in DTS.

I have got the same error, the code is different but couldn't figure out what to do...|||

Hi Igor,

This isn't much of an answer but it is true: you should try to move away from the ActiveX Script Task and use the Script Task instead.

Hope this helps,
Andy

|||Script Task does mean that there is a different scripting language?

I tryed a different thing: I moved all the script from a SSIS task to a SQL Server job (a job with one "activeX script" step).

It sounds great, but I have a different error in the step that says that
"The command script does not destroy all the objects that it creates. Revise the command script. (Microsoft SQL Server, Error: 14277)"

I am not a VB programmer, so I think I have to ask someone to revise the script.

Thanks for the help|||

ActiveX scripts in SQL Jobs (all versions) appear to have a major bug in that they report Error: 14277 whenever the string "createobject(" appears more than once anywhere in the script. It does not matter whether the string is just part of a character expression such as: sTemp = "..... createobject( ...."; whether it appears in a comment or whether it is used to actually create an object. Any combination of the above that puts "createobject(" in the script more than once will cause the 14277 error to appear when you try to close the Job modifier.

There is a trick that I have found to overcome this. That is, to create any and all objects in a single common subroutine. Even in this subroutine, you have to trick the system into thinking that you have just destroyed the object that you are trying to create.

The subroutine is cobj. It takes the variable that will become the object and a string that defines the activex control. The "set ... = Nothing" that appears after the "Exit Sub" is the trick that makes the system think that the object is destroyed within the scope of cobj. Note: be sure to destroy the object in the scope where the object variable was defined.

Here is a code sample that sends an email using ASPMAIL, which contains data from an ADO SQL query.


'*********************************************
' ActiveX Script - no 14277 error
'*********************************************
MailMe readSQL(1006), "mymail@.mail.com"

Sub cobj(newobj, ax)
Set newobj = createobject(ax) ' only appears once, here
exit sub
Set newobj = Nothing ' never executed but tricks checker
End Sub

sub MailMe (sMsg, sAddress)
dim Mailer, vRet
if instr(sAddress,"@.")<1 then exit sub

cobj Mailer, "SMTPsvg.Mailer"

Mailer.FromName = "ASP_Debug"
Mailer.FromAddress = sAddress
Mailer.RemoteHost = "127.0.0.1"
Mailer.AddRecipient "", sAddress
Mailer.Subject = "Debug ActiveX Script - 14277 Error"
Mailer.BodyText = sMsg
Mailer.SendMail
Set Mailer=Nothing
end sub

Function readSQL(ndx)
Dim SQL, sConn, oRst
readSQL = "No Record"
SQL = "SELECT Note FROM NoteTable WHERE [ID]=" & CStr(ndx)
sConn = "Provider=SQLOLEDB.1;Initial Catalog=xx;Data Source=zz"

cobj oRst, "ADODB.Recordset"

oRst.Open SQL, sConn
If oRst.State = 1 Then
readSQL = oRst(0)
oRst.Close
End If
Set oRst = Nothing
End Function

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x0

This error occurs when the ActiveX task tries to execute:

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x001B6438.

Anybody know how to troubleshoot these errors? I can't find anything on this error code. The same script works in DTS.

I have got the same error, the code is different but couldn't figure out what to do...|||

Hi Igor,

This isn't much of an answer but it is true: you should try to move away from the ActiveX Script Task and use the Script Task instead.

Hope this helps,
Andy

|||Script Task does mean that there is a different scripting language?

I tryed a different thing: I moved all the script from a SSIS task to a SQL Server job (a job with one "activeX script" step).

It sounds great, but I have a different error in the step that says that
"The command script does not destroy all the objects that it creates. Revise the command script. (Microsoft SQL Server, Error: 14277)"

I am not a VB programmer, so I think I have to ask someone to revise the script.

Thanks for the help|||

ActiveX scripts in SQL Jobs (all versions) appear to have a major bug in that they report Error: 14277 whenever the string "createobject(" appears more than once anywhere in the script. It does not matter whether the string is just part of a character expression such as: sTemp = "..... createobject( ...."; whether it appears in a comment or whether it is used to actually create an object. Any combination of the above that puts "createobject(" in the script more than once will cause the 14277 error to appear when you try to close the Job modifier.

There is a trick that I have found to overcome this. That is, to create any and all objects in a single common subroutine. Even in this subroutine, you have to trick the system into thinking that you have just destroyed the object that you are trying to create.

The subroutine is cobj. It takes the variable that will become the object and a string that defines the activex control. The "set ... = Nothing" that appears after the "Exit Sub" is the trick that makes the system think that the object is destroyed within the scope of cobj. Note: be sure to destroy the object in the scope where the object variable was defined.

Here is a code sample that sends an email using ASPMAIL, which contains data from an ADO SQL query.


'*********************************************
' ActiveX Script - no 14277 error
'*********************************************
MailMe readSQL(1006), "mymail@.mail.com"

Sub cobj(newobj, ax)
Set newobj = createobject(ax) ' only appears once, here
exit sub
Set newobj = Nothing ' never executed but tricks checker
End Sub

sub MailMe (sMsg, sAddress)
dim Mailer, vRet
if instr(sAddress,"@.")<1 then exit sub

cobj Mailer, "SMTPsvg.Mailer"

Mailer.FromName = "ASP_Debug"
Mailer.FromAddress = sAddress
Mailer.RemoteHost = "127.0.0.1"
Mailer.AddRecipient "", sAddress
Mailer.Subject = "Debug ActiveX Script - 14277 Error"
Mailer.BodyText = sMsg
Mailer.SendMail
Set Mailer=Nothing
end sub

Function readSQL(ndx)
Dim SQL, sConn, oRst
readSQL = "No Record"
SQL = "SELECT Note FROM NoteTable WHERE [ID]=" & CStr(ndx)
sConn = "Provider=SQLOLEDB.1;Initial Catalog=xx;Data Source=zz"

cobj oRst, "ADODB.Recordset"

oRst.Open SQL, sConn
If oRst.State = 1 Then
readSQL = oRst(0)
oRst.Close
End If
Set oRst = Nothing
End Function

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x0

This error occurs when the ActiveX task tries to execute:

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x001B6438.

Anybody know how to troubleshoot these errors? I can't find anything on this error code. The same script works in DTS.

I have got the same error, the code is different but couldn't figure out what to do...|||

Hi Igor,

This isn't much of an answer but it is true: you should try to move away from the ActiveX Script Task and use the Script Task instead.

Hope this helps,
Andy

|||Script Task does mean that there is a different scripting language?

I tryed a different thing: I moved all the script from a SSIS task to a SQL Server job (a job with one "activeX script" step).

It sounds great, but I have a different error in the step that says that
"The command script does not destroy all the objects that it creates. Revise the command script. (Microsoft SQL Server, Error: 14277)"

I am not a VB programmer, so I think I have to ask someone to revise the script.

Thanks for the help|||

ActiveX scripts in SQL Jobs (all versions) appear to have a major bug in that they report Error: 14277 whenever the string "createobject(" appears more than once anywhere in the script. It does not matter whether the string is just part of a character expression such as: sTemp = "..... createobject( ...."; whether it appears in a comment or whether it is used to actually create an object. Any combination of the above that puts "createobject(" in the script more than once will cause the 14277 error to appear when you try to close the Job modifier.

There is a trick that I have found to overcome this. That is, to create any and all objects in a single common subroutine. Even in this subroutine, you have to trick the system into thinking that you have just destroyed the object that you are trying to create.

The subroutine is cobj. It takes the variable that will become the object and a string that defines the activex control. The "set ... = Nothing" that appears after the "Exit Sub" is the trick that makes the system think that the object is destroyed within the scope of cobj. Note: be sure to destroy the object in the scope where the object variable was defined.

Here is a code sample that sends an email using ASPMAIL, which contains data from an ADO SQL query.


'*********************************************
' ActiveX Script - no 14277 error
'*********************************************
MailMe readSQL(1006), "mymail@.mail.com"

Sub cobj(newobj, ax)
Set newobj = createobject(ax) ' only appears once, here
exit sub
Set newobj = Nothing ' never executed but tricks checker
End Sub

sub MailMe (sMsg, sAddress)
dim Mailer, vRet
if instr(sAddress,"@.")<1 then exit sub

cobj Mailer, "SMTPsvg.Mailer"

Mailer.FromName = "ASP_Debug"
Mailer.FromAddress = sAddress
Mailer.RemoteHost = "127.0.0.1"
Mailer.AddRecipient "", sAddress
Mailer.Subject = "Debug ActiveX Script - 14277 Error"
Mailer.BodyText = sMsg
Mailer.SendMail
Set Mailer=Nothing
end sub

Function readSQL(ndx)
Dim SQL, sConn, oRst
readSQL = "No Record"
SQL = "SELECT Note FROM NoteTable WHERE [ID]=" & CStr(ndx)
sConn = "Provider=SQLOLEDB.1;Initial Catalog=xx;Data Source=zz"

cobj oRst, "ADODB.Recordset"

oRst.Open SQL, sConn
If oRst.State = 1 Then
readSQL = oRst(0)
oRst.Close
End If
Set oRst = Nothing
End Function