Viewing 14 posts - 16 through 29 (of 29 total)
Is this what you want?
CREATE TABLE [Test] (col1 bit)
WHILE 1=1
BEGIN
INSERT INTO [Test] VALUES (1)
END
DROP TABLE [Test]
Regards,
Marco
June 1, 2010 at 11:29 am
It is possible to run query at a linked server as another user with the EXECUTE AS statement. In the example below I login as user "Test" and I execute...
June 1, 2010 at 11:17 am
Paul,
your completely right. I registered the server in SSMS as Report01, that's why I thought it's name was not UPPERCASE and that's why I also created the linked server as...
April 1, 2010 at 9:49 am
Gregory,
your solution only works for servers with a uppercase character at the beginning, but if the name is MyComputer, then it doesn't work. The query is build dynamically with @@SERVERNAME,...
April 1, 2010 at 6:16 am
Gianluca,
select serverproperty('MachineName')
AND
select serverproperty('ComputerNamePhysicalNetBIOS')
Also return uppercase values.
Marco
April 1, 2010 at 6:13 am
Uncle Moki thanks for your reply!
The remote server isn't running in Mixed Mode, so I need to setup a trust. I have found the article below with some extra information:
March 30, 2010 at 7:52 am
A few days ago there was a nice article about this subject
http://www.sqlservercentral.com/scripts/GETDATE()/69319/
Regards,
Marco
February 11, 2010 at 12:01 am
Lars,
I didn't know it isn't available in SQL 2005. Nice to know for a project I'm working. Thanks for your solution!
Regards
Marco
February 4, 2010 at 2:48 am
Lars,
you can also retrieve the start time from this Dynamic Management View
SELECT sqlserver_start_time FROM sys.dm_os_sys_info
(Requires VIEW SERVER STATE permission on the server)
Marco
February 4, 2010 at 2:15 am
Scott,
thank you, thank you, thank you.
This is great. I will use this for my reports (i'm creating a report for my morning check and want it to report all databases...
January 29, 2010 at 2:15 pm
Ha, I was happy to soon. We haven't solved it completely. Now I'm able to run it on a linked server, but I want it to run on different linked...
January 28, 2010 at 11:07 am
Gianluca,
With EXEC([sql]) AT [server] I can't send the output to a variable.
With this statement it is possible:
DECLARE @prop int
EXEC pc.master.dbo.sp_executesql
N'USE [model]; SELECT @prop=FILEPROPERTY (''modeldev'',''SpaceUsed'')',
...
January 28, 2010 at 7:05 am
Scott
Thanks for your reply. Your code works fine on the local server, but I also want to excute it through a linked server connection. That's why I'm trying to run...
January 28, 2010 at 6:27 am
lbhat
Thanks for pointing me in the right direction.
I have made a SP whit a @refresh parameter. When this parameter is 1 then it updates the table and after that...
January 12, 2010 at 1:01 pm
Viewing 14 posts - 16 through 29 (of 29 total)