Sunday, March 11, 2012
DLL and Xtended Proc...
I've created my own sendmail in VB6 SP5 as a DLL and put it on my SQL server
2K SP3. I've a class module with only one public funtion in it.
I want to use the function in this dll so I decalred my DLL as an extended
proc in SQL . apprently SQL doesn't recognize the function in my dll. How
can I use it? What's the best way to do it?
Best regards,I'm not sure if a VB6 DLL can be registered as an extended stored procedure
this way.
If you want to use the functionality of your DLL from SQL Server, you could
use the sp_OA* set of procedures for the same. Refer to
http://www32.brinkster.com/srisamp/sqlarchives.asp for articles on COM
accessibility. You can refer to the articles titled "Using COM Objects in
SQL Server" and "Extending SQL Server with COM Objects".
--
HTH,
SriSamp
Please reply to the whole group only!
http://www32.brinkster.com/srisamp
"Philippe RUELLO" <pruello@.tibco.fr> wrote in message
news:OMjpLlYuDHA.2712@.tk2msftngp13.phx.gbl...
> Hello,
> I've created my own sendmail in VB6 SP5 as a DLL and put it on my SQL
server
> 2K SP3. I've a class module with only one public funtion in it.
> I want to use the function in this dll so I decalred my DLL as an extended
> proc in SQL . apprently SQL doesn't recognize the function in my dll. How
> can I use it? What's the best way to do it?
> Best regards,
>|||Just to confirm - VB only produces COM type .dlls, not call level type which
are required for extended stored procedures. So you cannot register VB .dlls
for use as extended stored procedures in SQL Server.
The other method that SriSamp has suggested (sp_OACreate) is the only way to
access your VB .dll directly from T-SQL.
Regards,
Greg Linwood
SQL Server MVP
"SriSamp" <ssampath@.sct.co.in> wrote in message
news:#j7#xrYuDHA.1576@.TK2MSFTNGP11.phx.gbl...
> I'm not sure if a VB6 DLL can be registered as an extended stored
procedure
> this way.
> If you want to use the functionality of your DLL from SQL Server, you
could
> use the sp_OA* set of procedures for the same. Refer to
> http://www32.brinkster.com/srisamp/sqlarchives.asp for articles on COM
> accessibility. You can refer to the articles titled "Using COM Objects in
> SQL Server" and "Extending SQL Server with COM Objects".
> --
> HTH,
> SriSamp
> Please reply to the whole group only!
> http://www32.brinkster.com/srisamp
> "Philippe RUELLO" <pruello@.tibco.fr> wrote in message
> news:OMjpLlYuDHA.2712@.tk2msftngp13.phx.gbl...
> > Hello,
> > I've created my own sendmail in VB6 SP5 as a DLL and put it on my SQL
> server
> > 2K SP3. I've a class module with only one public funtion in it.
> > I want to use the function in this dll so I decalred my DLL as an
extended
> > proc in SQL . apprently SQL doesn't recognize the function in my dll.
How
> > can I use it? What's the best way to do it?
> > Best regards,
> >
> >
>|||Thanks for the answer.
I tried to use that methos but i've some troubles using the attachements
with CDONT.Newmail
I could use Xp_sendmail, but I want to modify the parameter From.
Have some clues?
"SriSamp" <ssampath@.sct.co.in> a écrit dans le message de
news:%23j7%23xrYuDHA.1576@.TK2MSFTNGP11.phx.gbl...
> I'm not sure if a VB6 DLL can be registered as an extended stored
procedure
> this way.
> If you want to use the functionality of your DLL from SQL Server, you
could
> use the sp_OA* set of procedures for the same. Refer to
> http://www32.brinkster.com/srisamp/sqlarchives.asp for articles on COM
> accessibility. You can refer to the articles titled "Using COM Objects in
> SQL Server" and "Extending SQL Server with COM Objects".
> --
> HTH,
> SriSamp
> Please reply to the whole group only!
> http://www32.brinkster.com/srisamp
> "Philippe RUELLO" <pruello@.tibco.fr> wrote in message
> news:OMjpLlYuDHA.2712@.tk2msftngp13.phx.gbl...
> > Hello,
> > I've created my own sendmail in VB6 SP5 as a DLL and put it on my SQL
> server
> > 2K SP3. I've a class module with only one public funtion in it.
> > I want to use the function in this dll so I decalred my DLL as an
extended
> > proc in SQL . apprently SQL doesn't recognize the function in my dll.
How
> > can I use it? What's the best way to do it?
> > Best regards,
> >
> >
>|||How about xp_smtp_sendmail from www.SQLDev.Net?
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Philippe RUELLO" <pruello@.tibco.fr> wrote in message news:uXn1yUZuDHA.2408@.tk2msftngp13.phx.gbl...
> Thanks for the answer.
> I tried to use that methos but i've some troubles using the attachements
> with CDONT.Newmail
> I could use Xp_sendmail, but I want to modify the parameter From.
> Have some clues?
> "SriSamp" <ssampath@.sct.co.in> a écrit dans le message de
> news:%23j7%23xrYuDHA.1576@.TK2MSFTNGP11.phx.gbl...
> > I'm not sure if a VB6 DLL can be registered as an extended stored
> procedure
> > this way.
> > If you want to use the functionality of your DLL from SQL Server, you
> could
> > use the sp_OA* set of procedures for the same. Refer to
> > http://www32.brinkster.com/srisamp/sqlarchives.asp for articles on COM
> > accessibility. You can refer to the articles titled "Using COM Objects in
> > SQL Server" and "Extending SQL Server with COM Objects".
> > --
> > HTH,
> > SriSamp
> > Please reply to the whole group only!
> > http://www32.brinkster.com/srisamp
> >
> > "Philippe RUELLO" <pruello@.tibco.fr> wrote in message
> > news:OMjpLlYuDHA.2712@.tk2msftngp13.phx.gbl...
> > > Hello,
> > > I've created my own sendmail in VB6 SP5 as a DLL and put it on my SQL
> > server
> > > 2K SP3. I've a class module with only one public funtion in it.
> > > I want to use the function in this dll so I decalred my DLL as an
> extended
> > > proc in SQL . apprently SQL doesn't recognize the function in my dll.
> How
> > > can I use it? What's the best way to do it?
> > > Best regards,
> > >
> > >
> >
> >
>
Wednesday, March 7, 2012
distributor_admin not a local user?
do I go about fixing this?
Thanks for your help,
Stephen
Where is your Distributor? Is it on the Publisher?
Is the Subscriber in the same domain as the Publisher?
How did you configure your Subscriber? Can you go to
Tools-Replication-Configure Publishers, Subscribers, Distributors, click on
the Subscribers tab, and click on the browse button (the three ellipses) to
the right of your server name?
Make sure you are using Impersonate the SQL Server Agent account on the
Publisher if you are in the same domain.
"Stephen A." <stephen.accetta@.honeywell.com> wrote in message
news:B6D49A36-D4D7-4D51-85B5-0BDFEA948056@.microsoft.com...
> The distribution server for my publisher is a live server, and the
publisher is a test server that I wish to make it's own distributor.
Whenever I try to select it as it's own distributor, I get an error that
"distributor_admin" is not a local user. How do I go about fixing this?
> Thanks for your help,
> Stephen
|||>>Where is your Distributor? Is it on the Publisher?
No. The distributor is machine A, the publisher is machine B, I wish to
make machine B it's own distributor
Same segment, but the subscriber (Machine C) is not on any domain, I
registered it by IP address. I'm not having any problems with the
subscriber, merely with making the publisher it's own distributor.
click on
ellipses) to
I'll check, but I think so.
the
I already set up a replication account, I merely wish to make the
publisher it's own distributor.
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
|||The solution is easy!!! Register servers to SQL by using their names
or aliasses. Do not use ip numbers.
distributor_admin Issue....But different than normal
trying to set up a machine as its own distributor. (First time after
setting up about 200 distributors). I get this whether I'm doing it
remotely, or on the machine itself.
The wrinkle is that the login "distributor_admin" does not exist at all
on the potential publisher (who, again, is going to be its own
distributor).
Do I need to reinstall MS-SQL to get that login created? Or can I do
it by hand somehow?
Or am I barking up the wrong tree?
Thank you!
-Joseph
What happens when you do a select @.@.servername?
Does it match what you get when you issue a xp_cmdshell 'hostname'?
if not you need to do the following
sp_dropserver @.server='oldServername'
sp_addserver @.server='NewServerName', @.local='LOCAL'
Then restart SQL Server.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Joseph" <josephsheppard@.gmail.com> wrote in message
news:1168894392.883101.309200@.v45g2000cwv.googlegr oups.com...
>I am having the common "distributor_admin does not exist" error when
> trying to set up a machine as its own distributor. (First time after
> setting up about 200 distributors). I get this whether I'm doing it
> remotely, or on the machine itself.
> The wrinkle is that the login "distributor_admin" does not exist at all
> on the potential publisher (who, again, is going to be its own
> distributor).
> Do I need to reinstall MS-SQL to get that login created? Or can I do
> it by hand somehow?
> Or am I barking up the wrong tree?
> Thank you!
> -Joseph
>
|||Thanks, Hilary...There certainly was a difference...
I followed your instructions, and I'm going to take another stab at
setting distribution up.
You are the man! I'm going to have my boss order your book...
-Joseph
Hilary Cotter wrote:[vbcol=seagreen]
> What happens when you do a select @.@.servername?
> Does it match what you get when you issue a xp_cmdshell 'hostname'?
> if not you need to do the following
> sp_dropserver @.server='oldServername'
> sp_addserver @.server='NewServerName', @.local='LOCAL'
> Then restart SQL Server.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "Joseph" <josephsheppard@.gmail.com> wrote in message
> news:1168894392.883101.309200@.v45g2000cwv.googlegr oups.com...
Saturday, February 25, 2012
Distribution DB on its own server
different from the publisher ?
The distributor can use a fair amount of resources on a very busy system so
if it starts to impact performance that would be a good clue.
Andrew J. Kelly SQL MVP
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:eYeoG$H7EHA.1112@.TK2MSFTNGP14.phx.gbl...
> When would one consider to have the distribution database on another
> server
> different from the publisher ?
>
|||TO add to Andrew's comments, be aware that it is difficult to change the
server that the distribution database lives on because that server name is
in registry entries for each publisher and subscriber... So try to make a
good decision the first time...
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:eYeoG$H7EHA.1112@.TK2MSFTNGP14.phx.gbl...
> When would one consider to have the distribution database on another
server
> different from the publisher ?
>
Distribution DB on its own server
different from the publisher ?
When locking becomes a problem. There is no hard and fast rule, ie when you
get more than 1023 transactions per second, or you are running on a 2 Ghz
processor.
If you have a high load replication solution you might want to migrate to a
remote distributor from the start. However, you must keep in mind that if
the distributor goes down your tlogs can balloon, and it can be difficult,
but not impossible, to recover from.
Generally I like to remove this single point of failure and use a local
distribution database.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:O6sibAI7EHA.1564@.TK2MSFTNGP09.phx.gbl...
> When would one consider to have the distribution database on another
> server
> different from the publisher ?
>
Distribution DB on its own server
different from the publisher ?The distributor can use a fair amount of resources on a very busy system so
if it starts to impact performance that would be a good clue.
Andrew J. Kelly SQL MVP
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:eYeoG$H7EHA.1112@.TK2MSFTNGP14.phx.gbl...
> When would one consider to have the distribution database on another
> server
> different from the publisher ?
>|||TO add to Andrew's comments, be aware that it is difficult to change the
server that the distribution database lives on because that server name is
in registry entries for each publisher and subscriber... So try to make a
good decision the first time...
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:eYeoG$H7EHA.1112@.TK2MSFTNGP14.phx.gbl...
> When would one consider to have the distribution database on another
server
> different from the publisher ?
>
Distribution DB on its own server
different from the publisher ?The distributor can use a fair amount of resources on a very busy system so
if it starts to impact performance that would be a good clue.
--
Andrew J. Kelly SQL MVP
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:eYeoG$H7EHA.1112@.TK2MSFTNGP14.phx.gbl...
> When would one consider to have the distribution database on another
> server
> different from the publisher ?
>|||TO add to Andrew's comments, be aware that it is difficult to change the
server that the distribution database lives on because that server name is
in registry entries for each publisher and subscriber... So try to make a
good decision the first time...
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:eYeoG$H7EHA.1112@.TK2MSFTNGP14.phx.gbl...
> When would one consider to have the distribution database on another
server
> different from the publisher ?
>
Distribution Cost
Sorry if this is the wrong place to post this.....
I am new to MS SQL as I have been using Paradox for years. Paradox has its own built in DB, so, the cost is great for small company applications (which is what we do). However, we are now going to rewrite our application in VB (most likely), and we want to ensure that the DB we go with will not cost a fortune to our clients. On top of this we want the application to be PC based as well as online. I know you can connect to MS SQL via PHP. The DB will live on our server, and the clients should all be hosted on our server. Our clients are Churches, and they do not have thousands to put into a program, which is why Paradox was great for this. Now, I am worried that MS SQL will cost for every copy of the program we sale. How does this work if we develop a program to work with MS SQL 2005 and sale it to clients? Is there a cost that we must pay MS for each copy? Does the client need the MS SQL Desktop Engine to run the DB, or do they need something else?
Sorry to sound stupid, but MS SQL is new to me, and I want to ensure that I make the right choice that is not going to bite me later down the road. I have looked at MySQL, PostgreSQL, OpenBase, and a few others. The all seem ok, but still looking. Thanks in advance for any suggestions or comments you have...
Gene
Hi Gene,
Perhaps SQL Server Express edition will meet your business needs. Check out http://www.microsoft.com/sql/editions/express/default.mspx for details. You may also find this topic useful for comparing the features available in each edition: http://www.microsoft.com/sql/prodinfo/features/compare-features.mspx and this site contains useful information about pricing and licensing http://www.microsoft.com/sql/howtobuy/default.mspx.
Regards,
Gail
Tuesday, February 14, 2012
distributed transaction
I've 2 Windows 2000 server running each own instance of SQL2000. I've setup
both linked servers @. both end.
At server A, it'll call a sp in server B, whereby this sp will update server
B tables based on server A's data. And the server A table A will trigger ba
ck to server B.
Server_A call ServerB.sp
|
V
store procedure @. serverB
insert into serverB.dbB.dbo.tableB
select * from serverA.dbA.dbo.tableA where key=X
|
V
serverB.dbB.dbo.tableB trigger back to serverA
if record not found in serverA
insert into serverA
else
update into server A
However I encountered error stating:
Server: Msg 7391, Level 16, State 1, Procedure sp_update_across_linked_serve
r, Line 112
The operation could not be performed because the OLE DB provider 'SQLOLEDB'
was unable to begin a distributed transaction.
OLE DB error trace [OLE/DB Provider 'SQLOLEDB' ITransactionJoin::JoinTransac
tion returned 0x8004d00a].
[OLE/DB provider returned message: New transaction cannot enlist in the spec
ified transaction coordinator. ]
I found out if I drop the trigger, the sp will perform correctly. But the pr
oblem is I need to keep the trigger.
Can someone enlighten me on this ?
thanks in advance
KristeHi
http://groups-beta.google.com/group...=UTF-8&oe=UTF-8
Regards
Mike
"Kriste L" wrote:
> Hi everyone,
> I've 2 Windows 2000 server running each own instance of SQL2000. I've setu
p both linked servers @. both end.
> At server A, it'll call a sp in server B, whereby this sp will update serv
er B tables based on server A's data. And the server A table A will trigger
back to server B.
> Server_A call ServerB.sp
> |
> V
> store procedure @. serverB
> insert into serverB.dbB.dbo.tableB
> select * from serverA.dbA.dbo.tableA where key=X
> |
> V
> serverB.dbB.dbo.tableB trigger back to serverA
> if record not found in serverA
> insert into serverA
> else
> update into server A
>
> However I encountered error stating:
> Server: Msg 7391, Level 16, State 1, Procedure sp_update_across_linked_ser
ver, Line 112
> The operation could not be performed because the OLE DB provider 'SQLOLEDB
' was unable to begin a distributed transaction.
> OLE DB error trace [OLE/DB Provider 'SQLOLEDB' ITransactionJoin::JoinTrans
action returned 0x8004d00a].
> [OLE/DB provider returned message: New transaction cannot enlist in the sp
ecified transaction coordinator. ]
> I found out if I drop the trigger, the sp will perform correctly. But the
problem is I need to keep the trigger.
> Can someone enlighten me on this ?
> thanks in advance
> Kriste
>|||I've checked all the necessary things,
- use the dtcping, the 2 servers' rpc server and reverse binding are ok in
both direction.
- there's no firewall in both servers
- in the sp and trigger, SET XACT_ABORT ON and SET REMOTE_PROC_TRANSACTIONS
OFF
in my situation, is the trigger causing a loopback operations?
"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:75A495AD-7C8F-4B82-8E0C-C72C68609339@.microsoft.com...
> Hi
>
http://groups-beta.google.com/group...=UTF-8&oe=UTF-8
> Regards
> Mike
> "Kriste L" wrote:
>
setup both linked servers @. both end.
server B tables based on server A's data. And the server A table A will
trigger back to server B.
sp_update_across_linked_server, Line 112
'SQLOLEDB' was unable to begin a distributed transaction.
ITransactionJoin::JoinTransaction returned 0x8004d00a].
specified transaction coordinator. ]
the problem is I need to keep the trigger.