How can I find the command from command prompt?

  • Thread starter Thread starter Quentin Huo
  • Start date Start date
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.
 
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
 
"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.
 
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
 
Back
Top