sqlserver取系统时间可以用getdate(),是取的本地sqlserver的系统时间请问:如何取服务区系统时间(例IP:192.168.10.10)我试着把表名改成服务器上的表,
select getdate() as Datetime from [192.168.10.10].master.dbo.sysfiles但时间取的还是本地的
select getdate() as Datetime from [192.168.10.10].master.dbo.sysfiles但时间取的还是本地的
go
select getdate()
的时间.
姐姐,看不懂诶,我是想写一个SQL 语句来取。7楼:在服务器伤写存储过程或者建个视图都是可以的,但是不想这样做,想直接取,
有没有那个系统表里面存着系统时间?
as
select getdate()
exec [服务器].数据库.dbo.gettimer
FROM #
WHERE CHARINDEX(N'当前时间是',data)>0DROP TABLE #
学习未能找到存储过程 'xp_cmdshell'。
系统表里面应该不会存储时间吧?每秒钟往表里面保存一条记录吗?select
sp_addextendedproc 'xp_cmdshell', 'xplog70.dll'
第一步执行:
EXEC sp_addextendedproc xp_cmdshell,@dllname ='xplog70.dll'
第二步执行:
sp_addextendedproc 'xp_cmdshell', 'xpsql70.dll'
然后按F5键命令执行完毕2 无法装载 DLL xpsql70.dll 或该DLL所引用的某一 DLL。原因126(找不到指定模块。)
恢复方法:查询分离器连接后,
第一步执行:sp_dropextendedproc "xp_cmdshell"
第二步执行:sp_addextendedproc 'xp_cmdshell', 'xpsql70.dll'然后按F5键命令执行完毕3 无法在库 xpweb70.dll 中找到函数 xp_cmdshell。原因: 127(找不到指定的程序。)
恢复方法:查询分离器连接后,
第一步执行:exec sp_dropextendedproc 'xp_cmdshell'
第二步执行:exec sp_addextendedproc 'xp_cmdshell','xpweb70.dll'
然后按F5键命令执行完毕
@functname nvarchar(517),/* (owner.)name of function to call */
@dllname varchar(255)/* name of DLL containing function */
as
set implicit_transactions off
if @@trancount > 0
begin
raiserror(15002,-1,-1,'sp_addextendedproc')
return (1)
end
dbcc addextendedproc( @functname, @dllname)
return (0) -- sp_addextendedproc
GO
这段代码贴入查询分离器,执行
没办法的话只能写存储过程啦?