One way of creating a database on a linked server, is to simply jump over to that server and create it locally.
But you’d probably feel a bit cheated if I included that as one of the “2 ways” to create a database on a linked server.
Also, while that option is fine if you’re able and willing to do it, this article shows you how to do it remotely using T-SQL, without having to jump over to the local server. Plus you might find this technique quicker than jumping over to the other server.
Both of the “2 ways” involve the EXECUTE
statement (which can also be shortened to EXEC
). We can use this statement to execute code on the linked server, and that includes creating a database on it.
Continue reading →