MySql Liniked server - create table

  • I have a linked server to mySql from my sql server database.

    I have to issue create table statement on mysql linked server

    from sql server management studio

    please advise if thats an option

  • usually, linked servers do not allow DDL commands; only DML insert/update/delete/select.

    AFAIK, you can't even create temp tables on a SQL linked server, fir example, which i would think would be harmless... you'll have to use a work around, like calling a procedure, and the procedure creates the table, but no direct DDL commands.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • One option is to use the EXECUTE ... AT <linked_server> syntax.

    See http://msdn.microsoft.com/en-us/library/ms188332.aspx

    The full details are there, including the full syntax:

    Execute a pass-through command against a linked server

    { EXEC | EXECUTE }

    ( { @string_variable | [ N ] 'command_string [ ? ] ' } [ + ...n ]

    [ { , { value | @variable [ OUTPUT ] } } [ ...n ] ]

    )

    [ AS { LOGIN | USER } = ' name ' ]

    [ AT linked_server_name ]

    [;]

Viewing 3 posts - 1 through 2 (of 2 total)

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