August 9, 2011 at 1:47 am
Hi All,
how to run a sql from other servers without using linked servers ?
Thanks & Regards
Deepak
August 9, 2011 at 3:07 am
you can try using SSIS
M&M
August 9, 2011 at 3:14 am
is there any way we can execute in SSMS
Regards - Deepak
August 9, 2011 at 3:18 am
August 9, 2011 at 3:32 am
deepak.a (8/9/2011)
Hi All,how to run a sql from other servers without using linked servers ?
Thanks & Regards
Deepak
You can use SSIS which I prefer or OPENROWSET or OPENQUERY.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
August 9, 2011 at 5:50 am
Jayanth_Kurup (8/9/2011)
in SSMS you can directly connect to the target server , you could use Sqlcmd as well.
[font="Arial Black"]HOW?[/font] That's the question. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
August 9, 2011 at 5:51 am
don't forget Central Management Server is SSMS 2008...that allows you to run the same command on multiple servers.
In the end, each server will require a connection in order to pass the command and retrieve the results.
As everyone has identified previously, if you are shoe-horning everything into SSMS, you are limited to CMS, linked servers, openrowset and openquery.
if you step outside of SSMS, you cna cosnider powershell, or creating an application to do the work. SSIS is one of those very powerful applications.
it all depends on what you awant to do;
Lowell
August 9, 2011 at 7:05 am
Jayanth_Kurup (8/9/2011)
in SSMS you can directly connect to the target server
in the Query window i need to run sql script not by connecting another server in SSMS. I mean without connecting to another server.
Jayanth_Kurup (8/9/2011)
you could use Sqlcmd as well.
yeah in SQL CMD mode we can connect and run the SQL script , do you have other alternatives ?
Regards - Deepak.A
August 9, 2011 at 7:07 am
Welsh Corgi (8/9/2011)
deepak.a (8/9/2011)
Hi All,how to run a sql from other servers without using linked servers ?
Thanks & Regards
Deepak
You can use SSIS which I prefer or OPENROWSET or OPENQUERY.
yes we can use SSIS , how to call the package ? from the stored procedure ?
August 9, 2011 at 7:17 am
Lowell (8/9/2011)
don't forget Central Management Server is SSMS 2008...that allows you to run the same command on multiple servers.
what is the minimum permission required for CMS ?
it all depends on what you awant to do;
like i want to check the table counts , we do have same tables in differenet Database (i.e., Distributed database ) , i want campare the tables.
Regards - Deepak
August 9, 2011 at 1:20 pm
deepak.a (8/9/2011)
Jayanth_Kurup (8/9/2011)
in SSMS you can directly connect to the target serverin the Query window i need to run sql script not by connecting another server in SSMS. I mean without connecting to another server.
Jayanth_Kurup (8/9/2011)
you could use Sqlcmd as well.yeah in SQL CMD mode we can connect and run the SQL script , do you have other alternatives ?
Regards - Deepak.A
In order to execute any kind of T sql on any server (local or remote) you will need to be able to connect to it ) , If your able to connect then any of the above methods would work be it , SSMS query window , SSIS , SQL CMD etc.
There are plenty of alternatices which one would be best depends on what your trying to achieve.
August 9, 2011 at 1:37 pm
Jayanth_Kurup (8/9/2011)
deepak.a (8/9/2011)
Jayanth_Kurup (8/9/2011)
There are plenty of alternatices which one would be best depends on what your trying to achieve.
I would add something too Registered Servers
January 31, 2014 at 1:35 am
Use management studio and give target server name in the server text box, if not connects, give port number as well. it will work.
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply