Saturday, February 25, 2012

problem with default path for osql

Hi!
I have a following problem:
When I run osql from cmd prompt it is running fine, however if I have to run
osql from another osql session by using xp_cmdshell 'osql ...'. It can not
find the osql file.
I 've checked both PATH variable as well as registry
HKEY_LOCAL_MACHINE\Software...\80\Tools\ClientSetup\SqlPath are set to proper
value. What is missingI've seen this on machines that didn't reboot since installation. I worked around it by checking
registry entries for SQL server and build the bath based on that.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"kimi" <kimi@.discussions.microsoft.com> wrote in message
news:84B0A2D8-17CA-449A-A012-B939B672465A@.microsoft.com...
> Hi!
> I have a following problem:
> When I run osql from cmd prompt it is running fine, however if I have to run
> osql from another osql session by using xp_cmdshell 'osql ...'. It can not
> find the osql file.
> I 've checked both PATH variable as well as registry
> HKEY_LOCAL_MACHINE\Software...\80\Tools\ClientSetup\SqlPath are set to proper
> value. What is missing|||Are you suggesting that I should hardcode path to osql if reboot does not help?
"Tibor Karaszi" wrote:
> I've seen this on machines that didn't reboot since installation. I worked around it by checking
> registry entries for SQL server and build the bath based on that.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "kimi" <kimi@.discussions.microsoft.com> wrote in message
> news:84B0A2D8-17CA-449A-A012-B939B672465A@.microsoft.com...
> > Hi!
> > I have a following problem:
> > When I run osql from cmd prompt it is running fine, however if I have to run
> > osql from another osql session by using xp_cmdshell 'osql ...'. It can not
> > find the osql file.
> > I 've checked both PATH variable as well as registry
> > HKEY_LOCAL_MACHINE\Software...\80\Tools\ClientSetup\SqlPath are set to proper
> > value. What is missing
>|||Reboot did not help. Any ideas?
"kimi" wrote:
> Are you suggesting that I should hardcode path to osql if reboot does not help?
> "Tibor Karaszi" wrote:
> > I've seen this on machines that didn't reboot since installation. I worked around it by checking
> > registry entries for SQL server and build the bath based on that.
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> > http://www.solidqualitylearning.com/
> > Blog: http://solidqualitylearning.com/blogs/tibor/
> >
> >
> > "kimi" <kimi@.discussions.microsoft.com> wrote in message
> > news:84B0A2D8-17CA-449A-A012-B939B672465A@.microsoft.com...
> > > Hi!
> > > I have a following problem:
> > > When I run osql from cmd prompt it is running fine, however if I have to run
> > > osql from another osql session by using xp_cmdshell 'osql ...'. It can not
> > > find the osql file.
> > > I 've checked both PATH variable as well as registry
> > > HKEY_LOCAL_MACHINE\Software...\80\Tools\ClientSetup\SqlPath are set to proper
> > > value. What is missing
> >
> >

No comments:

Post a Comment