How can I find the command from command prompt?

Q

Quentin Huo

Hi,

I am trying to set up database users by using scripts from the command
prompt, like:

sql -E -i 03_Pics2Share_IntegratedSecurity.sql


but I got an error message:

'sql' is not recognized as an internal and external command.

What can I do to make the 'sql' be a command?

Thanks

Q.
 
A

Aaron Weiker

Quentin said:
sql -E -i 03_Pics2Share_IntegratedSecurity.sql


but I got an error message:

'sql' is not recognized as an internal and external command.

What can I do to make the 'sql' be a command?

it is osql, not sql

osql -E -i 03_Pics2Share_IntegratedSecurity.sql
 
V

*Vanguard*

"Quentin Huo" said in news:%[email protected]:
Hi,

I am trying to set up database users by using scripts from the command
prompt, like:

sql -E -i 03_Pics2Share_IntegratedSecurity.sql


but I got an error message:

'sql' is not recognized as an internal and external command.

What can I do to make the 'sql' be a command?

Thanks

Q.

And there are lots of other executable files you cannot normally execute
unless:

- You navigate to the same directory as where is the executable file.

- You add the path to that executable file to the SYSTEM or USER
versions of the PATH environment variable.

I would've thought the install of your SQL product would add the path to
its executables in the PATH environment variable, unless it's not really
meant to be a globally accessible command from any path and you're
expect to navigate to that path or open a DOS shell in that path.
 
A

Alex Nichol

Quentin said:
I am trying to set up database users by using scripts from the command
prompt, like:

sql -E -i 03_Pics2Share_IntegratedSecurity.sql


but I got an error message:

'sql' is not recognized as an internal and external command.

What can I do to make the 'sql' be a command?

Have its .exe file in the path - as standard this would imply in either
windows or windows\system32. But in this case it might be better to add
its current home to the path by editing that at System - Advanced, click
Environmental variables. Edit Path, add your addition, separated by a
semicolon (complete - eg ;"C:\Program files\sql\" or whatever other
path to the folder) at the *end* of the present line
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Command prompt does not accept special characters in folder name 2
Cannot run net use command 11
command prompt? 6
Command prompt 4
Windows XP Command Prompt ping 3
DOS command 15
Problems with Command Prompt 10
Command Prompt 5

Top