How to set up end-users to run the SQL command?

In my SQL ERP there is a table sometimes with a blank record. As the result, the Shipping department will NOT be able to print shipping document. Whenever this issue occurs, the Shipping will call me and I will need to get into SSMS to issue a command to delete that blank record so they can print document. Now I am wondering it would be better to set up so the Shipping clerk can issue that command by themselves to clear this error without bothering me. But we don't want them to access SSMS.
Can you tell me how to set up so the end-users can issue the SQL command from her computer without SSMS?
CastlewoodAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jagdish DevakuSr DB ArchitectCommented:
HI,

You can create procedure for deleting the blank record and you can ask shipping clerk to execute the command from batch file or command prompt.

Command Line:
https://ask.sqlservercentral.com/questions/2931/how-to-call-a-stored-procedure-from-command-line.html

Batch File (Using Batch File):
https://msdn.microsoft.com/en-in/library/ms180944.aspx

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=109770

https://social.msdn.microsoft.com/forums/sqlserver/en-US/92918122-6df2-421b-95ff-52c7f7e9407d/run-stored-procedure-through-batch-files-cmd

Hope this helps you and let me know if this works for you.

Thanks.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Vikas GargBusiness Intelligence DeveloperCommented:
Hello,

What you can do is set up a sql job on the server writing the query which you are firing to delete the blank row.
You can schedule the job so that there will not be any blank row for any condition.
0
CastlewoodAuthor Commented:
JagdishDevaku,

On the client's computer (Win 7) command SQLCMD is not available.
0
Vitor MontalvãoMSSQL Senior EngineerCommented:
But we don't want them to access SSMS.
Why not? If their logins don't have the necessary permissions they can only do what they are permissioned to.

Anyway you can install MSSQLCmdLnUtils in a client machine and create a script to be run by SQLCmd then create a batch file where you call SQLCmd with the T-SQL script as parameter.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.