Re: connecting workers to database on a cluster
- From: "Titus" <titus.edelhofer@xxxxxxxxxxxx>
- Date: Tue, 8 Jan 2008 21:07:51 +0100
"Abdullah Mohammed" <akhamis@xxxxxxx> schrieb im Newsbeitrag
news:flv8ve$168$1@xxxxxxxxxxxxxxxxxxxxx
Hi all,
I will explain the problem in details as follows:
1) Suppose that I have four machines (A,B,C,D)…
A: the client machine
B: the Job Manager
C: one of the workers
D: Server has the SQL Server Database(apart of the cluster)
2) I have one small function:
==================================
function AllCompanies=getAllMarketCompanies
(connectionString,errorFilePath)
rd = actxserver('DataManipulation.DataClass');
sql ='SELECT DISTINCT companycode from Companies';
flag=rd.invoke
('getData',connectionString,sql,'c:\output.txt',errorFilePa
th);
AllCompanies=textread
('c:\output.txt','','delimiter','\t:/');
==================================
This function uses the DLL (DataManipulation.DataClass) to
send the query to the database (on D) and writes the
results in the output.txt file …. This dll is registered
in all the machines and no problem with it.
3) When I execute the previous function manually (i.e.
without the use of Distributed Computing) on machine (C),
it succeeds !!! and returns the results [this means that
there is no problem with the connection between the server
(D) and the worker (C)].
4) The problem arises only when I try to execute this
function on worker (C) by instructing the job manager to
send the task to machine (C). The code is written and sent
from the client machine to the Job manager (B) and then
from B to the worker (C). Unfortunately, C can not execute
the query on the data base and the following error is
returned:
===========================================================
=====================
GetData-12/25/2007 4:50:38 PM-
System.Data.OleDb.OleDbException: Login failed for
user 'sa'. Reason: Not associated with a trusted SQL
Server connection.
at System.Data.OleDb.OleDbConnectionInternal..ctor
(OleDbConnectionString constr, OleDbConnection connection)
at
System.Data.OleDb.OleDbConnectionFactory.CreateConnection
(DbConnectionOptions options, Object
poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningObject)
at
System.Data.ProviderBase.DbConnectionFactory.CreateNonPoole
dConnection(DbConnection owningConnection,
DbConnectionPoolGroup poolGroup)
at
System.Data.ProviderBase.DbConnectionFactory.GetConnection
(DbConnection owningConnection)
at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection
(DbConnection outerConnection, DbConnectionFactory
connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
at System.Data.Common.DbDataAdapter.FillInternal
(DataSet dataset, DataTable[] datatables, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand
command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet
dataSet, Int32 startRecord, Int32 maxRecords, String
srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet
dataSet, String srcTable)
at DataManipulation.DataClass.getData(String
connectionString, String command, String outputFile,
String errorFile)
===========================================================
=====================
You will notice that the problem is raised because the
database on (D) does not trust (C) only if the function is
executed via the parallel processing.
I have surfed the net to solve this error and I have found
many solutions...but all the forums discuss the
authentication mode from (windows to Sqlserver+windows)
and this is already applied on my database..
the database successfully executes the query if requested
from the Client itself.
Summary:
[[[I have tested this function in all the machines in the
LAN and it works successfully;the problem arises only when
the client send a request to the (distributed toolbox) to
execute this function on any worker in the LAN....???!!!
In the SQL server database, all the privileges were given
to all the machines in the LAN.]]]
Can any one help?
Thanks in advance.
Hi Abdullah,
the workers are usually started as LocalSystem, but this
is not a "user" the SQL Server knows about and therefore
refuses to answer.
Take a look at the MDCE_DEF.bat in <MATLAB>\toolbox\
distcomp\bin and change MDCEUSER to a username the SQL
server likes better.
Titus
.
- Follow-Ups:
- Re: connecting workers to database on a cluster
- From: Abdullah Mohammed
- Re: connecting workers to database on a cluster
- References:
- connecting workers to database on a cluster
- From: Abdullah Mohammed
- connecting workers to database on a cluster
- Prev by Date: Matlab Newbie
- Next by Date: Re: Matlab Newbie
- Previous by thread: connecting workers to database on a cluster
- Next by thread: Re: connecting workers to database on a cluster
- Index(es):
Relevant Pages
|