i have an sql file of the following form:
CREATE VIEW dbo.SomeView
AS select * from SomeTable
GO
ALTER TABLE [SomeTable] ADD CONSTRAINT [...] PRIMARY KEY CLUSTERED ([..],[TIME_STAMP],[..])
GO
and so on.. it contains only update queries.
i want to run it on an sql server that is situated on a remote machine. I'm using java and i read it is not possible to execute a file through jdbc.
i read this related post:
How to execute sql-script file in java?
my question is, how can i execute that file if the server is on a remote machine and not on my machine (i don't have mssql server installed on my machine)?
P.S it would be nice to know if there is a solution to this problem in other languages (just a reference will do)
EDIT: the file is on the local machine.
thank ppl!