Tuesday, March 20, 2012

Running SQL scripts from Command Prompt

I have a requirment, when a user logs in to the pc, I want to run some SQL scripts which is been saved as a stored procedure on another pc. Could this be possible. I know in oracle you could do it using SQLLDR. Is there any way to do it in SQL?

Please advice. Any help is greatly appreciated.

If you are using SQL 2000, check out OSQL utility. If you have plans to upgrade to 2005 you might also want to check out SQLCMD. OSQL will be removed in later versions.|||I have one more problem, I can only use the osql on the server. I want to run this on the client pc which conatins an odbc connection to the sql server|||Then you need to install SQL Server client tools from the SQL Server installation PC on the client pc. You can choose to install client tool only without installing database engine.

No comments:

Post a Comment