DTC - Transaction Context In Use By Another Session
Hi
I have a master package that executes a series of sub packages. The master package is run from a SQL Agent job. The packages are reading from and writing to two databases on the same instance of SQL Server 2005.
If I set the Execute Package Tasks for the sub packages without any precedence constraints between them and set TransactionOption = Required at the master package level (and supported from there downwards) I get the following errors.
The event log shows me:
The SSIS Runtime has failed to enlist the OLE DB connection in a distributed transaction with error 0x8004D00A "Unable to enlist in the transaction.".
Running a SQL Profiler trace shows me:
Error: 3910, Severity: 16, State: 2
Transaction context in use by another session.
This problem is well documented and seems to go back to DTS in SQL Server 7.0 . . . see http://support.microsoft.com/?scid=kb;en-us;279857&spid=2852&sid=150
I can get round it by setting precedence between the sub packages - making them run one at a time solves the problem. But then we don't get the performance benefits of running the packages concurrently. Does anyone have any other solutions.
TIA . . . Ed
View Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
Transaction Context In Use By Another Session
Hello MSDN Forums, We've run into this problem regarding transactions and have been unable to resolve it after several hours of searching and troubleshooting. We're hoping someone here can help. We have a Sequence Container (IsolationLevel = ReadCommitted, TransactionOption = Required) containing several Data Flows. The final Data Flow (IsolationLevel = ReadCommitted, TransactionOption = Supported) in the Sequence Container has a few branches, and could potentially have multiple queries being run on the SQL server at once. All of the SQL connection tasks and Lookups in this Data Flow are using the same Connection Manager (Native OLE DBSQL Native Client), which connects to a SQL Server 2000 DB, which has DTC installed. We get the following messages when we attempt to run this package. Note that these errors only occur intermittently, and usually when processing large volumes of data. An OLE DB error has occurred. Error code: 0x80040E14. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E14 Description: "Transaction context in use by another session.". OLE DB error occurred while fetching parameterized rowset. Check SQLCommand and SqlCommandParam properties. The ProcessInput method on component "Lookup Task A" (3353) failed with error code 0xC0208253. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. The ProcessInput method on component "Lookup Task B" (3261) failed with error code 0xC0208253. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. After doing some additional testing in a very basic package, we found that we could not perform multiple concurrent Lookups within a Data Flow at all, with a SQL Server 2000 DB. When we performed the same test on a SQl Server 2005 DB, it seemed to work fine. However, switching our target DB over to SQL Server 2005 is not an option. We have read the article posted by Microsoft here: http://support.microsoft.com/kb/q279857/, but we are not sure if it applies.
View Replies !
View Related
Transaction Context In Use By Another Session.
I'm having a SP1 on server A. This procedure has a begin trans and a commit. In this procedure i'm inserting data into tables. This data is provided by an extrenal app in staging tables. On the tables i'm inserting data on i'm having triggers that again are starting a SP2. I'm using a cursor on the inserted table to achieve this. The SP2 only insert a record on a table that is on a linked server. For testing reasons at this moment this is my dev machine too. The error 'Trans ... ' pops up .... Any suggestions .. Kind Regards, Harry
View Replies !
View Related
Transaction Context In Use By Another Session Error
I have written a stored procedure that calls a C# class. The sp is called by a trigger on table A. The class has 2 methods. Method 1 is the main call from the stored procedure. Inside it, it sets a connection to the db. Then it calls another private method which has it's own connection and returns a dataset so that I can close that connection by the end of the method. When I execute the sp from within sql management studio, it runs just fine. But when being called from the trigger, I get the "transaction context in use by another session error" error. I read that I needed to wrap my 2nd connection in ... using (new TransactionScope(TransactionScopeOption.Suppress)){ open conn here, do work, etc.} I've tried that and I still get the same error from the trigger. Anyone know what else I can try? Thanks.
View Replies !
View Related
Error: Transaction Context In Use By Another Session
I am programming in ASP and SQL server. I am using this tag <%Transaction=Required%> to do the transaction. And it woks well, but the problem is that sometimes I get this error: "transaction context in use by another session"... It's really weird because it only happens in the same row. If choose this row to be shown I get that message, but if choose another row I get result with no error. And if take out the tag <%Transaction... I don't get any error. I've searched in other forums about this error, and one guy claims that there is a bug in the MTS and there is no way to solve the problem.
View Replies !
View Related
Transaction Context In Use By Another Session. (Continued)
A while ago i opened a thread on this issue, the collegue who took over the app closed the issue but the problem was not solved. Now that i'm back in track on this i will open a new issue. On Database A we want to update a record. In the update trigger we want to log this update to another database. In the currect setup Database B is on the same server. The trigger on table aa calls this procedure ALTER PROCEDURE [dbo].[SYNC_SDW_OLAP] @COMP_ID VARCHAR(5), @COU_ID VARCHAR(3), @ZZ_CLASS VARCHAR(5), @ZZ_ORIGIN CHAR, @ZZ_DATE SMALLDATETIME, @ZZ_INT BIGINT, @ZZ_NVARCHAR NVARCHAR(MAX), @ZZ_FLOAT FLOAT AS BEGIN SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; BEGIN DISTRIBUTED TRANSACTION TR_SYNC; INSERT INTO OLAPDB.SDW_OLAP.XX.UPLOADS (COMP_ID, COU_ID, ZZ_CLASS, ZZ_ORIGIN, ZZ_DATE, ZZ_INT, ZZ_NVARCHAR, ZZ_FLOAT) VALUES (@COMP_ID, @COU_ID, @ZZ_CLASS, @ZZ_ORIGIN, @ZZ_DATE, @ZZ_INT, @ZZ_NVARCHAR, @ZZ_FLOAT); COMMIT TRANSACTION TR_SYNC; END; Each time we try to update a record this error (Transaction co...) is raised. How can we avoind this ....
View Replies !
View Related
Transaction Context In User By Another Session
Im using SQL Server 2000 sp2 for ASP application on windows server 2003 sp2. Im getting an error 'Transaction context in user by another session'. I have not at all used BEGINTRANS / committrans , No Insert / Update statements. the kind of SQL statements that i was using in that page load is only "SELECT statements" Can any one give me answer how to get rid of this. I have used only one connection object. and result set as a loop containing few more result sets. But I m sure they are so complex statements to block the SQL server transactions. Awaiting for reply..................
View Replies !
View Related
Error 3910: Transaction Context In Use By Another Session
Hi I am trying to use Visual Basic Dll's running under MTS to get data from a SQL Server 7.0 database. Whenever I have two or more queries executing under the same transaction, and they are fetching large volume of data, I get the following SQL Server error: "Transaction context in use by another session". The error does not occur with few rows. Any help would be appreciated. Thanks Pankaj Kumar (pkumar@paritek.com)
View Replies !
View Related
Error 3910 - Transaction Context In Use By Another Session
Problem: With autocommit OFF, distributed queries with joins or subselects between tables on a development server and a linked production server produce the following error: Server: Msg 3910, Level 16, State 1, Line 1 Transaction context in use by another session. The queries run fine when 1. autocommit is turned ON, or 2. autocommit is OFF and the queries reference a copy of the production database that is made to reside on the same development server, i.e. the link to the production server is not exercised. Software configuration: Microsoft SQL Server 7.00 - 7.00.623 (Intel X86) Nov 27 1998 22:20:07 Copyright (c) 1988-1998 Microsoft Corporation Standard Edition on Windows NT 4.0 (Build 1381: Service Pack 6) Where has Microsoft documented the requirement to set autocommit ON when executing distributed queries involving linked servers? Or, is this a known problem? If so, where is it documented? Thank you in advance for your assistance. Peter
View Replies !
View Related
Transaction Context In Use By Another Session Error In C# Sp From Trigger
I have a c# stored procedure that is being called from a trigger. When I execute it from management studio, it works just fine. But, when I update a record in the table that has the trigger that calls the sp, I get the error "transaction context in use by another session error". I've tried a few of the "fixes" that I found through searching, but so far nothing seems to work. What I've tried so far is... Removing the transaction from my code making sure my code is only using 1 connection setting XACT_ABORT ON Any other ideas? Thanks.
View Replies !
View Related
SSIS Error - Transaction Context In Use By Another Session
All I'm developing a package in SSIS reading data from two databases on a SQL 2000 server and moving the data (with some transformation) to a SQL 2005 server. I am executing the package on the 2005 box. The package must employ transactions and having configured MSDTC on both servers I still seem to get the abovementioned error when setting the TransactionOption value to required for the control. I do the following inside a Data-Flow-Task: Create and OLE DB Source connection that points to a connection manager configured against databaseA on the SQL 2000 server. The following SQL example applies: Select col1, col2...coln from databaseA.dbo.table1 Create and OLE DB Source connection that points to a connection manager configured against databaseB on the SQL 2000 server. The following SQL example applies: Select col1, col2...coln from databaseA.dbo.table1 Both of the OLE DB Source outputs are directed through a Union Transformation (since the structure of databaseA and databaseB are identical - only the data in each database is different). The output of the union is directed to a Multicast Transformation. The multicast directs it's output to two seperate OLE DB destinations. Destination1 - SQL Server 2000 table is populated with multicast output stream 1. Destination2 - SQL Server 2005 table is populated with multicast output stream 2. Both of the destinations above have their own connection managers. When I execute the data-flow-task I get a clutch of errors as follows. If I simply set the TransactionOption to 'NotSupported' or 'Supported' instead of 'Required', this task executes successfully. Also, if I split the task into two seperate data-flow tasks (ie: select from databaseA and write Destination1 in one data flow and select from databaseB and write to Destination2 in another data flow - the package will succeed). I have done many searches on MSDN/Technet/Google etc. to find a solution here. The bottom line is, I need to employ a transaction in this package and haven't been ab;e to get it working despite haviung broken the package down to bare bones and creating a dummy environment Error: 0xC0202009 at Insert Unprocessed Keys From DatabaseA & DatabaseB, Write Keys - SQL_DEST_2000 [104]: An OLE DB error has occurred. Error code: 0x80040E14. An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80040E14 Description: "Transaction context in use by another session.". Error: 0xC0202009 at Insert Unprocessed Keys From DatabaseA & DatabaseB, Write Keys - SQL_DEST_2000 [104]: An OLE DB error has occurred. Error code: 0x80040E37. An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80040E37 Description: "Transaction context in use by another session.". Error: 0xC004701A at Insert Unprocessed Keys From DatabaseA & DatabaseB, DTS.Pipeline: component "Write Keys - SOURCE" (104) failed the pre-execute phase and returned error code 0xC0202040. Thanks in advance David
View Replies !
View Related
BUG: Error 3910, &"Transaction Context In Use By Another Session&"
This is a(*) PERSISTANT(*) UNRESOLVED(*) ILL EXPLAINED PROBLEM WITH SQL SERVER.THE POSTED WORKAROUNDS DO NOT WORK.THE SUGGESTED SOLUTIONS ARE IDIOTIC AND BASICALLY MAKE EVERYTHINGWRITTEN ABOUT DTS USELESS!!!!Let me document:0) The problem: http://support.microsoft.com/defaul...b;EN-US;Q2798571) The thread on it goes on for years.2) Microsoft ( kb ) claims that its fixed in sql7sp3.3) Users of sql200sp3 ( me ) report it up to this day.4) This user has tried all the workarounds, is not using Data Pumps orDTS and THE PROBLEM IS STILL THERE:http://groups.google.com/groups?q=3...ng xa04&rnum=3HOW CAN THIS BE?IS DATA IMPORTING WITH RULES NOT A CENTRAL PART OF DATA MANAGEMENTCOULD MICROSOFT BE A MORE INEPT DATABASE CORPORATION.IF THEY FOOL ENOUGH PEOPLE INTO USING THEIR BUGGY PRODUCTS VIA LOWBALLPRICES ARE WE GOING TO BE LEFT WITH THE WORLD DATABASE ON THE PLANET???????
View Replies !
View Related
The Transaction Active In This Session Has Been Committed Or Aborted By Another Session.
Greetings, I'm running a website that uses ASP.NET/SQL2005 and the SqlTableProfileProvider. Periodically, I get this error: ** Events ** --------------- Event code: 3005 Event message: An unhandled exception has occurred. Event time: 10/16/2007 9:25:36 PM Event time (UTC): 10/17/2007 1:25:36 AM Event ID: 1c7dc43403ef45f18df695e86401651d Event sequence: 167 Event occurrence: 7 Event detail code: 0 Process information: Process ID: 3748 Process name: aspnet_wp.exe Account name: A64ASPNET Exception information: Exception type: System.Data.SqlClient.SqlException Exception message: The server failed to resume the transaction. Desc:3900000011. The transaction active in this session has been committed or aborted by another session. I'm baffled as to why this is happening. I haven't written any explicit procedures that use transactions, so I'm wondering if it's something in the membership/profile provider that is starting and failing to close the transaction. How do you go about tracing this? I have all the tools available (sql profilier etc), just no idea where to start... Do you know if the ASP.NET Membership provider uses transactions? I am NOT explicitly calling Profile.Save() after I set values..do I have to?
View Replies !
View Related
Error 8525: Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction.
Hi All I'm getting this when executing the code below. Going from W2K/SQL2k SP4 to XP/SQL2k SP4 over a dial-up link. If I take away the begin tran and commit it works, but of course, if one statement fails I want a rollback. I'm executing this from a Delphi app, but I get the same from Qry Analyser. I've tried both with and without the Set XACT . . ., and also tried with Set Implicit_Transactions off. set XACT_ABORT ON Begin distributed Tran update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.TRANSACTIONMAIN set REPFLAG = 0 where REPFLAG = 1 update TSADMIN.TRANSACTIONMAIN set REPFLAG = 0 where REPFLAG = 1 and DONE = 1 update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.WBENTRY set REPFLAG = 0 where REPFLAG = 1 update TSADMIN.WBENTRY set REPFLAG = 0 where REPFLAG = 1 update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.FIXED set REPFLAG = 0 where REPFLAG = 1 update TSADMIN.FIXED set REPFLAG = 0 where REPFLAG = 1 update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.ALTCHARGE set REPFLAG = 0 where REPFLAG = 1 update TSADMIN.ALTCHARGE set REPFLAG = 0 where REPFLAG = 1 update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.TSAUDIT set REPFLAG = 0 where REPFLAG = 1 update TSADMIN.TSAUDIT set REPFLAG = 0 where REPFLAG = 1 COMMIT TRAN It's got me stumped, so any ideas gratefully received.Thx
View Replies !
View Related
Setting A Schema Context For A Session
Is there a way to specify a given Schema as the currently active one for a given database session ? i.e. im looking for somthing like: Use Schema=<name> Execute Queries / Stored Procs, etc ..... I want all the Queries and Stored Procs to execute on the Schema set initially. I can't use the Default_Schema on the User to do this due to certain restrictions in the way we create users and Schemas. I know that i can always qualify the objects in the Queries with a Schema Name, but i have a requirement where the Queries need to be generic in nature and need to run on one of many identical schemas in the Database. Is this Possible in Sql Server? Any help will be greately appreciated. Thanks
View Replies !
View Related
SSIS, Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction.
I have a design a SSIS Package for ETL Process. In my package i have to read the data from the tables and then insert into the another table of same structure. for reading the data i have write the Dynamic TSQL based on some condition and based on that it is using 25 different function to populate the data into different 25 column. Tsql returning correct data and is working fine in Enterprise manager. But in my SSIS package it show me time out ERROR. I have increase and decrease the time to catch the error but it is still there i have tried to set 0 for commandout Properties. if i'm using the 0 for commandtime out then i'm getting the Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction. and Failed to open a fastload rowset for "[dbo].[P@@#$%$%%%]". Check that the object exists in the database. Please help me it's very urgent.
View Replies !
View Related
Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction.
Hi all, I've already read the thread by the same topic, but I found Kevin Yu's comment a bit confusing. I don't know how to solve my problem. I have two stored procedures in sql server. First one inserts into a bunch of tables so it has Begin Transaction and Commit in it. Second one just inserts into one table so it doesn't have the begin transaction statement in it. From my data access class in c#.net, I have a function which calls both of these stored procedures from within a "using transactionscope" block. So when it makes the call to the first stored procedure, it returns fine, but when it calls the second one, I get the above error. I think it has something to do with me declaring transactionscope in my application code, and then calling a stored procedure which also has its own begin transaction. But I don't know how to fix this. Any ideas? Thanks
View Replies !
View Related
Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction
I'm using TransactionScope object and it is giving me problems. The situation is like this. I've 2 tables in sql server express, say student and courses and other one studentcourse for courses a student has opted for. An aspx page displays list of users in listbox, when user chooses student, it fetches courses he has opted for and in the checkedlistbox (for courses) these courses are checked. Now when uses makes any changes to courses and clicks update button, i've two functions at backend first one removes the courses which were previously selected but now not selected in postback, next it inserts courses which was not selected first but now are in this postback. I use following code: protected void Update(object sender, EventArgs e) { /* get selections, existing courses etc. */ using(TransactionScope tscope=new TransactionScope()) { try { RemoveCourses(/*Student*/ s, /*IList*/ oldCourses, /*IList*/ newCourses); AddCourses(/*Student*/ s, /*IList*/ oldCourses, /*IList*/ newCourses); tscope.Complete(); } catch(Exception ex) { lblMessage.Text=ex.Message; } } } If any exception occurs during update and page is reload or I go to any other page where some data is fetched from sql server I get the exception: Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction Please help!
View Replies !
View Related
Context Connection Transaction
Hello Guys, I need some some clarifications on how Context connections and transactions inter operate in CLR. The context connection allows for ADO objects to be " running in the same transaction space". So the association to the current transaction is implied. So as long as I set for example my SqlCommand to use the context connection I am going to be running under the same transaction. SqlConnection sqlConn = new SqlConnection("context connection=true"); SqlCommand sqlComm = new SqlCommand("EXEC myCommand", sqlConn); I guess my ambiguity comes from the fact that the Transaction is not specifically specified. In addition what happens upon a trigger that for example watches and insert on a table? If the insert occurs under a transaction, I would assume that I will be also picking up that transaction in the CRL Trigger, thus the whole operation would seem atomic. Thank you, Lubomir
View Replies !
View Related
Using LINQ And Context Acts Like It Is In Transaction.
I am using VS2008 Team Edition under Vista with SQL Compact 3.5 I am trying to develop an app using C# and LINQ and take advantage of the Sync services. The problem is that everything seems to work but nothing ever really gets saved out to the local .sdf file. I have all the SQL commands logged to the the console and they seem fine. I have SubmitChanges() wrapped in a try/catch and no exceptions are thrown. When I requery the context for the data the new added rows do show up. If while the application is open, I go to VS2008 and query the file I just added to, I don't see the new rows. If I exit the application and try I still don't see them. If I restart the application the rows show up. If I exit the app and refresh the connection to the .sdf file in VS and then restart the application the inserted records are gone. They act exactly as if when I made my connection to the database I started a transaction (which I didn't do, at least no explicitly) that I never commit. Did I miss some basic point about opening a connection to SQL compact? I connect when the app launches and I store the context in a member variable of my class which doesn't go out of scope until the application quits. I tried creating a new connection in a local method right around the call to SubmitChanges() but it behaved the same. Below is the console output from adding the record and then updating it (two calls to SubmitChanges() ) INSERT INTO [Milestone]([Milestone_Key], [MilestoneType_Key], [Inspection_Key], [MilestoneDate], [Description], [RowVersion], [ModifiedOn], [ModifiedBy_Key], [CreationDate]) VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8) -- @p0: Input Guid (Size = 0; Prec = 0; Scale = 0) [74ec904a-0c8d-46e5-8bea-af066d2c2f79] -- @p1: Input Int32 (Size = 0; Prec = 0; Scale = 0) [3] -- @p2: Input Guid (Size = 0; Prec = 0; Scale = 0) [57702e12-e0d8-487e-bf80-8066bf9ebdd5] -- @p3: Input DateTime (Size = 0; Prec = 0; Scale = 0) [4/17/2008 6:50:52 PM] -- @p4: Input String (Size = 0; Prec = 0; Scale = 0) [] -- @p5: Input Binary (Size = 8; Prec = 0; Scale = 0) [] -- @p6: Input DateTime (Size = 0; Prec = 0; Scale = 0) [4/17/2008 6:50:52 PM] -- @p7: Input Int32 (Size = 0; Prec = 0; Scale = 0) [0] -- @p8: Input Int64 (Size = 0; Prec = 0; Scale = 0) [0] -- Context: SqlProvider(SqlCE) Model: AttributedMetaModel Build: 3.5.21022.8 SELECT [t0].[Milestone_Key], [t0].[MilestoneType_Key], [t0].[Inspection_Key], [t0].[MilestoneDate], [t0].[Description], [t0].[RowVersion], [t0].[ModifiedOn], [t0].[ModifiedBy_Key], [t0].[CreationDate] FROM [Milestone] AS [t0] WHERE [t0].[Inspection_Key] = @p0 ORDER BY [t0].[MilestoneDate] -- @p0: Input Guid (Size = 0; Prec = 0; Scale = 0) [57702e12-e0d8-487e-bf80-8066bf9ebdd5] -- Context: SqlProvider(SqlCE) Model: AttributedMetaModel Build: 3.5.21022.8 The thread 0x2604 has exited with code 0 (0x0). UPDATE [Milestone] SET [Description] = @p7 WHERE ([Milestone_Key] = @p0) AND ([MilestoneType_Key] = @p1) AND ([Inspection_Key] = @p2) AND ([MilestoneDate] = @p3) AND ([RowVersion] IS NULL) AND ([ModifiedOn] = @p4) AND ([ModifiedBy_Key] = @p5) AND ([CreationDate] = @p6) -- @p0: Input Guid (Size = 0; Prec = 0; Scale = 0) [74ec904a-0c8d-46e5-8bea-af066d2c2f79] -- @p1: Input Int32 (Size = 0; Prec = 0; Scale = 0) [3] -- @p2: Input Guid (Size = 0; Prec = 0; Scale = 0) [57702e12-e0d8-487e-bf80-8066bf9ebdd5] -- @p3: Input DateTime (Size = 0; Prec = 0; Scale = 0) [4/17/2008 6:50:52 PM] -- @p4: Input DateTime (Size = 0; Prec = 0; Scale = 0) [4/17/2008 6:50:52 PM] -- @p5: Input Int32 (Size = 0; Prec = 0; Scale = 0) [0] -- @p6: Input Int64 (Size = 0; Prec = 0; Scale = 0) [0] -- @p7: Input String (Size = 0; Prec = 0; Scale = 0) [added a record then changed a field and re-saved.] -- Context: SqlProvider(SqlCE) Model: AttributedMetaModel Build: 3.5.21022.8
View Replies !
View Related
SQL Server Session State - Using A 1.1 Database Schema For 2.0 Session State Storage
The 2.0 version of ASPSTATE is slightly different than the 1.1 version in that one table has one additional column and another table uses a different data type and size for the key. The 2.0 version also has a couple additional stored procedures. We'd like to manage just one session state database if possible so we're trying to figure out if Microsoft supports using the new schema for 1.1 session state access (it seems to work, but our testing has been very light). Is there any official support line on this? If not, can anyone comment on whether or not you'd expect it to work and why? Thanks.
View Replies !
View Related
DB Context In Sps
Why does the database context change for the DB_NAME() function but not for for sysfiles? I've tried this on 7.0 (sp2 & sp3) and 2000. I was trying to write a stored procedure that would generate the SQL to detach and then re attach a database or all datbases on a server without the log file. I got it to work using a ##temp table and Exec (@sqlstring) but the code is very ugly and hard to maintain (a lot of quotes). I've included a simple stored proc to demonstrate the problem. Are there any ways to get this proc to work without resorting to building a string and executing it? Is there a reason SQL server behaves this way? I tried the proc with recompile and also omitting the dbo. before sysfiles (with and without recompile) the results were the same. CREATE PROCEDURE dbo.sp_jsw_test AS SET NOCOUNT ON SELECT DB_NAME() as current_db, name, filename FROM dbo.sysfiles I execute the following SQL: USE pubs go EXEC master.dbo.sp_jsw_test go EXEC pubs.dbo.sp_jsw_test go EXEC Northwind.dbo.sp_jsw_test go Here are my results: current_dbnamefilename ------------------------------------------- mastermaster D:MSSQL7datamaster.mdf mastermastlog D:MSSQL7datamastlog.ldf current_dbnamefilename ------------------------------------------- pubsmaster D:MSSQL7datamaster.mdf pubsmastlog D:MSSQL7datamastlog.ldf current_dbnamefilename ------------------------------------------- Northwindmaster D:MSSQL7datamaster.mdf Northwindmastlog D:MSSQL7datamastlog.ldf
View Replies !
View Related
Session
Does Session term exist in SQL Server?If yes, when it creates, how can monitor it. And where does itsinformation store?Thanks alot
View Replies !
View Related
Session
Hi all, I need some solution.. When i execute a program it first deletes all datas from a 'X' table .Then fetches data from various other tables and inserts into this 'X' table.I finally generate a report from this 'X' table. Now the problem is, USER 1 : Executes the program - Datas in 'X' table got deleted and filled up with new data.Report is getting processed..... USER 2 : Executes the same program - Datas in the same 'X' table got deleted and filled up with new data.Report is getting processed.....
View Replies !
View Related
Session
Hi all, I need some solution.. When i execute a program it first deletes all datas from a 'X' table .Then fetches data from various other tables and inserts into this 'X' table.I finally generate a report from this 'X' table. Now the problem is, USER 1 : Executes the program - Datas in 'X' table got deleted and filled up with new data.Report is getting processed..... USER 2 : Executes the same program - Datas in the same 'X' table getting deleted .. So the report process of USER 1 got affected. Solution 1 : Using IP address of local machine i solved the problem.But i need a concrete solution for this ..something related to sessions.. CAN ANYONE HELP ?? Thanx and Regards Prabhu
View Replies !
View Related
ASP.NET 2.0 ASP.NET Session HELP!
Im having a few problems with displaying my SQL reports externally in a classic ASP Page. This is my set up. I have an SQL 2005 report (which works perfectly) This is being viewed in an ASP.NET 2.0 VB Page that uses the report viewer control (which works perfectly) Then im using an iFrame in a Classic ASP page to view the ASP.NET page. (which is where my problem lies) This set up I cannot change as i am trying to intergrate a new service into an existing application. Normal ASP.NET applications work perfeclty fine, its just the report that Im having problems with. My problem with the report view is this, I have created a drill down report that goes down into several layers of granularity, however, where the drill down plus sign that lets you see the other levels of the report has been replaced with the missing image sign, the one with the red cross. When I click the button, the button makes the page time out and I dont get an error page but a white page with "A SP.NET session has expired" I have tried many things such as cookieless sessions, setting the ip to 127.0.0.1, authentication modes etc and nothing seems to have worked Please can anyone help, I have been all over the internet and still havent found anything Thanks Anthony
View Replies !
View Related
UML: Context Diagram
I'm finding the context diagram for system's analysis and design a challenge. I'm trying to draw a logical data structure for the scenario below. I can't get past level 0, I have one external entity....Please take a quick look, any suggestions would be most welcome. LDS of Staff and Student Database. The University of Chicago accepts students on to both undergraduate and postgraduate courses. The UOC records student details, personal and the qualifications they have gained at A-level(or equivalent) and above. Students are required to have qualifications of A-level or above in-order to undertake any of its undergraduate courses. For a postgraduate course, students must have at least a bachelor’s degree. However some exceptions are made for mature students for undergraduate and post graduate courses. The student records are kept for ten years after thy have left the course before being removed from the main database and archived. A student records will be reinstated if the student enrols on a new course. All the courses are made up of modules. Some of the modules are taught to more than one course. Some courses allow electives, i.e. a student may choose to do some modules and not others, the student’s choice must be recorded. All lectures at the university belong to a department, e.g. physics, fine art, admissions, etc. but not staff in a department are lectures, there will e administration staff and researchers. One lectures is assigned as the “course leader�, the individual will deal with all the academic matters arising from the course. A lecturer will not be the course leader of more than one course at anyone time. The course leader is always from the same department that has responsibility for the course. Lectures may teach a module on any course. Usually a module is taught by one and only lecturer but there are exceptions. Each module has a number of assessments. Typically this is two assignments and an exam, although there are some variations. The details of each assessment and marks for each individual student are recorded. Each member of staff has a line manager to whom they are directly responsible. The line manager is of course another member o staff. The line managers of lectures and researchers are always more senior academics. The line manager of administration staff will be another administer for at lower levels but will be a departmental head for the more senior administrators. Each student is assigned a personal tutor from the lecturing staff. The lecturer concerned may change but only the current tutor is recorded on the database.
View Replies !
View Related
Not Permitted In This Context
Hi,I am having a SQL Server 2005 problem with my Insert statement. I amsending a command via my website to my database. It comes up with anerror I'll put below. The code is here:"INSERT INTO tblUsers (userName) VALUES ( userNameTest)"This is the error I get:The name "userNameTest" is not permitted in this context. Validexpressions are constants, constant expressions, and (in some contexts)variables. Column names are not permitted.Now, userName is a varchar field in the database. What is wrong?Kivak
View Replies !
View Related
Database Context
Hi, I am trying to create a block of sql statements that will read the sysdatabases table, and store the value of the database in a variable. I want to use a cursor to step through all these databases (excep of course the control databases). For each of the databases I want to run a backup log followed by dbcc shrinkfile. For dbcc shrinkfile, I need to change the database context. What I am finding is that I cannot use the variable to hold the database name. here is the code ------------------------- SET NOCOUNT ON DECLARE @db_name varchar(100) DECLARE @db_filename varchar(100) DECLARE list_dbs Cursor FOR select [name] from master..sysdatabases OPEN list_dbs FETCH NEXT FROM list_dbs into @db_name WHILE @@FETCH_STATUS = 0 BEGIN select name = @db_filename from @db_name..sysfiles backup log @db_name with no_log use @db_name dbcc shrinkfile (@db_filename, 25) FETCH NEXT FROM list_dbs into @db_name END CLOSE list_dbs DEALLOCATE list_dbs ----------------------- I get a syntax error where ever the @db_name is used (on the select and on the use). Any suggestions? Thanks, Jim
View Replies !
View Related
Context Search
Hello, I have a web application that I need to search based on what the user entered in the input box. e.g when the user enters in the box something like "Brain Boom" I need to search the column in the DB table where there is anything word like Brain or has Boom or all the above. How will I accomplish this? Thanks
View Replies !
View Related
Context Switch
There are some concept about context switch block me . ---executor: dbo create user u1 without login go create table t ( col int ) go create proc proc1 with execute as 'u1' as insert into t values(1) go exec proc1 I think proc1 can't be run successfully beacuse the executor of proc1 is u1 and I didn't grant any permission to user u1. So it will return a error message like The INSERT permission was denied on the object 't', database 'tempdb', schema 'dbo' To my surprise, the "exec p1" command could run successfully.. Why?
View Replies !
View Related
Dynamic Sql Context ...
Hi, I need to build up dynamically cursor and fetch variables in a script. I use exec(@sql) to declare the cursor and my hope was I could use the same method for doing the fetch. Unfortunately I run into a Must declare the scalar variable "@c1". Here's the part of the code: ... snippet DECLARE @c1 varchar(max) DECLARE @c2 char(3) DECLARE @c3 char(3) DECLARE @c4 char(3) DECLARE @c5 char(3) DECLARE @c6 char(3) DECLARE @c7 char(3) DECLARE @c8 char(3) DECLARE @c9 char(3) DECLARE @c10 char(3) DECLARE @c11 char(3) DECLARE @c12 char(3) DECLARE @c13 char(3) DECLARE @c14 char(3) DECLARE @c15 char(3) DECLARE @c16 char(3) DECLARE @c17 char(3) DECLARE @c18 char(3) DECLARE @c19 char(3) DECLARE @c20 char(3) DECLARE @c21 char(3) DECLARE @c22 char(3) DECLARE @c23 char(3) DECLARE @c24 char(3) DECLARE @sql VARCHAR(MAX) DECLARE @insert VARCHAR(MAX) DECLARE @fetch varchar(max) SET @sql ='DECLARE C1 CURSOR FOR SELECT * FROM OPENROWSET(' + @apo+@int_provider_name+@apo+ ',' + @apo+@int_provider_string+@apo + ',' + @apo+@int_query_string+@apo + ') FOR READ ONLY' PRINT @sql EXEC(@SQL) OPEN c1 set @fetch = 'FETCH c1 INTO '+@int_fetch print @fetch EXEC (@fetch) ... snippet Output: DECLARE C1 CURSOR FOR SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=C:work2007schenker.xls','SELECT * FROM [Datei$]') FOR READ ONLY FETCH c1 INTO @c1,@c2,@c3,@c4,@c5,@c6,@c7,@c8,@c9,@c10,@c11,@c12,@c13,@c14,@c15,@c16,@c17,@c18,@c19,@c20,@c21,@c22,@c23,@c24 Msg 137, Level 15, State 2, Line 1 Must declare the scalar variable "@c1". How can I declare the dynamically built 'fetch into' variables (@c1 etc.) so they are in the context of dynamic sql ? Thanks: Peter
View Replies !
View Related
Session Parameters
Hi, Can somebody tell me what's wrong with this statement or why the Session parameter is not working. <asp:SqlDataSource ID="datalist_SQL" runat="server" ConnectionString="<%$ ConnectionStrings:DatabaseConnectionString2 %>" SelectCommand="SELECT * FROM tbl_subProduct, tbl_material, tbl_product, tbl_subCategory, tbl_topCategory, tbl_topLevelProduct WHERE [tbl_subProduct].[numProductID] = [tbl_product].[numProductID] AND [tbl_product].[numTopLevelProductID] = [tbl_topLevelProduct].[numTopLevelProductID] AND [tbl_topLevelProduct].[numSubCategoryID] = [tbl_subCategory].[numSubCategoryID] AND [tbl_subCategory].[numTopCategoryID] = [tbl_topCategory].[numTopCategoryID] AND [tbl_material].[numMaterialID] = [tbl_product].[numMaterialID] AND @fldArray "> <SelectParameters> <asp:SessionParameter Name="fldArray" SessionField="ids_array" Type="Int32" /> </SelectParameters> </asp:SqlDataSource> Many Thanks
View Replies !
View Related
Return ID From SQL Into Session
How do you return the ID of an item to a Session in a ASP forum? I have a MS-SQL Server 2005 database. My table looks like this QuoteID, QuoteNumber, Date. In SQL: INSERT INTO table (QuoteNumber, Date) values ('123490WC1", '06/2/2008')DECLARE @ItemID INTSET @ItemID=IDENT_CURRENT('table') What I would like to do is return @ItemID to the ASP forum; I assume Session would be the best. After I get the @ItemID I have a Grid which I will to insert the Quote Items into. Thanks, marly
View Replies !
View Related
Session Variable Help!!!!!
Hi... I'm developing a web app with VS 2005 Beta and I do not know how to include a seasson variable value into my code. This is my code: Function GetData() As System.Data.SqlClient.SqlDataReader Dim sqlconn As System.Data.SqlClient.SqlConnection Dim SqlCommand1 As System.Data.SqlClient.SqlCommand Dim sqlRdr As System.Data.SqlClient.SqlDataReader sqlconn = New SqlConnection("SERVER=SRVR;UID=USR;Password=PWD;DATABASE=MyDatabase") sqlconn.Open() SqlCommand1 = New SqlCommand("MyStrProc", sqlconn) SqlCommand1.CommandTimeout = 1800 sqlRdr = SqlCommand1.ExecuteReader(CommandBehavior.CloseConnection) Return sqlRdr End Function MyStrProc is: CREATE PROCEDURE MyStrProc @MyVar int AS IF @MyVar IS NOT NULL BEGIN ................. ......t12.acct_nbr IN (@MyVar) ..... END GO The variable @MyVar get its value from user log info in login page, and create a session variable. My Question: How and where to call seasson variable @MyVar, because now I'm getting this error: Procedure 'MyStrProc' expects parameter '@MyVar', which was not supplied. Any help will be great. Tks
View Replies !
View Related
Get Data From SQL To Session
I'm new on ASP.NET 2.0Can anyone tell me how to get data from SQL to Session properties? In Classic ASP, it looks very simple as below.dim connset conn = server.createobject("adodb.recordset")rssql = "select myid, mypw from mydb where myid = '"& request("myid") &"' and mypw = '"& request("mypw") &"'"set rs = conn.execute(rssql)if rs.eof = true thensession("myid") = rs("myid")session("mypw") = rs("mypw")end if How to do the same things on ASP.NET?Many thanks!
View Replies !
View Related
New Session Inside SP?
Hi: I want to open a new session/connection inside the execution of a stored procedure. Is this possible ? I ask this because I need a new sesssion with its own transaction. Thanks, Rui Ferreira
View Replies !
View Related
Session Time Out
Hi, When the session is not under use, it says session time out. What is the time it waits for the activity to happen with server. Is that parameter configurable ? if so how. Thanks in advance.
View Replies !
View Related
Session Timeout?
Is it possible to change a vaule in a MSSQL DB after a set time? Basically I am trying to figure out the SP that would change a "state"/value in a DB after 1 hour. I don't need the command to run ever hour, I just want it to run and change a vaule that has been set for 1 hour. Backgound on what I'm doing. Basically I wrote an asp.net site that manages IP cameras, when 1 person loggs in they see 1 camera however the next person sees camera 2 (depending on thier membership in the DB.) instead of setting specific times in the DB or .net pages they can log in, I decided that it would be managed and that if you want to log in you would have to call in and an Admin would set your state to enabled in the DB. You can not log in unless your state is enabled. After 1 hour of viewing the camera I want your state to kick to disabled and boot them to the login page. I have all componets working except for the timeout in the DB. Is there a way I can change the state value after a set time? Any help with this would be awsome! Thanks and Cheers! -nick
View Replies !
View Related
Session Variable
Can we use session variable in reporting services.. say go to report -> properties and create a VB function that get ans set session variable.. If yes, how. If not, any workaround?
View Replies !
View Related
Asp.net Session Has Expired
Hi I have designed reports using SQL Server Business Intelligence Development Studio tool (Sql Server reporting service). I have uploaded these reports to report manager. I am displaying list of reports in tree view control, in my application. I am viewing report in Report Viewer control as per the report selection in tree view control, in same page. I am getting Server Error in '/Application_name' Application or ASP.NET session has expired error frequently while switching between various reports. Kindly provide me solution . Regards Sagayaraj Rayappan
View Replies !
View Related
Session Timeout
Hello, I am using SSRS as reporting toll. My report get refreshed every 3 minutes. My user want to expire the webpage once its ideal more then 120 Mins. I try to configure my IIS server but unable to do that. I am thinking since webpage is refreshed every 3 min. its never becoming ideal for IIS server. Kindly suggest any solutions! Thanks, Monika.
View Replies !
View Related
Transactions Over Session
Hi guys, I would like to manage the following: BEGIN TRANSACTION; SELECT * From SomeTable; INSERT INTO SomeTable (SomeData) VALUES(12); COMMIT TRANSACTION; This should be easy usually. However, we need to have each row/command executed individually (using the SqlDataSource object in ASP.NET). Is there a way how to make the transactions work over multiple executions? Thanks, Martin
View Replies !
View Related
|