March 27, 2010 at 10:58 am
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
March 27, 2010 at 4:19 pm
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
March 28, 2010 at 8:28 am
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