Thursday, March 29, 2012
Can I install more then one copy of MSDE on a server?
installed instances.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
"Clayton" <none@.none.com> wrote in message
news:zEhog.34345$Bh2.22632@.fe07.news.easynews.com...
We are running a Windows 2003 domain. I have a Windows 2003 member server
running an app. and MSDE.
I now have another app. that I would like to install on this same server.
The new app. also needs MSDE. My question is can I install and run more
then one copy of MSDE? Is there anything I need to know about doing it?
TIA,
ClaytonOr can I just use the same MSDE for the new app.? Can MSDE have more the
one DB?
TIA,
Clayton
"Clayton" <none@.none.com> wrote in message
news:zEhog.34345$Bh2.22632@.fe07.news.easynews.com...
> We are running a Windows 2003 domain. I have a Windows 2003 member server
> running an app. and MSDE.
> I now have another app. that I would like to install on this same server.
> The new app. also needs MSDE. My question is can I install and run more
> then one copy of MSDE? Is there anything I need to know about doing it?
>
> TIA,
> Clayton
>|||You can install up to 16 instances of MSDE (I think that is still
correct -someone correct me if I'm wrong.) on the same server.
However, each additional instance will have a variation in the instance
name. For example, if your server is MyServer, the first installation of
MSDE (or SQL Server) will be know as MyServer. When you install a second
instance of MSDE, you are required to provide an 'instance' name (e.g.,
Accounting). Then that server/instance will be referred to as
MyServer\Accounting. You have to use the compounded name in all connection
strings, etc.
That may not be a simple issue for many third party applications. (I would
hope so -but I've learned to be pessimistic about the skills of a lot of
programmers.)
[Loud retort from over my shoulder ="Hey, I represent that remark!"]
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"Clayton" <none@.none.com> wrote in message
news:zEhog.34345$Bh2.22632@.fe07.news.easynews.com...
> We are running a Windows 2003 domain. I have a Windows 2003 member server
> running an app. and MSDE.
> I now have another app. that I would like to install on this same server.
> The new app. also needs MSDE. My question is can I install and run more
> then one copy of MSDE? Is there anything I need to know about doing it?
>
> TIA,
> Clayton
>|||Can both apps. share the same MSDE install?
TIA,
Clayton
"Clayton" <none@.none.com> wrote in message
news:DNhog.34477$Bh2.16824@.fe07.news.easynews.com...
> Or can I just use the same MSDE for the new app.? Can MSDE have more the
> one DB?
>
> TIA,
> Clayton
>
> "Clayton" <none@.none.com> wrote in message
> news:zEhog.34345$Bh2.22632@.fe07.news.easynews.com...
>|||Cool, thanks guys. I have to go live with this thing (BlackBerry) within
the hour!
Thanks for your help,
Clayton
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:O7BA$QjmGHA.3732@.TK2MSFTNGP05.phx.gbl...
> You can install up to 16 instances of MSDE (I think that is still
> correct -someone correct me if I'm wrong.) on the same server.
> However, each additional instance will have a variation in the instance
> name. For example, if your server is MyServer, the first installation of
> MSDE (or SQL Server) will be know as MyServer. When you install a second
> instance of MSDE, you are required to provide an 'instance' name (e.g.,
> Accounting). Then that server/instance will be referred to as
> MyServer\Accounting. You have to use the compounded name in all connection
> strings, etc.
> That may not be a simple issue for many third party applications. (I would
> hope so -but I've learned to be pessimistic about the skills of a lot of
> programmers.)
> [Loud retort from over my shoulder ="Hey, I represent that remark!"]
> --
> Arnie Rowland, YACE*
> "To be successful, your heart must accompany your knowledge."
> *Yet Another certification Exam
>
> "Clayton" <none@.none.com> wrote in message
> news:zEhog.34345$Bh2.22632@.fe07.news.easynews.com...
>|||That depends on the app. The app may expect a particular instance name, for
example.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
"Clayton" <none@.none.com> wrote in message
news:DNhog.34477$Bh2.16824@.fe07.news.easynews.com...
Or can I just use the same MSDE for the new app.? Can MSDE have more the
one DB?
TIA,
Clayton
"Clayton" <none@.none.com> wrote in message
news:zEhog.34345$Bh2.22632@.fe07.news.easynews.com...
> We are running a Windows 2003 domain. I have a Windows 2003 member server
> running an app. and MSDE.
> I now have another app. that I would like to install on this same server.
> The new app. also needs MSDE. My question is can I install and run more
> then one copy of MSDE? Is there anything I need to know about doing it?
>
> TIA,
> Clayton
>|||Yes, one instance of MSDE (which is a version of SQL Server) can handle
quite a few databases. Depends on hardware, traffic, etc., subject to the
MSDE sizing limitations.
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"Clayton" <none@.none.com> wrote in message
news:OOhog.362227$Az2.335116@.fe10.news.easynews.com...
> Can both apps. share the same MSDE install?
> TIA,
> Clayton
>
> "Clayton" <none@.none.com> wrote in message
> news:DNhog.34477$Bh2.16824@.fe07.news.easynews.com...
>|||Cool, thanks guys. I have to go live with this thing (BlackBerry) within
the hour!
Thanks for your help,
Clayton
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:O7BA$QjmGHA.3732@.TK2MSFTNGP05.phx.gbl...
> You can install up to 16 instances of MSDE (I think that is still
> correct -someone correct me if I'm wrong.) on the same server.
> However, each additional instance will have a variation in the instance
> name. For example, if your server is MyServer, the first installation of
> MSDE (or SQL Server) will be know as MyServer. When you install a second
> instance of MSDE, you are required to provide an 'instance' name (e.g.,
> Accounting). Then that server/instance will be referred to as
> MyServer\Accounting. You have to use the compounded name in all connection
> strings, etc.
> That may not be a simple issue for many third party applications. (I would
> hope so -but I've learned to be pessimistic about the skills of a lot of
> programmers.)
> [Loud retort from over my shoulder ="Hey, I represent that remark!"]
> --
> Arnie Rowland, YACE*
> "To be successful, your heart must accompany your knowledge."
> *Yet Another certification Exam
>
> "Clayton" <none@.none.com> wrote in message
> news:zEhog.34345$Bh2.22632@.fe07.news.easynews.com...
>|||That depends on the app. The app may expect a particular instance name, for
example.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
"Clayton" <none@.none.com> wrote in message
news:DNhog.34477$Bh2.16824@.fe07.news.easynews.com...
Or can I just use the same MSDE for the new app.? Can MSDE have more the
one DB?
TIA,
Clayton
"Clayton" <none@.none.com> wrote in message
news:zEhog.34345$Bh2.22632@.fe07.news.easynews.com...
> We are running a Windows 2003 domain. I have a Windows 2003 member server
> running an app. and MSDE.
> I now have another app. that I would like to install on this same server.
> The new app. also needs MSDE. My question is can I install and run more
> then one copy of MSDE? Is there anything I need to know about doing it?
>
> TIA,
> Clayton
>|||Yes, one instance of MSDE (which is a version of SQL Server) can handle
quite a few databases. Depends on hardware, traffic, etc., subject to the
MSDE sizing limitations.
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"Clayton" <none@.none.com> wrote in message
news:OOhog.362227$Az2.335116@.fe10.news.easynews.com...
> Can both apps. share the same MSDE install?
> TIA,
> Clayton
>
> "Clayton" <none@.none.com> wrote in message
> news:DNhog.34477$Bh2.16824@.fe07.news.easynews.com...
>sql
Sunday, March 25, 2012
Can I do rolling upgrade of active-active SQL cluster
We have an active-active cluster where SQL server instances are created on
node 1 and Analysis services are installed on node 2. We need to upgrade the
H/W for both nodes? Can I do a rolling upgrade i.e. replacing one node at
time in above configuration?
If not then what are my options & if yes then can you give me some links to
documentation on how to do this?
Thanks,
Sushil
Sushil
Yes you can. I have done exactly this type of project. The more you plan
and test, the better your chance of success. I don't have any publicly
available documentation on a rolling upgrade.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Sushil" <Sushil@.discussions.microsoft.com> wrote in message
news:EA4D680F-4548-4536-8BD2-88ECE1004CF8@.microsoft.com...
> Hi,
> We have an active-active cluster where SQL server instances are created on
> node 1 and Analysis services are installed on node 2. We need to upgrade
> the
> H/W for both nodes? Can I do a rolling upgrade i.e. replacing one node at
> time in above configuration?
> If not then what are my options & if yes then can you give me some links
> to
> documentation on how to do this?
> Thanks,
> --
> Sushil
> --
> Sushil
|||Geoff,
Thanks for response. Can you please list if you had any challenges while
doing this?
I have been told that, When we replace node 2 by new node (Just with OS)
and install SQL server on this new node and try to cluster this new node
with OLD node 1 then that clustering will not work.
Can you point me any Microsoft documentation or books where I can get some
clues?
Thanks,
Sushil
Sushil
"Geoff N. Hiten" wrote:
> Yes you can. I have done exactly this type of project. The more you plan
> and test, the better your chance of success. I don't have any publicly
> available documentation on a rolling upgrade.
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
>
>
> "Sushil" <Sushil@.discussions.microsoft.com> wrote in message
> news:EA4D680F-4548-4536-8BD2-88ECE1004CF8@.microsoft.com...
>
>
|||Here is the quick version.
Starting with SQL 2000 2-node (4-Proc DELL) connected to DELL | EMC CX-600.
Windows 2000 OS. 2 SQL Instances.
Ended with SQL 2000 4-node (8-proc Unisys) still connected to the same SAN
(expanded the storage capacity, though). Windows 2003 OS. 3 SQL Instances.
Started with in-place upgrade of OS (one node at a time). Obtaining the
correct drivers for the HBAs was a challenge. This was Q4 '03, so that
shouldn't be a problem, but it is a critical step.
Added the two new nodes. When stable, removed original two nodes. Finally
added the remaining new nodes.
Note that if you have a SCSI based cluster, you cannot have more than two
nodes even with Windows 2003.
Again, planning and testing was essential. Each step had numerous tests and
bailout plans to avoid downtime.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Sushil" <Sushil@.discussions.microsoft.com> wrote in message
news:97D3A989-1C04-450C-B3C4-20F674299E09@.microsoft.com...[vbcol=seagreen]
> Geoff,
> Thanks for response. Can you please list if you had any challenges while
> doing this?
> I have been told that, When we replace node 2 by new node (Just with OS)
> and install SQL server on this new node and try to cluster this new node
> with OLD node 1 then that clustering will not work.
> Can you point me any Microsoft documentation or books where I can get some
> clues?
> Thanks,
> Sushil
>
> --
> Sushil
>
> "Geoff N. Hiten" wrote:
|||I have a thought rolling around in my brain about limitations of the number
of nodes being different between WIn2K and Win2K3...but I can't remember the
specifics. Geoff, can you recall or am I off-base (anymore than usual?)
Kevin Hill
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.expertsrt.com - not your average tech Q&A site
"Geoff N. Hiten" <SQLCraftsman@.gmail.com> wrote in message
news:OF3pKh0MGHA.4052@.TK2MSFTNGP15.phx.gbl...
> Here is the quick version.
> Starting with SQL 2000 2-node (4-Proc DELL) connected to DELL | EMC
> CX-600. Windows 2000 OS. 2 SQL Instances.
> Ended with SQL 2000 4-node (8-proc Unisys) still connected to the same SAN
> (expanded the storage capacity, though). Windows 2003 OS. 3 SQL
> Instances.
> Started with in-place upgrade of OS (one node at a time). Obtaining the
> correct drivers for the HBAs was a challenge. This was Q4 '03, so that
> shouldn't be a problem, but it is a critical step.
> Added the two new nodes. When stable, removed original two nodes.
> Finally added the remaining new nodes.
> Note that if you have a SCSI based cluster, you cannot have more than two
> nodes even with Windows 2003.
> Again, planning and testing was essential. Each step had numerous tests
> and bailout plans to avoid downtime.
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
>
> "Sushil" <Sushil@.discussions.microsoft.com> wrote in message
> news:97D3A989-1C04-450C-B3C4-20F674299E09@.microsoft.com...
>
|||Windows 2000 Enterprise Edition supports 2 nodes. Windows 2003 supports up
to 8 nodes, but SQL 2000 Enterprise Edition only supports a maximum of 4
nodes so that is the limit. That is why I had to do an in-place OS upgrade
as a beginning step for this process. I normally don't like in-place
upgrades, but this was only for a short time during a transition.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Kevin3NF" <Kevin@.DontNeedNoSpam3NF-inc.com> wrote in message
news:eP$dgeWNGHA.1192@.TK2MSFTNGP11.phx.gbl...
>I have a thought rolling around in my brain about limitations of the number
>of nodes being different between WIn2K and Win2K3...but I can't remember
>the specifics. Geoff, can you recall or am I off-base (anymore than
>usual?)
> --
> Kevin Hill
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
> www.expertsrt.com - not your average tech Q&A site
>
> "Geoff N. Hiten" <SQLCraftsman@.gmail.com> wrote in message
> news:OF3pKh0MGHA.4052@.TK2MSFTNGP15.phx.gbl...
>
Thursday, February 16, 2012
Can a profiler trace be scheduled?
I need to run a Sql Profiler Trace on one of our sql server 2000 instances at 3:00 AM but rather than getting up at 3, I would rather schedule a trace to run. Can this be done? If so, where can I see an example?
Thanks
Yes.. you can do that... You can write your own script using sql tracing SP and functions.
Read :http://msdn2.microsoft.com/en-us/library/ms191006.aspx
http://vyaskn.tripod.com/server_side_tracing_in_sql_server.htm
The other way is ... you make a trace using the Profiler Tool and then you can script it. Once you create the script run the script using job...
Madhu
Tuesday, February 14, 2012
Can 2K5 Cluster can have 2 instances on each node?
We have sql 2005 standard installed as cluster on win2k3 cluster with 8
GB memory on each node. We have one virtual sql server named instance on
first node. Can we create one more instance on the same node and
similarly 2 more instances on the second node. The cluster will be in
active\active mode. Our reason for considering this is that we will be
able to fail over one instance from the node 1 to node2 and node2 still
have the 2nd instance running. Is this possible?
Thanks
DeBe
DeBe's Profile: http://www.dbtalk.net/m115
View this thread: http://www.dbtalk.net/t297735
I think you have some misconceptions on how clustering works. The obsolete
naming of "Active/passive/Active..." is partially responsible for that.
Instances are installed to the cluster. You can have up to sixteen
instances on a cluster. SQL Server 2005 Standard Edition supports up to
two-node clusters. Nodes are the host computers for a cluster. An instance
can run on either node, but only on one node at a time. You cannot install
the same SQL instance to two nodes and have them both serviceing data
requests as if they were the same server. SQL Clustering is a failover
technology, not a scale-out technology. You can create two SQL instances on
a SQL 2005 two-node cluster and let one run normally on each node. During a
failure event one node can run both instances, with some performance
compromises of course.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"DeBe" <DeBe.25toh0@.no-mx.forums.yourdomain.com.au> wrote in message
news:DeBe.25toh0@.no-mx.forums.yourdomain.com.au...
> Hi,
> We have sql 2005 standard installed as cluster on win2k3 cluster with 8
> GB memory on each node. We have one virtual sql server named instance on
> first node. Can we create one more instance on the same node and
> similarly 2 more instances on the second node. The cluster will be in
> active\active mode. Our reason for considering this is that we will be
> able to fail over one instance from the node 1 to node2 and node2 still
> have the 2nd instance running. Is this possible?
> Thanks
>
> --
> DeBe
> DeBe's Profile: http://www.dbtalk.net/m115
> View this thread: http://www.dbtalk.net/t297735
>
|||I will try to make my problem more clear.
I am talking about 4 different instances and they have 4 different
databases
connecting to 4 very different application.
so
Node1-->InsA-->DBa
Node1-->InsB-->DBb
Node2-->InsC-->DBc
Node2-->InsD-->DBd
So I guess my question is is it possible for just InsA to fail over to
Node 2. So that node 2 is now running with 3 instances and node 1 is
running with 1 instance?
My second question would be about the memory. If out of 8 GB Ram on
each node if 1 GB is assigned to os and 3 GB is assigned to each
instance (assuming 2 instances) and if the third instance from the node
2 fails over how will it get the memory for itself?
Thanks
DeBe
DeBe's Profile: http://www.dbtalk.net/m115
View this thread: http://www.dbtalk.net/t297735
|||You can have up to sixteen instances per cluster. Once the instances are
installed, you can set the preferred node order for each instance. That
determines which node is the normal host for this instance. Each instance
is completely independent from the other instances. You can move each
instance independently between nodes without affecting any other instance.
Just as on a stand-alone system with multiple instances, it is the DBA's
responsibility to make sure there are enough resources for all instances to
function properly. Note that SQL will not rebalance memory amongst multiple
instances. I.E. It will not make one instance give up memory so another one
can have it. You must plan ahead for the situation where one node hosts
more than its normal set of instances.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"DeBe" <DeBe.25uu4z@.no-mx.forums.yourdomain.com.au> wrote in message
news:DeBe.25uu4z@.no-mx.forums.yourdomain.com.au...
> I will try to make my problem more clear.
> I am talking about 4 different instances and they have 4 different
> databases
> connecting to 4 very different application.
> so
> Node1-->InsA-->DBa
> Node1-->InsB-->DBb
> Node2-->InsC-->DBc
> Node2-->InsD-->DBd
> So I guess my question is is it possible for just InsA to fail over to
> Node 2. So that node 2 is now running with 3 instances and node 1 is
> running with 1 instance?
> My second question would be about the memory. If out of 8 GB Ram on
> each node if 1 GB is assigned to os and 3 GB is assigned to each
> instance (assuming 2 instances) and if the third instance from the node
> 2 fails over how will it get the memory for itself?
> Thanks
>
> --
> DeBe
> DeBe's Profile: http://www.dbtalk.net/m115
> View this thread: http://www.dbtalk.net/t297735
>
|||Just curious why you need so many instances. One instance can handle 4
DB's.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
..
"DeBe" <DeBe.25uu4z@.no-mx.forums.yourdomain.com.au> wrote in message
news:DeBe.25uu4z@.no-mx.forums.yourdomain.com.au...
I will try to make my problem more clear.
I am talking about 4 different instances and they have 4 different
databases
connecting to 4 very different application.
so
Node1-->InsA-->DBa
Node1-->InsB-->DBb
Node2-->InsC-->DBc
Node2-->InsD-->DBd
So I guess my question is is it possible for just InsA to fail over to
Node 2. So that node 2 is now running with 3 instances and node 1 is
running with 1 instance?
My second question would be about the memory. If out of 8 GB Ram on
each node if 1 GB is assigned to os and 3 GB is assigned to each
instance (assuming 2 instances) and if the third instance from the node
2 fails over how will it get the memory for itself?
Thanks
DeBe
DeBe's Profile: http://www.dbtalk.net/m115
View this thread: http://www.dbtalk.net/t297735
Sunday, February 12, 2012
Calling Visual Foxpro 7 COM
Dear Experts,
We are creating instances of COM Objects written in Visual FoxPro 7 in our SQL Server 2005 stored procedures.
The problem is that VFP Automation Manager which shows number of connections to number of objects is showing 3 connections to 3 objects(instead 1 to 1).
We are releasing the object in SQL Server 2005 using the sp_OADestroy @.Object but the Automation Manager leaves 1 connection to 1 object.
The Automation manager connection doesn't release all the connections.
What effects is this having to our SQL Server 2005 installation and how can we avoid it?
We noticed that when we stop the SQL Service, connections to the Automation Manager are also released.
Thank you for your time.
Regards,
Spyros Christodoulou
You could stop the OLE Automation execution environment itself by calling sp_OAStop. Note that this affects the execution environment at the server-level. Generally, you should avoid using OLE automation extensively since it is resource intensive and running these in-proc can destabilize the server. Try creating the ole server out-of-proc for better reliability with some performance penalty. What is the reason for calling the VFP object from TSQL? Is this absoultely necessary? Note that you can perform queries against VFP databases/tables using linked servers. This is something you should look at also.|||Dear Umachandar,Thanks for your reply.
Unfortunately we cannot stop OLE Automation execution environment because other users may executing OLE Methods as well.
The reason we are calling VFP from TSQL is that we need VFP to export some files.
I know that we could use a linked server, but in our case it doesn't apply because of the following:
1) VFP database and tables are changing a lot and we don't want the SQL team to be involved every time the VFP team changes tables required for the Import in SQL.
2) The export process is very complicated and it may need to call 2 or 3 VFP methods which means on a change we need to look into these methods as well. (Both VFP and SQL Teams)
For these reasons and the fact that it is much faster to develop the export method in VFP it is better to call VFP method to export data for SQL server.
Have you tried calling VFP out-of-proc COM objects? Does it properly release memory when you call sp_OADestroy @.Object ?
Regards,
Spyros Christodoulou
|||I was suggesting out-of-proc instantiation for better reliability/isolation on the server-side. Some of this might be just behavior of OLE automation. Can you try similar test from say VB and see if the connections are released properly after the OLE object is destroyed?|||Hi Umachandar,
Thanks for your reply,
I found a post you made at microsoft.public.sqlserver.programming on august of 2001.
"I have used this. It works perfectly fine. Are you making a EXE? Does it
have UI? Make sure it doesn't have any of those. Here is one sample:
NOTE -- Save this to a file called "VFPOLE.PRG" in "C:\TEMP"
DEFINE CLASS vfpole AS Custom OLEPUBLIC
prop1 = 'VFPOLE'
ENDDEFINE
NOTE Run these in the VFP command window
CD C:\Temp
BUILD PROJECT VFPOLE FROM VFPOLE.PRG
BUILD DLL VFPOLE FROM VFPOLE
-- Now run this on the SQL Server
declare @.o int, @.h int, @.p varchar( 255 )
exec @.h = sp_OACreate 'VFPOLE.VFPOLE', @.o out
if @.@.error|@.h <> 0 exec sp_displayoaerrorinfo @.o, @.h
print @.o
exec @.h = sp_OAGetProperty @.o, 'Prop1', @.p OUT
if @.@.error|@.h <> 0 exec sp_displayoaerrorinfo @.o, @.h
print @.p
exec sp_oadestroy @.o"
I tried it and it works as an in-process OLE server. It seems that it concumes some SQL Server memory every time I run it. How to register and call the dll if it resides on a different server. (like when you register the VFP .vbr file using clireg32.exe)
Do you know how to make it an out of process and called it based on the following scenario:
Server 1: VFP Database
Server 2: SQL Server
I need to run (SP on Server 2) the dll or exe using Ole Automation on Server 1. (Server 2 will have share access on Server 1)
Any help will be greatly appreciated.
Thanks again,
Spyros Christodoulou
|||The third parameter to sp_OACreate specifies the context for the OLE server. If you specify it as 4 then out-of-proc activation will take place. See Books Online for more details on the parameter.|||
Hi Umachandar and Spyros:
I am trying to do something very similar in SQL Server 2000 with VFP 8 objects.
The remaining problem is also similar as the one Spyros described:
"(...)
Server 1: VFP Database
Server 2: SQL Server
I need to run (SP on Server 2) the dll or exe using Ole Automation on Server 1. (Server 2 will have share access on Server 1)
(...)"
In server 1, I have the COM+ application o package correctly installed and working since years
In Clients computers various front end consume the server classes via, for example in VB
CreateObject('AppMastervs.cOrga', mtsServer1)
or in VFP
CreateObjectEx('AppMastervs.cOrga', mtsServer1)
These clients has registered the corresponding .vbr & tlb via CliReg32
I also registered the server classes in the Server 2 (the one with SQLServer) and it work fine with the Front ends, but was impossible to me to create the class in SQLServer using
EXEC @.hr = sp_OACreate 'AppMastervs.cOrga', @.object OUT ,1
EXEC @.hr = sp_OACreate 'AppMastervs.cOrga', @.object OUT ,4
EXEC @.hr = sp_OACreate 'AppMastervs.cOrga', @.object OUT ,5
Then I copied and registered the class as local in the the Server 2 (as COM+ app in Component services) and then it worked fine (with the 3rd parameter in 4 or 5), but the problem is that must not be done beacuse this carges the sqlServer, generate unnecesary traffic and dificults the server update process.
So, please let me know if is really possible to create, in SQL Server 2000, a server class working as COM+ application in other server, without register it locally as COM+ Application.
Thanks in advance;
Claudio Facundo Lacivita
Calling Visual Foxpro 7 COM
Dear Experts,
We are creating instances of COM Objects written in Visual FoxPro 7 in our SQL Server 2005 stored procedures.
The problem is that VFP Automation Manager which shows number of connections to number of objects is showing 3 connections to 3 objects(instead 1 to 1).
We are releasing the object in SQL Server 2005 using the sp_OADestroy @.Object but the Automation Manager leaves 1 connection to 1 object.
The Automation manager connection doesn't release all the connections.
What effects is this having to our SQL Server 2005 installation and how can we avoid it?
We noticed that when we stop the SQL Service, connections to the Automation Manager are also released.
Thank you for your time.
Regards,
Spyros Christodoulou
You could stop the OLE Automation execution environment itself by calling sp_OAStop. Note that this affects the execution environment at the server-level. Generally, you should avoid using OLE automation extensively since it is resource intensive and running these in-proc can destabilize the server. Try creating the ole server out-of-proc for better reliability with some performance penalty. What is the reason for calling the VFP object from TSQL? Is this absoultely necessary? Note that you can perform queries against VFP databases/tables using linked servers. This is something you should look at also.|||Dear Umachandar,Thanks for your reply.
Unfortunately we cannot stop OLE Automation execution environment because other users may executing OLE Methods as well.
The reason we are calling VFP from TSQL is that we need VFP to export some files.
I know that we could use a linked server, but in our case it doesn't apply because of the following:
1) VFP database and tables are changing a lot and we don't want the SQL team to be involved every time the VFP team changes tables required for the Import in SQL.
2) The export process is very complicated and it may need to call 2 or 3 VFP methods which means on a change we need to look into these methods as well. (Both VFP and SQL Teams)
For these reasons and the fact that it is much faster to develop the export method in VFP it is better to call VFP method to export data for SQL server.
Have you tried calling VFP out-of-proc COM objects? Does it properly release memory when you call sp_OADestroy @.Object ?
Regards,
Spyros Christodoulou
|||I was suggesting out-of-proc instantiation for better reliability/isolation on the server-side. Some of this might be just behavior of OLE automation. Can you try similar test from say VB and see if the connections are released properly after the OLE object is destroyed?|||Hi Umachandar,
Thanks for your reply,
I found a post you made at microsoft.public.sqlserver.programming on august of 2001.
"I have used this. It works perfectly fine. Are you making a EXE? Does it
have UI? Make sure it doesn't have any of those. Here is one sample:
NOTE -- Save this to a file called "VFPOLE.PRG" in "C:\TEMP"
DEFINE CLASS vfpole AS Custom OLEPUBLIC
prop1 = 'VFPOLE'
ENDDEFINE
NOTE Run these in the VFP command window
CD C:\Temp
BUILD PROJECT VFPOLE FROM VFPOLE.PRG
BUILD DLL VFPOLE FROM VFPOLE
-- Now run this on the SQL Server
declare @.o int, @.h int, @.p varchar( 255 )
exec @.h = sp_OACreate 'VFPOLE.VFPOLE', @.o out
if @.@.error|@.h <> 0 exec sp_displayoaerrorinfo @.o, @.h
print @.o
exec @.h = sp_OAGetProperty @.o, 'Prop1', @.p OUT
if @.@.error|@.h <> 0 exec sp_displayoaerrorinfo @.o, @.h
print @.p
exec sp_oadestroy @.o"
I tried it and it works as an in-process OLE server. It seems that it concumes some SQL Server memory every time I run it. How to register and call the dll if it resides on a different server. (like when you register the VFP .vbr file using clireg32.exe)
Do you know how to make it an out of process and called it based on the following scenario:
Server 1: VFP Database
Server 2: SQL Server
I need to run (SP on Server 2) the dll or exe using Ole Automation on Server 1. (Server 2 will have share access on Server 1)
Any help will be greatly appreciated.
Thanks again,
Spyros Christodoulou
|||The third parameter to sp_OACreate specifies the context for the OLE server. If you specify it as 4 then out-of-proc activation will take place. See Books Online for more details on the parameter.|||
Hi Umachandar and Spyros:
I am trying to do something very similar in SQL Server 2000 with VFP 8 objects.
The remaining problem is also similar as the one Spyros described:
"(...)
Server 1: VFP Database
Server 2: SQL Server
I need to run (SP on Server 2) the dll or exe using Ole Automation on Server 1. (Server 2 will have share access on Server 1)
(...)"
In server 1, I have the COM+ application o package correctly installed and working since years
In Clients computers various front end consume the server classes via, for example in VB
CreateObject('AppMastervs.cOrga', mtsServer1)
or in VFP
CreateObjectEx('AppMastervs.cOrga', mtsServer1)
These clients has registered the corresponding .vbr & tlb via CliReg32
I also registered the server classes in the Server 2 (the one with SQLServer) and it work fine with the Front ends, but was impossible to me to create the class in SQLServer using
EXEC @.hr = sp_OACreate 'AppMastervs.cOrga', @.object OUT ,1
EXEC @.hr = sp_OACreate 'AppMastervs.cOrga', @.object OUT ,4
EXEC @.hr = sp_OACreate 'AppMastervs.cOrga', @.object OUT ,5
Then I copied and registered the class as local in the the Server 2 (as COM+ app in Component services) and then it worked fine (with the 3rd parameter in 4 or 5), but the problem is that must not be done beacuse this carges the sqlServer, generate unnecesary traffic and dificults the server update process.
So, please let me know if is really possible to create, in SQL Server 2000, a server class working as COM+ application in other server, without register it locally as COM+ Application.
Thanks in advance;
Claudio Facundo Lacivita