create remoted stored procedure and what is <...>?

  • I have 2 questions and certainly apprecaite anybody's help in answering them...

    1. How do you create a remoted stored procedure on a remote server? e.g.

    I have a SP, J_sp on server C, but I want to run J_sp on server A & B w/o manually running J_sp on A&B. So is it possible to dump J_sp to A&B from C remotely...so I only need to run things at C

    2. I saw this section in sp_columns_ex

    from master.dbo.SYSREMOTE_COLUMNS <@table_server, @table_catalog,NULL, NULL,NULL > c

    and when I ran it, it gave me errors about "<"...so does anybody know what <..> means in SQL?

    Thanks...to whomever read this ^___^

    SQLServerNewbieMCITP: Database Administrator SQL Server 2005
  • To run a remote stored procedure use

    exec server.database.dbo.sp_name @param1, @param2 etc

    Simon Sabin

    Co-author of SQL Server 2000 XML Distilled

    http://www.amazon.co.uk/exec/obidos/ASIN/1904347088


    Simon Sabin
    SQL Server MVP

    http://sqlblogcasts.com/blogs/simons

  • Where did you get the <...> taht is usally one way of denoting paremeters to use in example code. But mostly you don't see them use NULL but instead {} to demonstrate optional paramters.

    Anyway Simon gave it to you. And I would look at the examples in SQL BOL.

  • Thanks for the replies first...though they don't quite answer my questions yet...

    1. I can run remote stored procedure fine and obtain the results from local computer. However, my question is regarding the 'creation of stored procedure' on remote server...so no need to run the SP manually in Query Analyzer

    2. I found out what <....> means in SP 'sp_columns_ex' created by MS. Simply by replacing them with brackets, the SP works...guess it's just another MS-protection to protect its own SQL system SP

    SQLServerNewbieMCITP: Database Administrator SQL Server 2005

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply