Showing posts with label mssql. Show all posts
Showing posts with label mssql. Show all posts

Sunday, March 25, 2012

Do I need an actual mailbox for SQLServerAgent (2000)

I'm following a book and trying to set up MSSQL to email me upon failures
and successful backups. MSSQL and SQLAgent are installed and running under
a network service user account I call "SqlServerService" which is infact a
network user.
In Ent Mgr, I'm going to Management >> Operators and I'm trying to add a new
operator. I add the email (me) account to be emailed and click Test to send
a test message. It returns an error of "error 22022: SqlServerAgent Error:
The SQLServerAgent mail session is not running; check the mail profile
and/or the SqlServerAgent service start up account..."
The SqlServerAgent is indeed running and the Agent Properties is running
under this network account I created.
Any ideas? The account "SqlServerService" doesn't have an actual Exchange
Server mailbox. I just thought it would be possible (as shown in the book)
to send FROM this account. Do I actually need to create the mailbox account
too?
Short answer: Yes.
Long answer and how: [How to configure SQL Mail]
http://support.microsoft.com/default...b;en-us;263556
HTH, Jens Suessmeyer.

Do I need an actual mailbox for SQLServerAgent (2000)

I'm following a book and trying to set up MSSQL to email me upon failures
and successful backups. MSSQL and SQLAgent are installed and running under
a network service user account I call "SqlServerService" which is infact a
network user.
In Ent Mgr, I'm going to Management >> Operators and I'm trying to add a new
operator. I add the email (me) account to be emailed and click Test to send
a test message. It returns an error of "error 22022: SqlServerAgent Error:
The SQLServerAgent mail session is not running; check the mail profile
and/or the SqlServerAgent service start up account..."
The SqlServerAgent is indeed running and the Agent Properties is running
under this network account I created.
Any ideas? The account "SqlServerService" doesn't have an actual Exchange
Server mailbox. I just thought it would be possible (as shown in the book)
to send FROM this account. Do I actually need to create the mailbox account
too?Short answer: Yes.
Long answer and how: [How to configure SQL Mail]
http://support.microsoft.com/default.aspx?scid=kb;en-us;263556
HTH, Jens Suessmeyer.

Do I need an actual mailbox for SQLServerAgent (2000)

I'm following a book and trying to set up MSSQL to email me upon failures
and successful backups. MSSQL and SQLAgent are installed and running under
a network service user account I call "SqlServerService" which is infact a
network user.
In Ent Mgr, I'm going to Management >> Operators and I'm trying to add a new
operator. I add the email (me) account to be emailed and click Test to send
a test message. It returns an error of "error 22022: SqlServerAgent Error:
The SQLServerAgent mail session is not running; check the mail profile
and/or the SqlServerAgent service start up account..."
The SqlServerAgent is indeed running and the Agent Properties is running
under this network account I created.
Any ideas? The account "SqlServerService" doesn't have an actual Exchange
Server mailbox. I just thought it would be possible (as shown in the book)
to send FROM this account. Do I actually need to create the mailbox account
too?Short answer: Yes.
Long answer and how: [How to configure SQL Mail]
http://support.microsoft.com/defaul...kb;en-us;263556
HTH, Jens Suessmeyer.sql

Monday, March 19, 2012

DML against remote tables (MSSQL to DB2)

I created a linked server to a DB2 database and I can pull data fine, but when I try to insert/update/delete it tells me "SQL0471N Invocation of routine "SYSIBM.SQLTABLES" failed due to reason "00E7900C"" when trying: DELETE FROM DB2LinkedServer..SPACENAME.TABLENAME

I believe I need to send a clear string to DB2 that doesn't get compiled on the sql server side. Is there something like openquery that I can use for DML statements in SQL Server?Upon further review I found this site: http://support.microsoft.com/kb/270119/EN-US/

It shows how to use openquery to execute DML statements. nifty.

Saturday, February 25, 2012

Distribution executable running at 100% cpu but doesn't process any transactions

MSSQL Server 2000 SP3a -> MSSQL Server 2000 SP3a
Transactional Replication
Push subscriptions
Transactional replication has been performing well for years between
two servers. I added a new publication to handle some other tables.
Both publications had push subscriptions to our Production and
Development SQL servers. I added an article for a relatively large
table (2,000,000 rows or so) to the second publication and a few days
later the distribution agent seemed to get "stuck" after this new
article was added.
The distribution agent maxes out the CPU, but I don't see any
transactions going through. Nothing appears to be happening in
profiler, and neither the sqlserver nor the distrib.exe processes seem
to be performing any I/O related to replication with the exception of
a very slow incrementing I/O other for distrib.exe.
I killed the push subscription for the second publication and this
fixed the problem for a day or so. However this morning the
publication that has been working fine for months is now creating the
same problem. As a result no transactions are getting through to the
production server.
I've tried running the distrib.exe through the command prompt but it
causes the same issue.
Any advice or guidance?
Thanks!
- Mike
You can bet it will get "stuck" - 2,000,000 rows is a lot of data to push.
I suggest you do DTS it over (create a package for this and use the fast
insert option), and then do a nosync subscription. Ensure you build the
replication stored procedures using sp_scriptcustomprocs.
"Mike" <ngposterMikeBain@.gmail.com> wrote in message
news:ea5d5311.0410210729.264b3427@.posting.google.c om...
> MSSQL Server 2000 SP3a -> MSSQL Server 2000 SP3a
> Transactional Replication
> Push subscriptions
> Transactional replication has been performing well for years between
> two servers. I added a new publication to handle some other tables.
> Both publications had push subscriptions to our Production and
> Development SQL servers. I added an article for a relatively large
> table (2,000,000 rows or so) to the second publication and a few days
> later the distribution agent seemed to get "stuck" after this new
> article was added.
> The distribution agent maxes out the CPU, but I don't see any
> transactions going through. Nothing appears to be happening in
> profiler, and neither the sqlserver nor the distrib.exe processes seem
> to be performing any I/O related to replication with the exception of
> a very slow incrementing I/O other for distrib.exe.
> I killed the push subscription for the second publication and this
> fixed the problem for a day or so. However this morning the
> publication that has been working fine for months is now creating the
> same problem. As a result no transactions are getting through to the
> production server.
> I've tried running the distrib.exe through the command prompt but it
> causes the same issue.
> Any advice or guidance?
> Thanks!
> - Mike

Friday, February 17, 2012

Distributed transaction trough ODBC from MSSQL to Oracle

I lost few days to solve a problem regarding the connection to an Oracle database server (10) with goal to execute a distributed transaction.

The environment was:

Windows Server 2003 Standard

MSSQL Server 2000 Standard

Oracle 10g Production Edition

The connection was quite easy to make with the Microsoft driver, but the error was:

Server: Msg 7391, Level 16, State 1, Line 3

The operation could not be performed because the OLE DB provider 'MSDAORA' was unable to begin a distributed transaction.

OLE DB error trace [OLE/DB Provider 'MSDAORA' ITransactionJoin::JoinTransaction returned 0x8004d01b].

I tried to use the oracle odbc driver, but all kinds of errors were raised, regarding the TNS name and stuff like this. The real cause was that when you create the linked server you must to check the “Allow inbound process” in the provider options.

The Oracle ODBC driver allow distributed transactions.

Would you please clarify where exactly that ""Allow inbound process" option needs to be checked? I am setting up a linked server with a Provider name as "Microsoft OLE DB for Oracle" and clicking "Provider Options..." button brings up a dialog that does NOT have "Allow inbound process" as one of the options to check.

Distributed transaction trough ODBC from MSSQL to Oracle

I lost few days to solve a problem regarding the connection to an Oracle database server (10) with goal to execute a distributed transaction.

The environment was:

Windows Server 2003 Standard

MSSQL Server 2000 Standard

Oracle 10g Production Edition

The connection was quite easy to make with the Microsoft driver, but the error was:

Server: Msg 7391, Level 16, State 1, Line 3

The operation could not be performed because the OLE DB provider 'MSDAORA' was unable to begin a distributed transaction.

OLE DB error trace [OLE/DB Provider 'MSDAORA' ITransactionJoin::JoinTransaction returned 0x8004d01b].

I tried to use the oracle odbc driver, but all kinds of errors were raised, regarding the TNS name and stuff like this. The real cause was that when you create the linked server you must to check the “Allow inbound process” in the provider options.

The Oracle ODBC driver allow distributed transactions.

Would you please clarify where exactly that ""Allow inbound process" option needs to be checked? I am setting up a linked server with a Provider name as "Microsoft OLE DB for Oracle" and clicking "Provider Options..." button brings up a dialog that does NOT have "Allow inbound process" as one of the options to check.

Tuesday, February 14, 2012

Distributed transaction aborted by MSDTC

hi,
i'm implementing a distributed database(partitioned view) system using 3
linked MSSQL 2000 server(SP3),
when I try update the distributed table within a BEGIN TRAN & COMMIT TRAN, I
get the error "Distributed transaction aborted by MSDTC", or sometime
"Distributed transaction completed. Either enlist this session in a new
transaction or the NULL transaction."
the http://support.microsoft.com/?kbid=834849 says this only happened if one
of the linked server is MSSQL Server 7.0, but all my servers are 2000 Server
with SP3, so can somebody help to resolve this?
If you are running Windows XP or Windows Server 2003 you can use DTC tracing
to find out why the transaction aborts, otherwise you can use SQL Profiler
and include the DTC transaction event class.
Do you have a trigger on one of the tables that is involved in the
transaction?
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2004 All rights reserved.
"eugeneng" <eugeneng@.discussions.microsoft.com> wrote in message
news:C4FC5E8E-B128-459D-9914-78B8CE2AD795@.microsoft.com...
> hi,
> i'm implementing a distributed database(partitioned view) system using 3
> linked MSSQL 2000 server(SP3),
> when I try update the distributed table within a BEGIN TRAN & COMMIT TRAN,
> I
> get the error "Distributed transaction aborted by MSDTC", or sometime
> "Distributed transaction completed. Either enlist this session in a new
> transaction or the NULL transaction."
> the http://support.microsoft.com/?kbid=834849 says this only happened if
> one
> of the linked server is MSSQL Server 7.0, but all my servers are 2000
> Server
> with SP3, so can somebody help to resolve this?
>
>

Distributed transaction aborted by MSDTC

hi,
i'm implementing a distributed database(partitioned view) system using 3
linked MSSQL 2000 server(SP3),
when I try update the distributed table within a BEGIN TRAN & COMMIT TRAN, I
get the error "Distributed transaction aborted by MSDTC", or sometime
"Distributed transaction completed. Either enlist this session in a new
transaction or the NULL transaction."
the http://support.microsoft.com/?kbid=834849 says this only happened if one
of the linked server is MSSQL Server 7.0, but all my servers are 2000 Server
with SP3, so can somebody help to resolve this?If you are running Windows XP or Windows Server 2003 you can use DTC tracing
to find out why the transaction aborts, otherwise you can use SQL Profiler
and include the DTC transaction event class.
Do you have a trigger on one of the tables that is involved in the
transaction?
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2004 All rights reserved.
"eugeneng" <eugeneng@.discussions.microsoft.com> wrote in message
news:C4FC5E8E-B128-459D-9914-78B8CE2AD795@.microsoft.com...
> hi,
> i'm implementing a distributed database(partitioned view) system using 3
> linked MSSQL 2000 server(SP3),
> when I try update the distributed table within a BEGIN TRAN & COMMIT TRAN,
> I
> get the error "Distributed transaction aborted by MSDTC", or sometime
> "Distributed transaction completed. Either enlist this session in a new
> transaction or the NULL transaction."
> the http://support.microsoft.com/?kbid=834849 says this only happened if
> one
> of the linked server is MSSQL Server 7.0, but all my servers are 2000
> Server
> with SP3, so can somebody help to resolve this?
>
>

Distributed transaction aborted by MSDTC

hi,
i'm implementing a distributed database(partitioned view) system using 3
linked MSSQL 2000 server(SP3),
when I try update the distributed table within a BEGIN TRAN & COMMIT TRAN, I
get the error "Distributed transaction aborted by MSDTC", or sometime
"Distributed transaction completed. Either enlist this session in a new
transaction or the NULL transaction."
the http://support.microsoft.com/?kbid=834849 says this only happened if one
of the linked server is MSSQL Server 7.0, but all my servers are 2000 Server
with SP3, so can somebody help to resolve this?If you are running Windows XP or Windows Server 2003 you can use DTC tracing
to find out why the transaction aborts, otherwise you can use SQL Profiler
and include the DTC transaction event class.
Do you have a trigger on one of the tables that is involved in the
transaction?
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright © SQLDev.Net 1991-2004 All rights reserved.
"eugeneng" <eugeneng@.discussions.microsoft.com> wrote in message
news:C4FC5E8E-B128-459D-9914-78B8CE2AD795@.microsoft.com...
> hi,
> i'm implementing a distributed database(partitioned view) system using 3
> linked MSSQL 2000 server(SP3),
> when I try update the distributed table within a BEGIN TRAN & COMMIT TRAN,
> I
> get the error "Distributed transaction aborted by MSDTC", or sometime
> "Distributed transaction completed. Either enlist this session in a new
> transaction or the NULL transaction."
> the http://support.microsoft.com/?kbid=834849 says this only happened if
> one
> of the linked server is MSSQL Server 7.0, but all my servers are 2000
> Server
> with SP3, so can somebody help to resolve this?
>
>