Here is the situation. We have a .Net application that some
consultants developed several years ago. They made use of DAO for
database access, using some inbuilt classes like ContextUtil to get a
transation environment.
Until last weekend, the envorinment was:
Web application on IIS5 / Windows 2000 Advanced Server
Database on SQL2000 on Windows 2000 Advanced Server
We switched over to a new database server environment - a cluster of
two Windows 2003 servers wth SQL Server 2000. This required
Active Directory to be set up on the two database server machines.
Everything worked but this particular application - where it goes to
update the database. It appears (but since I haven't yet been
able to rebuild the .Net solution) that the error - "Object reference
not set to an instance of object." is in fact a spurious error caused
when the transation tries to roll back.
I have spent about 10 hours on this, and have come to the conclusion
that the fact I have MSDTC involved on a database server that is in an
AD domain, while the web server that is issuing the transaction is
outside that domain is the cause of the problem. Now, I don't
want to put AD on the IIS 5 web server - we are migrating this to a new
Win2k3/IIS6 server in 5 or 6 weeks time.
Any suggestions? If I have to, I can move the database for this
particular app back to the non-clustered Windows 2000 server (which is
also outside the AD domain).
I have a class that use a TransactionScope object for make make two operations into a database. The problem is that in a computer works well but in another I receive a error message: "MSDTC is not running in .SQLEXPRESS". I had watched the services in the computer and the "Microsoft Distributed Transaction Coordinator" is running. Does somebody know what is happening? Thankyou and sorry for my English.
HelloI had a question reagrding MSDTC usage. I know that MSDTC will enlisteach connection transactions as it's own (take ownership) andcommit/abort accordingly.However I'm not sure what would happen where I have a stored proc withinput parameters and 2 Delete commands on 2 different tables. In thiscase, would MSDTC also enforce ACID rules when 1 cmd succeeds and 2ndaborts ? In the script for the Stored Proc, there is no checking for@@ERROR value. There are just DELETE statement and a plain RETURN.thanksSunit
High level question: Is there a way to rollback a transaction without failing a task?
Here's the scenario:
A single foreach loop contains a sequence container. The sequence container has its TransactionOption set to "Required." All activity happens within the sequence container. This is so that each iteration of the foreach loop is in its own transaction space. Now the catch. In the sequence container I run a few tasks, but more importantly, at the end (final task before the next foreach iteration) I run a Script Task to compare the values of two variables to see if they match. If they do, then all is well; move onto the next iteration. If they don't (and this is where my problem lies), then I need to roll back the current transaction without halting the foreach loop's iterations.
Is the best idea/approach to increase the value of MaximumErrorCount for the parent/package and set the Dts.TaskResult to Dts.Results.Failure, or is there a way in the script task that I can roll back the transaction and set Dts.TaskResult = Dts.Results.Success??
[Microsoft][ODBC SQL Server Driver][SQL Server]The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "DUL41" was unable to begin a distributed transaction.
If I use query analyzer (or whatever we're calling it now) to connect to server 1 and run the statement, it works fine. But, SQR is connecting via ODBC (that's different) and also is SQR.
I'm also not 100% sure all of the new MSDTC aspects are configured correctly, but I've gone through the settings a few times. Right now, I pretty much have everything set about as open as possible (these are test servers on the same network) and am still getting the error.
Any help, or ideas I could try, would be great. Thanks.
I created an SSIS packages on VS 2013 using SQL 2014. I have to use transactions and without MSDTC as we don't have that environment.
Ok my issue when I load a stage table during the process and then I select from that same stage table my records on another table are not being inserted. why? I have done sql profiler an all sql statements are being ran under same SPID.
Package design 1. For each container - this is to process files on a folder 2. Execute sql task - begin tran 3. sequence container - to hold all and organize containers 4. execute sql task - truncate ImpTableA 5. Data Flow task - Import data into ImpTableA from file 6. execute sql task - insert into DimProducts and new products found in ImpTableA that are not in DimProducts so I'm joining the 2 tables together as a outter join and getting the new ones. 7. Execute sql task - commit tran 8. Execute sql task -Â rollback tran
On Step 6 I don't find any new rows on DimProducts even though I know there is new products. I have tested the sql statement in SSMS and it works and I find new rows. For some reason SSIS is not finding new products, I'm assuming that the rows are not committed yet and therefore can query them but I thought if I was under the same transaction and SPID I would be able to read uncommitted rows.
Need to be able to read from table that was just inserted in a transaction incase of a failure roll everything back.
I have a table with the following columns employeeSessionID, OpDate, OpHour, sessionStartTime, sessionCloseTime. I need to see how many users remain active per hour. I can calculate how many logged in per hour, but I am stumped on how to count how many are active per hour. I have a single table that stores login data. I have created a query that pulls out the only the data needed from the table into a temp table using this query. Also note it is possible that the sessionCloseTime is null if the device has not been logged out this would need to be counted a active.
TABLE NAME #empSessionLog Contains the time stamp data OpDate, sessionStartTime and sessionCloseTime. OpDatesessionStartTimesessionCloseTime 2015-01-202015-01-20 14:32:59.1302015-01-20 14:33:14.6299166 2015-01-202015-01-20 06:58:33.7302015-01-20 15:27:16.9133442 2015-01-202015-01-20 09:56:22.8402015-01-20 17:56:29.7555853 2015-01-202015-01-20 05:59:18.6132015-01-20 14:05:19.0426707
[code]....
can see how many sessions logged in per hour with the following statement:
SELECT opDate, FORMAT(DATEPART(HOUR, sessionStartTime), '00') AS opHour, Count(*) AS Total FROM #empSessionLog Group BY opDate, FORMAT(DATEPART(HOUR, sessionStartTime), '00') Order BY opDate, FORMAT(DATEPART(HOUR, sessionStartTime), '00') ASCResults: opDateopHourTotal 2015-01-20041
[code]....
Where I am stuck is how do I count the sessions that remain active per hour until the session is closed with the sessionCloseTime.
I am having some teething problems while installing SQL on a 3 node cluster. Within the Cluster configuration I have 3 Cluster Groups with each of them having their associated disk resources. All these disk resources physically exist on a SAN.
The actual cluster is running absolutely fine and I can access all the disks from their respective owner node. The problem only starts when I start installing SQL Server 2005 on this cluster. I specify the Cluster group from the Cluster Group Selection and choose the desired partition and then the error message pops up
"There is not enough diskspace on the destination disk for the current SQL Server data files. To proceed, free up disk space to make room for data files, or install the data files to a different drive"
But the disk I am trying to install it on is 264Gb and none of it is used. I have also tried to change it to a different disk within the same Cluster group but to no avail. I have even tried to install it in a different cluster group all together but I get the same error message.
I have googled around havent found anything so far. The disks have got full permissions for the account I am installing SQL with.
I am newbie in SQL Clustering. I have set up a Windows Server Cluster with 2 nodes and am having the following problem with Physical Disk resource for cluster groups:
My Default Cluster Group (named Cluster Group) has IP Address, Network Name, Physical Disk and MSDTC resources. In addition to that my Default SQL Server instance resources are also in this group. I had this initial set up for Active/Passive mode.
Now I am trying to set up a SQL Cluster in Active/Active mode. For this I have to install another instance of SQL Server in the existing cluster and make a separate cluster group for its resources. I made a new cluster group (SQL Instance Group) with an IP Address and a Network Name resource for this new instance but I dont have any Physical Disk resource to allocate to it. As such while installing the SQL Server Instance I get stuck when I'm asked to select the quorum disk to be used.
Is it possible to configure two quorum disks, one for each group? What's the concept of dedicated disks resource for each sql instance in a group? Is this same as the quorum disk? If this is not a shared disk how do I configure a dedicated disk resource for my second cluster group (SQL Instance Group)?
We are going thru the process of scoping an active/active cluster at one site. I was wondering whether there will be any issues with mirroring (DB by DB) off the cluster into non clustered server at an alternate DRP site.
Hi there, I have decided to move all my transaction handling from asp.net to stored procedures in a SQL Server 2000 database. I know the database is capable of rolling back the transactions just like myTransaction.Rollback() in asp.net. But what about exceptions? In asp.net, I am used to doing the following: <code>Try 'execute commands myTransaction.Commit()Catch ex As Exception Response.Write(ex.Message) myTransaction.Rollback()End Try</code>Will the database inform me of any exceptions (and their messages)? Do I need to put anything explicit in my stored procedure other than rollback transaction? Any help is greatly appreciated
We are trying to set up an active/active configuration of a SQL Server cluster, and we had a few questions.
Initially, we want to have 2 Database Servers that would share the same Database (both reading/writing to the same tables). However, from reading the MS docs, we find out that we can have what they call an "active/active" configuration using a Cluster but they need to have 2 different disk sets, i.e. having 2 separate databases. If this assumption is correct, how does the data get synchronised between the 2 databases (that are on the 2 different disks sets)?
have you ever heard of an Active/Active SQL Sever 2000 Cluster deployed in a pure OLTP environment?
Some 8 years ago I have learned about a bespoke solution for the SAP ERP system (not the BW!) with DB2 Parallel Server for a huge German company. Then again, I would expect that Oracle RAC might fit into an OLTP environment, although I never heard about a real world implementation.
All this led me to believe clustering is good for failover purposes, and for decision support services, not quite for OLTP applications.
So if you see a point in Active/Active Clustering and OLTP please come forward and explain.
Cheers,
Johann
P.S: For those of you who want to know: Consultants from www.hiltes.com want us to deploy an Active/Active Cluster for their Fashion 3000 Net stock software.
We run several SQL 2000 SP4 instances on IA64 active/active cluster. The OS we run with is Windows Server 2003 SP1. We have different network cards : 2 network cards teamed for production purposes in domain X and 1 network card dedicated for problem solving in domain Y. First we configured the cluster with only the 2 teamed network cards for production purposes in domain X. Later we introduced the second network card for problem solving in domain Y. Everything looks fine. The (virtual) SQL instance listens on two different IP adresses on TCP port 1034. If we try to make connection via isql, EM or Query analyzer than we can directly contact the SQL instance from a workstation/server within domain X but this doesn't work form a workstation/server within domain Y. However if we use the specific TCP port in the connection in domain Y the connection is setup. We wish however not to use explicit TCP ports in setting up connections. Has anyone experienced the same problem before or has anyone an idea how to solve the problem?
I have a 2005 active/active cluster and want to apply SQL server 2005 SP2 to both node. I know that for active/passive , the sp can simple be installed on the active node(instance) and everything will be replicated to the other node. bear in mind what I have SSIS and SSAS and SSRS running on the active/active cluster.
what is the rigth method for applying the SP to activeactive cluster?
Hi While configuring an active / active cluster, do I need to run the SQL setup on both nodes? The SQL2K setup installs binaries on localdisks of both nodes - hence the question.
I have setup an active/active clustering environment for SQL Server, however it is 2 seperate virtual servers. How can I set them up to exist as one virtual server containing both active installations? Can this be done? I have two compaq 8500 w/8 processors each. I need to be able to cluster these configurations to take advantage of all 16 processors in one virtual SQL Server. Can it be done?
If you can answer these questions, you will have my undying gratitude.
Hi I am running some tests on SQL7 in an active/active cluster and have a couple of queries 1. When I create an ODBC DSN, why is the "Use the Failover SQL Server if the primary SQL Server" checkbox disabled 2. To test, I was running SQL queries from Access over the DSN created. When the Primary Server went down, I had to reconnect to re run the query - Is this normal? 3. Can someone point me to any documentation on the above scenario that would shed some more light?
I currently have a two node HP hardware active/active cluster server. Running windows NT 4.0 Enterprise and dSQL server 6.5 sp 3. I want to upgrade the cluster to SQL 7. I would like to know if anyone ran into any problems or has sucessfully attempted this.
Also I read a few months ago about a gottcha involving NT sp4 and SQL sp5a that would prevent a node from failing over. Has this been corrected and does it affect SQL 7.
Is there anyone who knows where I can get some information about installing an ACTIVE/ACTIVE SQL 2000 Cluster server (MSCS). I have no problem setting up an active/passive failover cluster.
Where can I get more information? Do I need two instances? Two databases? What's the difference between active/active and active/passive?
Hello, Can anyone please explain how the failover processes works on a sql server 2000 2 node active/active cluster.
Given the following You have 2 node active/active cluster NodeA & NodeB
Question 1. How many SQL instances need to be installed on each node?
2. If the answer to question #1 is one instance per node, then say if NodeA fails NodeB will take over all the resources of NodeA including the master database, How does that work , how can once instance (in nodeB) handle two master database i.e its own master database and the one taken over from NodeA.
Hi, I've just setup an 2 node active/active sql cluster (my first). Both servers have exactly the same specification, 16GB of RAM each and SAN attached. My question is, how do I configure the min and max memory for each sql instance. I've read some where that I need to follow the 20-40-40 rule as, 20% for the OS, 40% for the active sql instance on the node and the other 40% is for the other sql instance if it fails over. Are there any other gotcha that I need to be aware of? Can someone share some light with me in regards to this? Thanks
We have an active/active node setup with SQL 2005. Does anyone have any samples of VBS I could use to see what node is actually taking requests at a certain time? What I want to determine is what the actual active node is.
I want to host 2 seperate SQL databases and wanted to know if it would be possible to run this in an active active cluster config which each database running on a different server.
The clustering would be there in the event of failure of one of the servers but for normal operation the two sql instances would be completely seperate.
Is this configuration possible and would this give the best performance and resiliance from a 2 server setup.
Help, I have an active/active cluster with SQL2k5 Ent with SP2 installed on node1 that is currently running live apps, I need to add the 2nd node to have fail over functionality but if I use the Change Install from Add or Remove Programs on the primary node to add the 2nd node I get the following error.
"The File 'c:....SqlRun_SQL.ms' is not a valid installation package for the product Microsoft SQL Server 2005(SQL2K5VVS01). Try to find the installation package 'SqlRun_SQL.msi' in a folder from which you can install Microsoft SQL Server 2005(SQL2K5VVS01).
No I assume this is because node 1 has had service pack two applied. Does anyone have instructions how I can add node two without having to completely uninstall Node 1, as the doc€™s with SQL2005 SP2 say it can not be removed, a complete uninstall of 2005 must be done???
I have an active/active cluster and the second node failed and could not start all the instances are intact on the first node. Now we have built the second node and joined to the cluster group as well.
I am sure we dont need a install as all the instances are there so anyone know where I need to join the SQL cluster to talk to both the nodes
Anyone know of any differences in an active/active cluster and an active/passive cluster that would cause an application to work on an active/passive environment but not an active/active environment?
1. is it possible to have both sql server 2000- and 2005 on a 3 node active/active/active cluster 2. if not is is possible to have sql server on an active/active/active cluster
I invoke xp_cmdshell proc from inside a stored procedure on a 2-node active/passive SQL 2005 SP2 Standard cluster. Depending on which server the xp_cmdshell gets executed on I need to pass different arguments in the shell command. I thought I could use host_name() function to get the runtime process server, however, I am finding that it's not behaving correctly. In one example I know my active node is server2, but the host_name() function is returning server1. The only thing that I could possible explain this is that the MSDTC cluster group is not always on the same active node as the SQL server group and in the case I am talking about the cluster groups are in this mode (differnet nodes). Does the xp_cmdshell get executed by the SQL active node or the MDTC active node? And what is the best way to find out which server is going to run my xp_cmdshell?
Thanks.
Edit:
Perhaps another by product of this is that if I run select host_name() from the Studio Management query window i get different results depending on which server I am running the Studio Management on. On server1 I get server1 and on server 2 I get server 2, all the while server2 is the active node. I need a different function that will always let me determine the correct server that'll be running the xp_cmdshell...
Edit 2: I guess I could determine the running host inside the command shell itself, but I am curious to see if i can do it (cleaner) from SQL.