sql2005开启xp_cmdshell方法:
http://wenku.baidu.com/link?url=6yRNklZJOL5SumPciVn0vuGLfna1ASB6hWfeXEl5rvJ6iR43P8GuL-PMRI8gWoPRKMJknu9mXEClrRXBwAFqm9re3dFf-1htkMuVhZFbBjS&qq-pf-to=pcqq.c2c
sql2008开启xp_cmdshell方法:
http://www.cnblogs.com/chenxizhang/archive/2009/04/15/1436747.html
执行语句
exec master..xp_cmdshell 'net use z: \192.168.1.10dbdata "123456" /user:192.168.1.10administrator'
exec master..xp_cmdshell 'net use z: \ipdbdata "服务器密码" /user:ip服务器用户名'