joekus
asked on
Running a large sql query
I have a large *.sql file that I run regularly in Query analyzer. I tried setting up a job in Management>>Sql Server Agent. The max allowed in each step is 3200 characters. My file is over 7800 characters. Is there anyway to run this on a schedule without having to break this working query up?
Thanks,
JK
Thanks,
JK
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can use osql to run it.
Note that isql is a much older utility; for new uses, you should always use osql.
ASKER
Thanks for quick responses.
Liked the idea of stored procedure as one less place usrname and pwd is floating about.
Liked the idea of stored procedure as one less place usrname and pwd is floating about.
EXECUTE master.dbo.xp_cmdshell 'isql -S <ServerName> -U <UserName> -P <Password> -d <DatabaseName> -i "YourFileNameHere"'