|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-05-18 : 08:57:48
|
| sunnyluo writes "when our system upgrade to sql server 2005 ,and create a linked server to localhost database , the script of create linkedserver is :/****** Object: LinkedServer [localhost_boston] Script Date: 05/07/2006 18:37:15 ******/EXEC master.dbo.sp_addlinkedserver @server = N'localhost_test',@srvproduct='', @provider=N'SQLNCLI', @datasrc=N'localhost', @provstr=N'UID=sa;PWD=007;', @catalog=N'test'GOEXEC master.dbo.sp_serveroption @server=N'localhost_test', @optname=N'collation compatible', @optvalue=N'false'GOEXEC master.dbo.sp_serveroption @server=N'localhost_test', @optname=N'data access', @optvalue=N'true'GOEXEC master.dbo.sp_serveroption @server=N'localhost_test', @optname=N'dist', @optvalue=N'false'GOEXEC master.dbo.sp_serveroption @server=N'localhost_test', @optname=N'pub', @optvalue=N'false'GOEXEC master.dbo.sp_serveroption @server=N'localhost_test', @optname=N'rpc', @optvalue=N'true'GOEXEC master.dbo.sp_serveroption @server=N'localhost_test', @optname=N'rpc out', @optvalue=N'true'GOEXEC master.dbo.sp_serveroption @server=N'localhost_test', @optname=N'sub', @optvalue=N'false'GOEXEC master.dbo.sp_serveroption @server=N'localhost_test', @optname=N'connect timeout', @optvalue=N'0'GOEXEC master.dbo.sp_serveroption @server=N'localhost_test', @optname=N'collation name', @optvalue=nullGOEXEC master.dbo.sp_serveroption @server=N'localhost_test', @optname=N'lazy schema validation', @optvalue=N'false'GOEXEC master.dbo.sp_serveroption @server=N'localhost_test', @optname=N'query timeout', @optvalue=N'0'GOEXEC master.dbo.sp_serveroption @server=N'localhost_test', @optname=N'use remote collation', @optvalue=N'true' when I run the sql on local server :delete a from localhost_test.test.dbo.Spot as a,bica.tmpspot as b where a.spotid=b.spotid it display 7 rows have deleted ,but when I run:select * from localhost_test.test.dbo.Spot as a join bica. tmpspot as b on a.spotid=b.spotidfind the 7 rows have not delete,I check the localhost_test.test.dbo.Spot table ,and find 7 rows have deleted that it is not a.spotid=b.spotid ,why ?If I run : delete from localhost_test.test.dbo.Spot where spotid=28147and the row can deleted .why ?anyone can talk me how to do I can !thanks." |
|