| Author |
Topic |
|
xhostx
Constraint Violating Yak Guru
277 Posts |
Posted - 2012-09-07 : 13:37:48
|
can anyone leave a feedback if this is a correct statement!osql -S\\CCASDFGDF -dmydb -Usa -P -q"select @@version" When I ping on the machine it is pingable. however, when i run the above i get an error:[DBNETLIB]SQL Server does not exist or access denied.[DBNETLIB]ConnectionOpen (Connect()). --------------------------Joins are what RDBMS's do for a living |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
xhostx
Constraint Violating Yak Guru
277 Posts |
Posted - 2012-09-07 : 13:47:39
|
I dont have the IPaddresses, I do have only the host names, which I get from the host file.I tried it without back slashes, the same error:osql -S CCASDFGDF -dmydb -Usa -P -q"select @@version" --------------------------Joins are what RDBMS's do for a living |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
xhostx
Constraint Violating Yak Guru
277 Posts |
Posted - 2012-09-07 : 14:46:14
|
| Noo...I'm a programmer just developing some SQL script that runs remotely from this machine...and I need to know which windows version this remote machine is running!Any help will be appreciated.--------------------------Joins are what RDBMS's do for a living |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
xhostx
Constraint Violating Yak Guru
277 Posts |
Posted - 2012-09-07 : 15:50:53
|
| well, I can't contact each DBA because I have about 30 machines.But I DO have access through remote Desktop to the whole system.is there anyways how to find out which port by going in and looking for it?--------------------------Joins are what RDBMS's do for a living |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
xhostx
Constraint Violating Yak Guru
277 Posts |
Posted - 2012-09-07 : 16:08:46
|
| [code]OK, sounds good. however,what Info I would extract from those utilities to be used to correct my command?osql -S CCASDFGDF -dmydb -Usa -P -q"select @@version"Again: my pupose is to automate a script that extract windows version of all machine existing in the host[/code]--------------------------Joins are what RDBMS's do for a living |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
xhostx
Constraint Violating Yak Guru
277 Posts |
Posted - 2012-09-07 : 16:33:45
|
| [code]I added the port which I got from Enterprise ManagerAs follows:>osql -S CCADFRAD,1433 -dmydb -Usa -P -q"select @@VERSION"the same error:[DBNETLIB]SQL Server does not exist or access denied.[DBNETLIB]ConnectionOpen (Connect()).[/code]--------------------------Joins are what RDBMS's do for a living |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
xhostx
Constraint Violating Yak Guru
277 Posts |
Posted - 2012-09-13 : 09:50:06
|
| [code]Thanks, Solved. I didn't have to add the port#>sqlcmd -S RemoteServer -dremotDB -USQLUSER -PSQLPASS -Q"select @@version"[/code]--------------------------Joins are what RDBMS's do for a living |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
xhostx
Constraint Violating Yak Guru
277 Posts |
Posted - 2012-09-13 : 12:51:17
|
| Tara, I kind of realized that. It was just for the purpose of information.Thanks for standing by anyways :).--------------------------Joins are what RDBMS's do for a living |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|