Insert/Update on SQL SERVER Database
Moderators: chulett, rschirm, roy
Insert/Update on SQL SERVER Database
Hi Guys,
Based on Customer type i would like to update or insert records in to a sqlserver database table.
I created Transform with 2 links one for update and another for Insert
I am getting database locked error.
It works fine for Informix database.
Please help me out how to solve this problem.
Thanks
Narasa
Based on Customer type i would like to update or insert records in to a sqlserver database table.
I created Transform with 2 links one for update and another for Insert
I am getting database locked error.
It works fine for Informix database.
Please help me out how to solve this problem.
Thanks
Narasa
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
reddy,
? Does this mean when you enter a "3" it actually updates a "7"? Or that records are being deleted instead of inserted? Or that updates are not being performed? You will need to tell us a bit more...not updating correctly
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 145
- Joined: Fri May 02, 2003 9:59 am
- Location: Seattle, Washington. USA
Actually it is most likely his own job that is causing the problem. When you have the stage in the job twice it is opening 2 separate sessions to SQL Server.Sainath.Srinivasan wrote:Check whether some other person / application is modifying the table.
If this is the case you can usually fix the issue by setting the commit point to 1. Another option would be to have the stage do an insert/update itself instead of doing it in the transform.
Shawn Ramsey
"It is a mistake to think you can solve any major problems just with potatoes."
-- Douglas Adams
"It is a mistake to think you can solve any major problems just with potatoes."
-- Douglas Adams
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 232
- Joined: Sat May 07, 2005 2:49 pm
- Location: USA
Re: Insert/Update on SQL SERVER Database
Hi Sai,
From the OPs post, it seems like he did create two links from Transformer, one for update and another for insert, unless I am misinterpreting his words.reddy wrote:Hi Guys,
Based on Customer type i would like to update or insert records in to a sqlserver database table.
I created Transform with 2 links one for update and another for Insert
I am getting database locked error.
It works fine for Informix database.
Please help me out how to solve this problem.
Thanks
Narasa
Thanks,
Naveen
Naveen
-
- Participant
- Posts: 145
- Joined: Fri May 02, 2003 9:59 am
- Location: Seattle, Washington. USA
With SQL Server 2000 you will have the same issue going into one stage since SQL Server does not support multiple open statements against a single session. The OLEDB API simulates this by opening multiple sessions.chulett wrote:It's not about the links, it's about the stages. Two links into two stages = possible locks. Two links into one stage = no locks.
http://msdn.microsoft.com/library/defau ... nSQL05.asp
Shawn Ramsey
"It is a mistake to think you can solve any major problems just with potatoes."
-- Douglas Adams
"It is a mistake to think you can solve any major problems just with potatoes."
-- Douglas Adams
-
- Participant
- Posts: 145
- Joined: Fri May 02, 2003 9:59 am
- Location: Seattle, Washington. USA
Unfortunately I am speaking from experience on this one. I guess the good news is that SQL 2005 is supposed to correct that issue.chulett wrote:Well, that's too darn bad.
I was speaking from my Oracle experience, should have figured SQL Server would work differently...
Shawn Ramsey
"It is a mistake to think you can solve any major problems just with potatoes."
-- Douglas Adams
"It is a mistake to think you can solve any major problems just with potatoes."
-- Douglas Adams