Are Transactional Settings Used Only During Updates?

Jul 20, 2005

Hi,

In the Web application I am working on, data is read from a SQL Server
database. At any time, there are about 15 people browsing the web.

The SQL Server database is updated with new information once every
hour. The update takes a couple of minutes. The isolation level during
the update is so to Serialazable so that the front-end does not get
any incorrect data.

Now, here is my problem. When the web page is being loaded, the server
side ASP.NET code uses several SELECT statements at multiple places.
For various design reasons, these SELECT statements cannot be combined
into a single statement. As a result, it may happen that during the
page load, we get some data before an update and some data after an
update.

I am wondering if I must used a transactional lock even for the Web
application although technically it is not updating the database.

Also, after playing with various transactional settings, I noticed the
following behavior for the readers when a writer enters a transaction:

1. If the reader app has not yet executed the query, the call to query
execution blocks until the writer has done its job.
2. If the reader app has already begun executing the query, the call
is not blocked and SQL Server provides the needed isolation.

I do not wish to block the readers while the update is going on.
Ideally, I would like it to be such that even if the writer is
updating, the readers must continue to get the old data, that is,
until the writer commits the update. However, I did not find any
isolation settings that would let me achieve this non-blocking
behavior. Am I missing something?

Thank you in advance for enlightening me.

Pradeep

View 1 Replies


ADVERTISEMENT

Problem Pushing Subscriber Updates To Publisher In Transactional Replication

Apr 15, 2004

I have a primary and secondary servers both running Windows 2000 SP3 with SQL 2000 SP3. I have set up transactional replication with the primary server as publisher and the secondary server has the distributor and subscriber DB. I am testing the scenerio where my primary server goes down and I have to make updates to the secondary server until my primary server comes back up. I am able to update my subscriber database and the transactions go into the MSreplication_queue table to be pushed back to the primary when it comes back up. When I bring the primary server back up and start the queue agent job it starts pushing the transactions over and then stops after 4 or 5 transactions with the error "Failed while applying queued message to publisher". I have attached part of the log file for the agent below


dbserver2.Old_Processing: {? = call dbo.sp_getsqlqueueversion (?, ?, ?, ?)}
dbserver2.Old_Processing: {? = call dbo.sp_replsqlqgetrows (N'DBSERVER', N'Old_Processing', N'Old_Processing')}
[4/15/2004 3:59:47 PM]dbserver2.distribution: exec dbo.sp_helpdistpublisher @publisher = N'DBSERVER'
Connecting to DBSERVER 'DBSERVER.Old_Processing'
DBSERVER.Old_Processing: {? = call dbo.sp_getqueuedarticlesynctraninfo (N'Old_Processing', 21)}
SQL Command : <exec [dbo].[sp_MSsync_ins_IQ2KProcSystem_1] N'dbserver2', N'Old_Processing', '072175', '2004-03-19 00:00:00.000', 1>
DBSERVER.Old_Processing: {? = call dbo.sp_getqueuedarticlesynctraninfo (N'Old_Processing', 15)}
SQL Command : <exec [dbo].[sp_MSsync_ins_NightlyProcess_1] N'dbserver2', N'Old_Processing', '072175', '2004-03-19 00:00:00.000', '2004-04-15 15:56:44.623000000', 'Begin ProcessIQ2KSystem', 'AB14E5D7-C81D-4A39-A8F5-51F1C48227B0', '17E5D98F-EDF0-41D0-9991-97511B850720', 1>
SQL Command : <exec [dbo].[sp_MSsync_upd_IQ2KProcSystem_1] N'dbserver2', N'Old_Processing', '072175', '2004-03-19 00:00:00.000', 1>
DBSERVER.Old_Processing: {? = call dbo.sp_getqueuedarticlesynctraninfo (N'Old_Processing', 7)}
SQL Command : <exec [dbo].[sp_MSsync_upd_TheatreProcess_1] N'dbserver2', N'Old_Processing', '072175', 1, '2004-03-19 00:00:00.000', 1, NULL, '79A114D6-FF31-4E37-AC2D-90C0A0114F40', '072175', 1, '2004-03-19 00:00:00.000', 0, NULL, 'AF61A098-44A3-45D7-B25B-E8EA9CD464A1', 0x2800, 1>
Failed while applying queued message to publisher
Disconnecting from DBSERVER 'DBSERVER'
Worker Thread 692 : Task Failed
Disconnecting from dbserver2 'dbserver2'
Processed 3 queued trans, 3 cmds, 0 conflicts
Queue Reader aborting

In the sql server logs I am getting this message:
Replication-Replication Transaction Queue Reader Subsystem: agent Repl Queue Reader failed. Failed while applying queued message to publisher.
Error: 14151, Severity: 18, State: 1

Any help would be greatly appreciated

View 4 Replies View Related

How To Replace The Existing Records In The Table From Updates In The Transactional File

Sep 13, 2007



Hi i am getting a weekly transaction file which has two columns trans code and trans date to indicate whether the record is changed, added or modified . and the monthly master file contains blank in these two fields.

How do i update the row coming from the transaction file in the tables which contain the rows from the master file .

to better explain the example is
Master File

ID Name AGE Salary Transcode TransDate
2 dev 27 2777

Transaction File indicating change

ID Name AGE Salary Transcode TransDate
2 dev 27 24444 C 08072007


the ouput should be

2 dev 27 24444 C 08072007

replacing the existing row in the table(updating the whole row)

i have 50 columns in my table and based on the two fields i should replace the rows exisiting in table and if ID doesnot match exist just add them as a new row.

what transformation should i use .... to replace all the columns which have matching ID in table to the current record from trans file and if there doesnt exist matching id just add them as new row.

Thanks...

View 1 Replies View Related

Firing A Trigger When A User Updates Data But Not When A Stored Procedure Updates Data

Dec 19, 2007

I have a project that consists of a SQL db with an Access front end as the user interface. Here is the structure of the table on which this question is based:




Code Block

create table #IncomeAndExpenseData (
recordID nvarchar(5)NOT NULL,
itemID int NOT NULL,
itemvalue decimal(18, 2) NULL,
monthitemvalue decimal(18, 2) NULL
)
The itemvalue field is where the user enters his/her numbers via Access. There is an IncomeAndExpenseCodes table as well which holds item information, including the itemID and entry unit of measure. Some itemIDs have an entry unit of measure of $/mo, while others are entered in terms of $/yr, others in %/yr.

For itemvalues of itemIDs with entry units of measure that are not $/mo a stored procedure performs calculations which converts them into numbers that has a unit of measure of $/mo and updates IncomeAndExpenseData putting these numbers in the monthitemvalue field. This stored procedure is written to only calculate values for monthitemvalue fields which are null in order to avoid recalculating every single row in the table.

If the user edits the itemvalue field there is a trigger on IncomeAndExpenseData which sets the monthitemvalue to null so the stored procedure recalculates the monthitemvalue for the changed rows. However, it appears this trigger is also setting monthitemvalue to null after the stored procedure updates the IncomeAndExpenseData table with the recalculated monthitemvalues, thus wiping out the answers.

How do I write a trigger that sets the monthitemvalue to null only when the user edits the itemvalue field, not when the stored procedure puts the recalculated monthitemvalue into the IncomeAndExpenseData table?

View 4 Replies View Related

How Can I Do A Multiple Insert Or Multiple Updates Or Inserts And Updates To The Same Table..

Oct 30, 2007

Hi...
 I have data that i am getting through a dbf file. and i am dumping that data to a sql server... and then taking the data from the sql server after scrubing it i put it into the production database.. right my stored procedure handles a single plan only... but now there may be two or more plans together in the same sql server database which i need to scrub and then update that particular plan already exists or inserts if they dont...
 
this is my sproc...
 ALTER PROCEDURE [dbo].[usp_Import_Plan]
@ClientId int,
@UserId int = NULL,
@HistoryId int,
@ShowStatus bit = 0-- Indicates whether status messages should be returned during the import.

AS

SET NOCOUNT ON

DECLARE
@Count int,
@Sproc varchar(50),
@Status varchar(200),
@TotalCount int

SET @Sproc = OBJECT_NAME(@@ProcId)

SET @Status = 'Updating plan information in Plan table.'
UPDATE
Statements..Plan
SET
PlanName = PlanName1,
Description = PlanName2
FROM
Statements..Plan cp
JOIN (
SELECT DISTINCT
PlanId,
PlanName1,
PlanName2
FROM
Census
) c
ON cp.CPlanId = c.PlanId
WHERE
cp.ClientId = @ClientId
AND
(
IsNull(cp.PlanName,'') <> IsNull(c.PlanName1,'')
OR
IsNull(cp.Description,'') <> IsNull(c.PlanName2,'')
)

SET @Count = @@ROWCOUNT
IF @Count > 0
BEGIN
SET @Status = 'Updated ' + Cast(@Count AS varchar(10)) + ' record(s) in ClientPlan.'
END
ELSE
BEGIN
SET @Status = 'No records were updated in Plan.'
END

SET @Status = 'Adding plan information to Plan table.'
INSERT INTO Statements..Plan (
ClientId,
ClientPlanId,
UserId,
PlanName,
Description
)
SELECT DISTINCT
@ClientId,
CPlanId,
@UserId,
PlanName1,
PlanName2
FROM
Census
WHERE
PlanId NOT IN (
SELECT DISTINCT
CPlanId
FROM
Statements..Plan
WHERE
ClientId = @ClientId
AND
ClientPlanId IS NOT NULL
)

SET @Count = @@ROWCOUNT
IF @Count > 0
BEGIN
SET @Status = 'Added ' + Cast(@Count AS varchar(10)) + ' record(s) to Plan.'
END
ELSE
BEGIN
SET @Status = 'No information was added Plan.'
END

SET NOCOUNT OFF
 
So how do i do multiple inserts and updates using this stored procedure...
 
Regards
Karen

View 5 Replies View Related

Combining Peer-to-Peer Transactional Replication With Standard Transactional Replication

Dec 1, 2006

Hello,

I'm interested in combining the Peer-to-Peer Transactional Replication and Standard Transactional Replication to provide a scale out solution of SQL Server 2005. The condition is as follows:

We may have 10 SQL Server 2005 (1 Publisher + 9 Subscriber) running transactional replication in the production environment and allow updates in subscribers. To offload the loading of the publisher, we plan to have 2 Publisher (PubNode1 and PubNode2) using Peer-to-Peer Transaction Replication and the rest 8 subscribers will be divided into 2 groups. The subscribers 1-4 (SubNode1, SubNode2, SubNode3, and SubNode4) will be set to be standard transactional replication subscribers of PubNode1, and the rest 4 subscribers (SubNode5, ..., SubNode8) will be set to be standard transactional replication subscribers of PubNode2.

Is it possible to setup above 2 Publisher + 8 Subscriber topology?
Also, could we set the 8 subscribers with updatable subscriptions to achieve each node is updatable?

We do not plan to set all the 10 nodes using Peer-to-Peer Transactional Replication as it is necessary to make sure n*(n-1)/2 (i.e. 45) peer-to-peer connections is reliable. It seems that the maintenance cost is high if the servers are not in a LAN and the topology is very high coupling. So we prefer to divide the 10 nodes into 2 groups and reduce the cost of each node to maintain the connections to all other sites.

That's the scenario.

Any feedback is welcome and appreciated.

Thanks,
Terence

View 4 Replies View Related

NT Settings For SQL 7.0

Feb 24, 2000

View 1 Replies View Related

Awe Settings

May 6, 2002

I am running AWE on SQL 2000 (the server has 8 gig of RAM). I have the SQL Server set to use a max of 6 gig. The server hung unexpectedly (SQL showed no errors or signs). Has anyone had any problems with using AWE, and or any suggestions or changes I might need to do?
Thanks

View 1 Replies View Related

Installation Settings

Jul 26, 2000

Hi,
Can i check installation settings for SQL Server 6.5 ... like what sort order id. has been choosen etc. ? by any query ?

Thanks

View 1 Replies View Related

Collation Settings

Jul 16, 2002

New SQL2000 installation into which I've copied data from multiple SQL7 installations. Some of the databases I've copied over from a SQL7 server with code page 850, sort order/collation 42, using the detach-copy mdf/ldf-attach procedure outlined elsewhere on this site (thank you). Other databases have been DTS'd from another SQL7 server with code page 850, sort order/collation 44.

In the end I want all databases to be in the default Latin1_General_CI_AI collation I've chosen for my installation.

I'm off to immerse myself in collation papers and alter database documentation from BOL, but was hoping someone could enlighten me in a less painful way.

Thanks,

Al

View 2 Replies View Related

Regoinal Settings

Mar 27, 2008

Hi all

I've got a problem with an American software vendor, who's asked me to check and adjust the regional settings within SQL Express 2005, installed on an XP SP2 pc

I'm scanning meta data into this database

If I enter a date field with a UK date format, I get an error in the SQL logs

If I enter a date field with a US date format, everything is fine

The XP box is setup with all UK region settings

I've been told that my SQL install should automatically use the region settings from whatever OS that it's installed on

I've checked everywhere within SQL, and it all looks to be setup with UK region settings

I suggested to the software vendor that the problem lies with their software

Can anyone suggest if I've missed anything, or where I should be checking my region settings within SQL?

Kind Regards

Tonasis

View 2 Replies View Related

Database Settings

Apr 14, 2008



From the sql server management studio i cannot see database properties

logical file name of mdf, location of the mdf
logical file name of ldf, location of the ldf
what setup should i change to see the properties.

View 5 Replies View Related

SQL SERVER SETTINGS

Sep 9, 2006



When SQL Server and Web site are both on same machine,

it runs fine, can get data and display in web page.

but when trying to get data from remote SQL Server, it gives error.

What's the setting for SQL server configure and security settings

in different versions?



MS SQL 2000 | MS SQL 2005

==============================================

Framework 1.x ? | ?

Framework 2.0 ? | ?



Thanks alot.

Please provide some setting help for the ?

View 4 Replies View Related

Default Rs Settings

Jun 26, 2007

is there a simple manual how to setup RS.



with the administrators group im able to view my reports. but normal users are not able to view anything. they can enter reporting services, but not open a report.

View 1 Replies View Related

SQL Configuration Settings Being Ignored?

Sep 13, 2006

I am sure I'm being blind here (it wouldn't be the first time - and won't be the last time).

I have a package that retrieves some values from SQL table to allow me to dynically create an email message, so it retrieves To Addresses, From Address, Header, Body from a table, populates variables, and uses expressions to assign those to the SEND MAIL TASK.

That is working (after a bit of head/wall/banging to get my default virtual SMTP server running locally).

Now I am trying to make the SMTP Server Name dynamic. The Property SMTPConnection specifies the SMTP Connection Manager to use, and not the server, so it doesn't seem as though I can configure a property on the SEND MAIL TASK to achieve this.

Now I'm focussing on using SQL Package Configurations to try and drive this. As I see it, just like XML configurations, if you change a value in the configuration source, then when the package runs, it get's that value, and uses it.

I have change the configuration value (outside of the package). I confirm it is actually changed by running a SQL Task that gets the value from the configuration table, and view the value assigned to the variable in watches. The value returned is a different value (in my case I changed it to an invalid servername), and yet the task still runs through successfully, using the previous SMTP servername.

huh?

View 4 Replies View Related

SQL 8 Password Settings

Sep 29, 2006

I wanted to know if there is a way to enforce security settings on SQL 8 Server.  Specifically password lengths, expiration,e tc. These servers run on a Windows Platform, so if it is not possible to enforce passwords at the database level can the windows passwords parameters be enforced for the server.

Also, how would I be able to find the last changes made to the tables within the database. 

View 1 Replies View Related

Site Settings

Oct 16, 2006



I need to place some site settings in my Report Manger.But in my Report Manager there is no Site Settings Icon.Is this installation problem please help me.

View 3 Replies View Related

Where And How Can Timeout Settings Be Changed

Nov 6, 2006

I have a page that uses an SQLDataSource web control to populate a GridView control.  The SQLDataSource control uses three parameters, one of which is a text string (varchar(50)).  I get timeout expired exceptions when I run the page with two specific string values, yet when I run the stored procedure in SqlSvr Management Studio, the procedure runs in 5 seconds and under 1 seconds.  Being rnew to ASP.NET 2.0 and .Net in general, I have no idea where this lag is occurring.  I would like to know two things:
1.  What is causing the lag that causes the timeout in ASP.NET 2.0.
2.  What can be done to adjust the timeout period SQLSVR, IIS, ASP.NET).
The underlying query is running as desired (considering the data it has to chew on).  For all other values, data is returned almost instantanious.  I can provide a copy of the query id need be.
 Truly appreciate any insight you can give me!

View 2 Replies View Related

Incorrect Settings Arithabort

Dec 3, 2007

INSERT [DELETE] failed because the following SET options have incorrect settings: 'ARITHABORT'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type methods.
On local dev machine with SQL Express DB everything works fine. Once moved to shared hosting environment (with adjustments to web.config), insert and delete stored procedures produce the above error.
Made sure that stored procedures SET ARITHABORT ON at the beginning and OFF at the end, without success. Even SET ARITHABORT ON at DB level without success.
Suggestions appreciated
 

View 2 Replies View Related

SQl Server Connection Settings

Dec 11, 2003

Hi all,

I am a newbie to .NET and MS SQL server. I am trying to connect to sql server d/b from my application files.

How should i open a connection from my system pc5 (where application/proj being developed) to SQL serevr which is installed on my server(server1). Both are in network.

I have installed sql client on my system(pc5) and created my d/b (MyDB) thru EM, now how can i create username & password for MyDB datbase.

I had installed ASP.NET Commerce server(from ASP.NEt site) on my system pc5 its working fine with accessing Commerce d/b from server1. I observed the string in web.config file of commerce application it is as follows.

<add key="ConnectionString" value="server=server1;database=Commerce;uid=CommerceUser;pwd=CommerceUser;" />


In the same way can i create Username and passsword for MyDB database, if so how should i do that. that should look like some thing like this..

<add key="ConnectionString" value="server=server1;database=MyDB;uid=MyDBUser;pwd=MyDBpass;" />
to do in this way i need to create username and pw for MyDB . How should i create username ansd pw for MYDB datase.

Pls help me out.

Thanks in adv
Kumar

View 3 Replies View Related

Changing ConnectionString Settings

Jun 5, 2006

Hello all. I created an app locally with VWD Express and moved it to to our server but I am getting the following error...
An attempt to attach an auto-named database for file D:WebApp_DataSurvey.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
This is the connectionstring from the web.config file used on the server. I did not change anything from the local copy.
<connectionStrings>
<add name="SurveyConnectionString1" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Survey.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
What settings do I need to change in order for this to work? Any advice is appreciated. Thanks.

View 1 Replies View Related

Changing Language Settings

Jan 23, 2004

Hi,

I was wondering how to change the language settings on SQL Server. The server is currently set to US English, and I was wondering how it is possible to change it to UK English. The Server Regional Settings are set to UK English.

Also, on a semi-related topic, does SQL Server store dates in a universal format, and then when data is requested does it 'translate' these dates into the format required by that particular regional setting?

Thank you for any input

Marman

View 1 Replies View Related

How To Change Search Settings

May 12, 2014

Using the Agentpress theme I have put together a client site that is fully functional, however the client has asked that the search query is altered slightly and i'm having trouble working out how to do it.Basically they want the search facility provide the following options:

1. Bedrooms searched for as 1+, 2+, 3+ and 4 or more.

2. Property availability to provide just 2 options - Available and Include Let Properties.

how to change the search settings to return this information.

View 2 Replies View Related

Changing The Language Settings

Apr 5, 2006

Hi all,

I need to change the Language Settings from my query analyser. Is it Possible???

If so, how ??

Thanks in advance

Regards,
satish.r
"Known is a drop, Unknown is an Ocean"

View 1 Replies View Related

Xp Pro Settings To Work With Replication

Dec 23, 2006

hi guys :( ive searched on all the topics here about replication. but now i am wondering what windows xp settings do i have to edit? i read something about dcom settings and changing permissions. what is the RIGHT way to share a file or whatever because the schema cannot be accessed for some reason. i need a whole list of things to do because things are not working out after i read the tutorials on other sites. please someone help me.

basically i need to have two servers that need to be replicating each other. i realized that the instances have to be named so i am just totally confused. ill even let anyone connect remotely to help me out if they want. or explaining will do fine. please! thanks guys!
happy holidays!

View 3 Replies View Related

Management Studio - Settings

Jan 15, 2008

Hi All - sorry for dumb question.

I changed a log-file growth from 10% to 10MB in November. Then had to do the same again today.

Is there anyway it could have (somehow) changed-back by itself?

View 3 Replies View Related

International Settings For SQL 2000

Feb 26, 2006

I will doing an installation of MS SQL 2000 that will be used by multilanguage web sites.The languages are Japanese, German and of course English.Currently I'm planning to install MS SQL 2000 standard version butafter reading some articles I'm considering the Enterprise version.Can someone shed some light on the advantages of using Enterprise vsStandard strictly from a language support perspective?Also, is there any caveats or other considerations that I should keepin mind to make sure that the developers have all they need to developthese multi language sites?Thanks in advance.

View 1 Replies View Related

Setting Up A Settings Table

May 10, 2006

I am creating an image gallery system, where there is an admin andmultiple users upload images. Each user is restricted to uploading 8images. Currently, I have this hard coded into a trigger. I wouldlike it to use a table field instead... one that the admin can changeon the fly. I want to call this table Settings, but I want to createinsert 1 record, and then block all subsequent INSERT statements(there's only going to be 1 setting) so that the Settings table willonly have 1 record in it for its entire lifetime. What's the best wayto do this?

View 2 Replies View Related

Settings Up A Connection With ODBC

May 25, 2007

ok im trying to set up an odbc connection to my database.
i am using MS SQL SERVER 2005 Express on my labtop that is running windows xp.

on the labtop i went into control panel - admin tools - data sources (odbc) and then under the user dns tab i added a sql server with these values in the fields
name: MyFoxData
Description: [i left empty]
Server: TESTINGSQLEXPRESS

then i hit next

then i have checked With Sql Server authentication using a login id and password entered by users.
i enter in my login id and password.
i then uncheck connect to sql server to obtain default settings.
i hit next and change default database to DNN445
and i leave everything else the way it is, before i save it i test the connection and it works fine.

I do the same exact steps on my desktop to try and connect to the SQL database on the labtop but for some reason i keep getting this message



Microsoft SQL Server ODBC Driver Version 03.85.1117

Running connectivity tests...

Attempting connection
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Specified SQL server not found.

TESTS FAILED!


any ideas?

View 4 Replies View Related

TCP/IP Settings In SQL Server 2005

Mar 17, 2008

I recently installed SQL Server on a machine running Windows Server 2003. Before it was on my desktop. When I checked the TCP/IP settings under configuration manager, I noticed it doesnt have anything for my IP address. I just have a entry for the 127.0.01 loopback address. I know when I had it installed on my desktop there was a entry for my IP address. Is this ok or did something go wrong and it didnt set the IP address? I can still login and access the databases fine from Managament Studio.

Also would it better to have the services run as a network service or a local service?

View 6 Replies View Related

How To Change The Language Settings Of An Rdl

Sep 6, 2007



Hi,

Can we change the language settings for a report by modifying the rdl code?

For example:- If my report is in English US, how do I change it to English UK?

Thanks in advance

View 1 Replies View Related

Settings For Printing Reports

Sep 26, 2006

Hi....We are generating reports in Excel and PDF and the reports are accessed from a web app interface..

the problem is that when the users print a report generated in Excel from the web app it prints in a veritcal split on paper...This is because the width exceeds the paper width....We do not want to redesign reports ...Is there any method to squeeze Excel data into the availiable page width ( This happens automatically in PDF so issues with it).....Can it be done in code ?

View 3 Replies View Related

Windows Application Log Settings

Jan 16, 2008

Is there a way to control some of the windows application log settings from within the logging process of a package. Specifically the 'source' parameter which comes out as 'SQLISPackage' which i'd like to be the actual name of the package which wrote to the log, and similarly 'Category' which comes out as 'none' and I'd prefer to assign something more meaniful ?

THX

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved