Home  >  Article  >  Database  >  sqlserver2005 远程服务器数据 完全拷贝 到本地数据库

sqlserver2005 远程服务器数据 完全拷贝 到本地数据库

WBOY
WBOYOriginal
2016-06-07 15:18:511213browse

//用sqlserver2005里面的系统存储过程 1(前四个参数,comandtype的值不要给,如果给成存储过程,程序会提示你找不到存储过程) sp_addlinkedserver 'ITSV' , '' , 'SQLOLEDB' , // 远程数据库服务全称 '192.168.1.123\SQLEXPRESS' 2 exec sp_addlinkedsrvlo

//用sqlserver2005里面的系统存储过程

1>(前四个参数,comandtype的值不要给,如果给成存储过程,程序会提示你找不到存储过程)

sp_addlinkedserver

'ITSV', '', 'SQLOLEDB',

//远程数据库服务全称

'192.168.1.123\SQLEXPRESS'

2>

exec sp_addlinkedsrvlogin

'ITSV', 'false',null, 'sa'

, 'test'

 

3>删除

exec sp_dropserver 'ITSV', 'droplogins';

所有的数据库连接都是用本地的,sql语句时需要在(远程数据库)ITSV.数据库dbo.表名

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn