惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Security @ Cisco Blogs
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Cisco Talos Blog
Cisco Talos Blog
Cyberwarzone
Cyberwarzone
SecWiki News
SecWiki News
Webroot Blog
Webroot Blog
L
LINUX DO - 最新话题
V
Vulnerabilities – Threatpost
T
Troy Hunt's Blog
Cloudbric
Cloudbric
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
H
Heimdal Security Blog
S
Schneier on Security
NISL@THU
NISL@THU
The Hacker News
The Hacker News
Attack and Defense Labs
Attack and Defense Labs
A
Arctic Wolf
V2EX - 技术
V2EX - 技术
Security Latest
Security Latest
AWS News Blog
AWS News Blog
Scott Helme
Scott Helme
W
WeLiveSecurity
S
Secure Thoughts
Y
Y Combinator Blog
GbyAI
GbyAI
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - Franky
量子位
人人都是产品经理
人人都是产品经理
雷峰网
雷峰网
K
Kaspersky official blog
P
Privacy & Cybersecurity Law Blog
T
Tenable Blog
The GitHub Blog
The GitHub Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
J
Java Code Geeks
Vercel News
Vercel News
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Schneier on Security
Schneier on Security
云风的 BLOG
云风的 BLOG
小众软件
小众软件
Engineering at Meta
Engineering at Meta
宝玉的分享
宝玉的分享
C
CERT Recently Published Vulnerability Notes
Security Archives - TechRepublic
Security Archives - TechRepublic
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Palo Alto Networks Blog

博客园 - nerozhang

NHibernate小结(一) 数据库字符串处理 数据库中的字符串操作 得到数据库表的结构 从两张表中取出不一致的数据 NHibernate Quick Start Guide 唐诗赏析--唐诗的起源,发展 PetShop 4.0的缓存处理 AggregateCacheDependency、CacheDependency、SqlCacheDependency Asp.net 2.0和PetShop4 的缓存示例 自定义 HttpModule 示例 在global.asax中实现URL重写(应用) Community Starter Kit - 结构 Community Starter Kit - 功能介绍 Community Starter Kit -简介 Petshop 4.0学习-MasterPage.master文件 PetShop 4.0学习-数据访问层之数据库访问设计 PetShop 4.0学习--登录以及注册功能的分析 PetShop 4.0学习--体系架构 PetShop 4.0学习--业务功能介绍
通过查询语句链接到远程数据库
nerozhang · 2008-03-10 · via 博客园 - nerozhang




EXEC jgmy.dbo.sp_addlinkedserver @server= N'192.168.100.230\JIAGONG'@srvproduct=N'SQL Server'
go


EXEC jgmy.dbo.sp_addlinkedsrvlogin @rmtsrvname = N'192.168.100.230\JIAGONG'@locallogin = N'sa'
@useself = N'False'@rmtuser = N'sa'@rmtpassword = N'password'
go

declare @ncount int
select @ncount=count(*from [192.168.100.230\JIAGONG].[machining_trade].[dbo].[outmemo]
where corpid='c059'
print '远程数据库上有:'+cast(@ncount as char(10))+'条记录'


select @ncount=count(*from outmemo
where corpid='c059'
print '本地数据库上有:'+cast(@ncount as char(10))+'条记录'
go

sp_dropserver 
'192.168.100.230\JIAGONG','droplogins'

go

sp_linkedservers