Linked Server data transfer problem


I've created a linked server (SQLREMOTE). I can read and write data to the remote server using QueryAnalyser.
I've also created a trigger (update) in a table. If data is changing, that row should be inserted in the remote server. I'm getting the following error :
'Another user has modified the contents of this table or view, the database row you are modifying no longer exists in the database. Database error : '[Microsoft][ODBC SQL Server Driver][SQL SERVER]MSDTC on server C0458 is unavailable'.

The logic of the trigger :

CREATE TRIGGER trgUpdate ON [dbo].[tbl_Product]
AFTER INSERT, UPDATE
AS
INSERT INTO SQLREMOTE.edison.dbo.tbl_Operator (operator)
SELECT ID, Brandcode, description, Trays, Packs, Weight
FROM inserted

Can anyone tell me what I'm doing wrong !

Posted On: Tuesday 20th of November 2012 04:21:07 AM Total Views:  242
View Complete with Replies

RELATED TOPICS OF Microsoft SQL Server PROGRAMMING LANGUAGE




help....can't even install SQL server in XP!

Hi all, i need help for the installation.. SQL server 2000 gave me the error "The logon account cannot be validated for the SQL service . Verify that the user name and password entered are correct. The logon attempt failed." I used my windows XP administrator account username and password .. why it won't allowed me to install using a Domain user account instead of the local system account\t The funny thing is that i did installed SQL server before but the SQL server service cannot be logon when i tried to use it..so i reformatted my HD. Please help.....i do not wish to reformat my HD again or use the local system account during the installation. Local System account vs Domain User account.. which is better\t
VIEWS ON THIS POST

274

Posted on:

Tuesday 20th November 2012
View Replies!

SQL server Reporting services

I have generated reports using SQL server reporting services 2000. I need to put a print button in the report tool bar which will prints the content displayed in the report(only the report content). Can any body tell me how to enable the print option in the tool bar.
VIEWS ON THIS POST

339

Posted on:

Tuesday 20th November 2012
View Replies!

SQL server DSN

hello, how to setup SQL server DSN in windows XP
VIEWS ON THIS POST

210

Posted on:

Tuesday 20th November 2012
View Replies!

SQL server remote connection error

I am getting this error when I execute a query on a remote server. [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionCheckForData (CheckforData()). [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]General network error. Check your network documentation. Connection Broken This only happens when my query is run between these dates '5/1/2003' '5/30/2003' The query returs an extended cost- I have checked the totals for that quarter is over 1900000.00 If I run for the first quarter of this year the total is just under 1800000.00 and it executes fine. here is my query SELECT TOP 15 t.description, Amount = CASE WHEN t.Extcost_priceUSD IS NULL THEN 0 ELSE t.Extcost_priceUSD END FROM ( SELECT DISTINCT a.description, (SELECT sum(d.Extcost_priceUSD) FROM POS_DataTable d WHERE d.description = a.description AND d.ship_date >= '5/1/2003' AND d.ship_date = '5/1/2003' AND ship_date
VIEWS ON THIS POST

309

Posted on:

Tuesday 20th November 2012
View Replies!

relocating datafile in sql server

hi could any one please tell me how to relocate datafile in sql server TIA Anand
VIEWS ON THIS POST

346

Posted on:

Wednesday 21st November 2012
View Replies!

Intellisense in SQL server 2008

Hi when I use my adventureworks database tables for running my test queries my IntelliSense works fine but when I connect to our network database servers and try to run any queries there is no IntelliSense which makes it little uneasy to type the full table names Is there a way i can get the inteliisense working on my network database servers
VIEWS ON THIS POST

233

Posted on:

Monday 26th November 2012
View Replies!

Transferring SQL Server database to host server

, I have created a web site with SQL server 2005 express database using visual studio 2008 c# asp.net. I have tested the application on my local host and its all working fine. However I moved it over to the host server by simply copying all .mdf and .ldf files using ftp. I then tested it there and I get the error below: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) Is there anything I was suppose to do to the database before publishing it Would be very grateful for any ideas.
VIEWS ON THIS POST

254

Posted on:

Monday 26th November 2012
View Replies!

SQL server 2000 -- Dummy table creation

hi, In a stored procedure i have created dummy table.I have used some conditions and i have displayed some results.EG:200 records are displayed. But i need to insert those 200 records in the dummy table which is created in the same stored procedure as in the above i have mentioned. i am posting the procedure i have created.... please any one help me .........it's urgent......... /* create by : Mogy Date : 03/01/2007 Last Modified By : Venkatesh Last Modified Date : 14- Mar -07 To Search similar Diamond for a Diamond in stud */ CREATE PROCEDURE p_diamondsearch_stud_Earring_test ( @LowPrice varchar(50)= '100', @HeighPrice varchar(50)= '1000000', @Cut1 varchar(20)='' , @Cut2 varchar(20)='' , @Shape varchar(50) = '0', @Weight1 varchar(6) = '0', @Weight2 varchar(6) = '0', @ColorLow varchar(50) , @ColorHeigh varchar(50), @ClarityLow varchar(50), @ClarityHeigh varchar(50), @OrderBy varchar(50)='catalognr', @SortOrder varchar(10)='ASC' ) AS BEGIN create table #Diamonds1 ( partno1 varchar(30),color1 varchar(10),weight1 varchar(10),cut1 varchar(10),clarity1 varchar(10),length1 varchar(10),depth1 varchar(10),width1 varchar(10),sell1 varchar(10),LWRatio1 varchar(20),polish1 varchar(10),symmtry1 varchar(10),lab varchar(10) ) declare @StrSQL varchar(5000), @tablevar int SET @StrSQL = '' SET @StrSQL = @StrSQL + ' SELECT D.partno as partno1,D.color as color1,D.weight as weight1 ,D.cut as cut1 ,D.clarity as clarity1 ,D.length as lenght1,D.depth as depth1,D.width as width1 ,D.sell as sell1 ,LWRatio1 = (D.length/D.width), D.polish as polish1 ,D.symmetry as symmtry1,D.lab as lab' SET @StrSQL = @StrSQL + ' FROM product_diam D where (D.catalognr = ''1025'' or D.catalognr = ''1027'') AND D.New_Release=''N'' AND (D.qtyoh - D.qtycom) > 0 and D.cut > 0 and D.avail ''T'' and (D.below_standard = 0) --and D.partno D.partno ' if len(@LowPrice) > 0 and len(@HeighPrice) > 0 Begin Set @StrSQL = @StrSQL + ' AND (D.sell ) BETWEEN ' + @LowPrice + ' AND ' + @HeighPrice End if len(@Cut1) > 0 and len(@Cut2) > 0 Begin Set @StrSQL = @StrSQL + ' AND D.cut BETWEEN '+ @Cut1 + 'AND ' + @Cut2 -- Set @StrSQL = @StrSQL + ' AND P.cut BETWEEN '+ @Cut1 + 'AND ' + @Cut2 End if len(@Shape)>0 Begin Set @StrSQL = @StrSQL + ' AND D.shape = ' + @Shape --Set @StrSQL = @StrSQL + ' AND P.shape = ' + @Shape End if len(@Weight1) > 0 and len(@Weight2) > 0 Begin --Set @StrSQL = @StrSQL + ' AND (D.weight) BETWEEN ' + @Weight1 + ' AND ' + @Weight2 Set @StrSQL = @StrSQL + ' AND (P.weight) BETWEEN ' + @Weight1 + ' AND ' + @Weight2 --Set @StrSQL = @StrSQL + ' AND (D.weight + P.weight) BETWEEN ' + @Weight1 + ' AND ' + @Weight2 End if len(@ColorLow) > 0 and len(@ColorHeigh) > 0 Begin Set @StrSQL = @StrSQL + ' AND D.color BETWEEN ''' + @ColorLow + ''' AND ''' + @ColorHeigh + '''' -- Set @StrSQL = @StrSQL + ' AND P.color BETWEEN ''' + @ColorLow + ''' AND ''' + @ColorHeigh + '''' End if len(@ClarityLow) > 0 and len(@ClarityHeigh) > 0 Begin Set @StrSQL = @StrSQL + ' AND D.clarity BETWEEN ' + @ClarityLow + ' AND ' + @ClarityHeigh -- Set @StrSQL = @StrSQL + ' AND P.clarity BETWEEN ' + @ClarityLow + ' AND ' + @ClarityHeigh End if len(@OrderBy)>0 Begin if (@OrderBy = 'sell') Begin Set @StrSQL = @StrSQL + ' Order By (D.sell) ' + @SortOrder End else Begin Set @StrSQL = @StrSQL + ' Order By D.' + @OrderBy --+ ',P.'+ @OrderBy + ' ' + @SortOrder end End ***************************** declare @partno1 varchar(5000) declare @color1 varchar(20) declare @clarity1 varchar(20) declare @length1 varchar(20) declare @depth1 varchar(20) declare @width1 varchar(20) declare @sell1 varchar(20) declare @LWRatio1 varchar(20) declare @polish1 varchar(20) declare @symmtry1 varchar(20) declare @lab varchar(20) insert into #Diamonds1 (partno1,color1,weight1,cut1,clarity1,length1,dept h1,width1,sell1,LWRatio1,polish1,symmtry1,lab) values (@partno1,@color1,@weight1,@cut1,@clarity1,@length 1,@depth1,@width1,@sell1,@LWRatio1,@polish1,@symmt ry1,@lab) select * from #Diamonds1 END drop table #Diamonds1 Exec(@StrSQL) --print @StrSQL GO in the procedure i have marked the ***********symbol above procedure is correct it displays nearly 200 records. But i need to insert all records in the #Diamonds1 table.
VIEWS ON THIS POST

247

Posted on:

Monday 26th November 2012
View Replies!

Problem in runnin asp under sql server (2005)windows authentication.plz help!!

i want to run asp under sqlserver 2005 windows authentication .for this i have written the connection string as:- set connadmin = Server.CreateObject("ADODB.Connection") strpath = Request.ServerVariables("APPL_PHYSICAL_PATH") connstr = "Driver={SQL Server}; Server=PERSONAL-AF5588\SQLEXPRESS;Database=cwcom;Trusted_Connectio n=Yes;" 'connstr="Provider=SQLOLEDB;Trusted_Connection=Yes ;Initial Catalog=cwcom;Data Source=PERSONAL-AF5588\SQLEXPRESS;" connadmin.open(connstr) connadmin.cursorlocation = 3 But the erre is coming as Cannot open database "cwcom" requested by the login. The login failed. plz help me
VIEWS ON THIS POST

312

Posted on:

Monday 26th November 2012
View Replies!

Delete against linked server

, I'm having a problem with SQL Server 2000 deleting against a linked server using an Access DB; I've tried the next syntax: Code: DELETE OPENQUERY(myLinkedServer, 'Select * From MyTable') but it returns the next error message Server: Msg 7320, Level 16, State 2 Could not execute query against OLE DB provider 'Microsoft.Jet.OLEDB.4.0'. The provider could not support a required row lookup interface. The provider indicates that conflicts occurred with other properties or requirements. and using the four part syntax: Code: DELETE FROM MyLinkedServer...MyTable I get the next error: Msg 7345, Level 16, State 1, Line 1 The OLE Database provider "Microsoft.Jet.OLEDB.4.0" could not delete from table "MyTable". There was a recoverable, provider-specific error, such as an RPC failure. SELECTS works fine btw... How can I fix this Thank you very much in advance.
VIEWS ON THIS POST

265

Posted on:

Monday 26th November 2012
View Replies!

Advance features of sqlserver2005 over SQL server 2000?

Can any one list the features .. Thankx..
VIEWS ON THIS POST

275

Posted on:

Monday 26th November 2012
View Replies!

Updating a sql server 2000 with SIS package

Can I run a sql server 2005 System Integrations Package for a SQL 2000 database I want to ask before I try it. Somebody else told me to install DTS, but I don't know how to do that, if I am running sql 2005 Do I need to install DTS or can I just run it from SQL 2005 to update the SQL 2000 databse
VIEWS ON THIS POST

239

Posted on:

Monday 26th November 2012
View Replies!

Upload server to host

, How do you upload sqlserver2003 on your hosting account
VIEWS ON THIS POST

361

Posted on:

Monday 26th November 2012
View Replies!

Trusted sql server problem

I'm running my asp page but get an error (Not associated with a trusted SQL Server connection) on the conn statement below here is my connection string: conn = "Driver={SQL Server}; Server=XPSM1710; Database=bruteforce; UID=John Partder" I cannot see anything wrong. The user John Partder logged onto the machine that the SQL server 2000 is running. Also an admin of the machine. Any ideas
VIEWS ON THIS POST

270

Posted on:

Monday 26th November 2012
View Replies!

Sql server database

hi I am new on database but i can build database by ms access , can i build the same database by sql server , i mean is the program has visual interface to build datebase Thank you
VIEWS ON THIS POST

296

Posted on:

Monday 26th November 2012
View Replies!

How transfer access tables to sql server 2000 ?

Hi . I got a db in access and want to transfer it to sql server with all its reletionship and connect my access bounded forms to sql server . i be happy if some one show me how to transfer my access 2000 tables to sql server 2000 and make connection to sql sever tables from bounded access 2000 forms
VIEWS ON THIS POST

329

Posted on:

Monday 26th November 2012
View Replies!

using SQLserver db dynamically

I would like to create program that load SQLserver database file from a mobile disk (eg. flash disk), the db should be flexible to move to any other computer and SHOULD NOT stay in the harddisk i've been thinkin of solution: 1. i should do automatically attach of db to the sqlserver everytime i load the program 2. auto detach the db when finish using the program 3. and the file will be in .mdf instead of a backup file (since backup file need restoration and restoration will restore file to the harddisk ) is my solution correct or is there any better solution
VIEWS ON THIS POST

211

Posted on:

Monday 26th November 2012
View Replies!

Running SQLserver general Function using scripts

2 functions i need to perform by using scripts : clear connection (in detach db option) and setting server authentication mode (either windows only or windows and sqlserver) how do i run these functions in scripts or should i just call the stored procedures in master db\t which sp should i call to perform these functions , wif the parameter (pls give example) thx
VIEWS ON THIS POST

202

Posted on:

Monday 26th November 2012
View Replies!

How to make it work when the server isnt where i am...

Hi. I am a total newbie to this so please excuse my dumbness I am renting webservices from somewhere and have a website going there. I have made a form now on my site and want it delivered and processed with ASP. What I can't seem to figure out is how to get on to that server and make all the settings and stuff necessary (reading the asp-book and it doesnt fit my needs) to make this work. I have the two documents done and written. The form.asp and thankyou.asp. Do I need one more, to get the information delivered to me How do I put these in the correct folder (can I just use ws_ftp pro for that too) What should that folder be And do I need any special settings or something I have no idea what I am doing here. Please help me. , Did I post this in the wrong forum Since no-one has answered yet...
VIEWS ON THIS POST

282

Posted on:

Monday 26th November 2012
View Replies!