Showing posts with label dsn. Show all posts
Showing posts with label dsn. Show all posts

Monday, March 19, 2012

Error Creating DSN using odbcconf.exe for SQL Server

hi there

i want to create a DSN using command line arguments,with Trusted connection=no, Login name= sa password=*******

i try creating like this

C:\>odbcconf.exe /a {CONFIGSYSDSN "SQL Server" "DSN=blabla|Description=blablubb|SERVER=vsnet1|Trusted_Connection=no |Database=dm"}

this work fine, but when i specify the login id & password as

C:\>odbcconf.exe /a {CONFIGSYSDSN "SQL Server" "DSN=blabla|Description=blablubb|SERVER=vsnet1|Trusted_Connection=no|loginid=sa|password=sysadm|Database=dm"}

this throws an error as

CONFIGSYSDSN: Unable to create a data source for the 'SQL Server' Driver: Invalid keyword-value pair with error code :2147467259

I too try the

loginID, login id, login , user, userid, uid

Password, pwd

and many more...

all these throws same error.

Please help me.

Regards,

Thnaks.

Gurpreet S. Gill

Persistence of login credentials in a DSN is not supported (it's insecure). Using trusted connection would be the best way to achieve connecting without specifying credentials since the logged on user credentials is used for authenticating to the server. The command below should create the DSN for you.

odbcconf.exe /a {CONFIGSYSDSN "SQL Server" "DSN=blabla|Description=blablubb|SERVER=vsnet1|Trusted_Connection=Yes|Database=dm"}

Hope this helps

Uwa.

|||

Thanks Uwa Agbonile

this is right, that it is insecure, is there any way to do that, i mean the registry (regedit), or else?

Regards,

Thanks.

Gurpreet S. Gill

|||

Like I suggested already, one secure way to do this is to use integrated security. If you must use SQL Server authentication your options depend on the circumstances of your application. You could code the application to request the credentials from the user or retrieve them from a location you know to be secure.

You could also embed the credentials as part of the connection string directly in your application but again this is insecure and not recommended.

Regards,

Uwa.

|||

Uwa--

I understand, what you want to say.

Thanks for your help.

Regards

Gurpreet S. Gill

Error Creating DSN using odbcconf.exe for SQL Server

hi there

i want to create a DSN using command line arguments,with Trusted connection=no, Login name= sa password=*******

i try creating like this

C:\>odbcconf.exe /a {CONFIGSYSDSN "SQL Server" "DSN=blabla|Description=blablubb|SERVER=vsnet1|Trusted_Connection=no |Database=dm"}

this work fine, but when i specify the login id & password as

C:\>odbcconf.exe /a {CONFIGSYSDSN "SQL Server" "DSN=blabla|Description=blablubb|SERVER=vsnet1|Trusted_Connection=no|loginid=sa|password=sysadm|Database=dm"}

this throws an error as

CONFIGSYSDSN: Unable to create a data source for the 'SQL Server' Driver: Invalid keyword-value pair with error code :2147467259

I too try the

loginID, login id, login , user, userid, uid

Password, pwd

and many more...

all these throws same error.

Please help me.

Regards,

Thnaks.

Gurpreet S. Gill

Persistence of login credentials in a DSN is not supported (it's insecure). Using trusted connection would be the best way to achieve connecting without specifying credentials since the logged on user credentials is used for authenticating to the server. The command below should create the DSN for you.

odbcconf.exe /a {CONFIGSYSDSN "SQL Server" "DSN=blabla|Description=blablubb|SERVER=vsnet1|Trusted_Connection=Yes|Database=dm"}

Hope this helps

Uwa.

|||

Thanks Uwa Agbonile

this is right, that it is insecure, is there any way to do that, i mean the registry (regedit), or else?

Regards,

Thanks.

Gurpreet S. Gill

|||

Like I suggested already, one secure way to do this is to use integrated security. If you must use SQL Server authentication your options depend on the circumstances of your application. You could code the application to request the credentials from the user or retrieve them from a location you know to be secure.

You could also embed the credentials as part of the connection string directly in your application but again this is insecure and not recommended.

Regards,

Uwa.

|||

Uwa--

I understand, what you want to say.

Thanks for your help.

Regards

Gurpreet S. Gill

Error creating DSN

Hi
I'm trying to set up a DSN and get a 18456 error
Here is what I do
start->programs->administrative tools->data sources (ODBC).
On system DSN sheet I press add
A window opens and I choose SQL Server
Another window opens (create a new data source to sql server)
Field name = XML description = XML, server = local ( I have 2 options local
and moshik).
I press next and the window changes here I choose "with sql server
quthentication using a login ID and password entered by the user"
Bellow I enter loginid = moshik, password=XXX
I press next and get the follwoing error message
"connection failed;
sql state: '28000'
sql server error : 18456
[microsoft][odbc sql server driver][sql server]login failed for user
'moshik'."
I loged into the computer using moshik's user and opened enterprize manager
and manipulated the data on the database so user moshik has rights to the
database.
I have a Win 2000 server sp 4 and sql server 2000. The win 2000 server is
stand alone and not connected to a network and not in a domain.
Any help will be appreciated
Moshik Amit
When you specify the local server, did you use:
(local)
You may also want to type the name of the server yourself in
the server drop down. Specify the machine name instead of
using (local). You aren't limited to just what is displayed
in the drop down - you can type any server, machine name in
there as well.
-Sue
On Tue, 9 Aug 2005 09:30:05 -0700, "Moshik Amit"
<MoshikAmit@.discussions.microsoft.com> wrote:

>Hi
>I'm trying to set up a DSN and get a 18456 error
>Here is what I do
>start->programs->administrative tools->data sources (ODBC).
>On system DSN sheet I press add
>A window opens and I choose SQL Server
>Another window opens (create a new data source to sql server)
>Field name = XML description = XML, server = local ( I have 2 options local
>and moshik).
>I press next and the window changes here I choose "with sql server
>quthentication using a login ID and password entered by the user"
>Bellow I enter loginid = moshik, password=XXX
>I press next and get the follwoing error message
>"connection failed;
>sql state: '28000'
>sql server error : 18456
>[microsoft][odbc sql server driver][sql server]login failed for user
>'moshik'."
>I loged into the computer using moshik's user and opened enterprize manager
>and manipulated the data on the database so user moshik has rights to the
>database.
>I have a Win 2000 server sp 4 and sql server 2000. The win 2000 server is
>stand alone and not connected to a network and not in a domain.
>Any help will be appreciated
>Moshik Amit

Error creating DSN

Hi
I'm trying to set up a DSN and get a 18456 error
Here is what I do
start->programs->administrative tools->data sources (ODBC).
On system DSN sheet I press add
A window opens and I choose SQL Server
Another window opens (create a new data source to sql server)
Field name = XML description = XML, server = local ( I have 2 options local
and moshik).
I press next and the window changes here I choose "with sql server
quthentication using a login ID and password entered by the user"
Bellow I enter loginid = moshik, password=XXX
I press next and get the follwoing error message
"connection failed;
sql state: '28000'
sql server error : 18456
[microsoft][odbc sql server driver][sql server]login failed for
user
'moshik'."
I loged into the computer using moshik's user and opened enterprize manager
and manipulated the data on the database so user moshik has rights to the
database.
I have a Win 2000 server sp 4 and sql server 2000. The win 2000 server is
stand alone and not connected to a network and not in a domain.
Any help will be appreciated
Moshik AmitWhen you specify the local server, did you use:
(local)
You may also want to type the name of the server yourself in
the server drop down. Specify the machine name instead of
using (local). You aren't limited to just what is displayed
in the drop down - you can type any server, machine name in
there as well.
-Sue
On Tue, 9 Aug 2005 09:30:05 -0700, "Moshik Amit"
<MoshikAmit@.discussions.microsoft.com> wrote:

>Hi
>I'm trying to set up a DSN and get a 18456 error
>Here is what I do
>start->programs->administrative tools->data sources (ODBC).
>On system DSN sheet I press add
>A window opens and I choose SQL Server
>Another window opens (create a new data source to sql server)
>Field name = XML description = XML, server = local ( I have 2 options local
>and moshik).
>I press next and the window changes here I choose "with sql server
>quthentication using a login ID and password entered by the user"
>Bellow I enter loginid = moshik, password=XXX
>I press next and get the follwoing error message
>"connection failed;
>sql state: '28000'
>sql server error : 18456
>[microsoft][odbc sql server driver][sql server]login failed for
user
>'moshik'."
>I loged into the computer using moshik's user and opened enterprize manager
>and manipulated the data on the database so user moshik has rights to the
>database.
>I have a Win 2000 server sp 4 and sql server 2000. The win 2000 server is
>stand alone and not connected to a network and not in a domain.
>Any help will be appreciated
>Moshik Amit

Wednesday, March 7, 2012

Error connecting to remote server

Hi
I am trying to cerate a System DSN (in ODBC Data Source Administrator) for a
remote SQL Server. I am getting the below error message;
Connection failed:
SQL State: '01000'
SQL Server Error: 14
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Invalid
Instance())
Connection failed:
SQL State: '08001'
SQL Server Error: 14
[Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid Connection
What is the problem and how can I fix it?
Thanks
RegardsOn Sep 14, 4:57 pm, "John" <J...@.nospam.infovis.co.uk> wrote:
> Hi
> I am trying to cerate a System DSN (in ODBC Data Source Administrator) for a
> remote SQL Server. I am getting the below error message;
> Connection failed:
> SQL State: '01000'
> SQL Server Error: 14
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Invalid
> Instance())
> Connection failed:
> SQL State: '08001'
> SQL Server Error: 14
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid Connection
> What is the problem and how can I fix it?
> Thanks
> Regards
the remote server isn't running sql as a named instance is it?|||Not sure. It is our web hosts which is an outside company. What should I ask
them to do?
Many Thanks
Regards
"densial" <densial@.gmail.com> wrote in message
news:1189754261.882976.147900@.r34g2000hsd.googlegroups.com...
> On Sep 14, 4:57 pm, "John" <J...@.nospam.infovis.co.uk> wrote:
>> Hi
>> I am trying to cerate a System DSN (in ODBC Data Source Administrator)
>> for a
>> remote SQL Server. I am getting the below error message;
>> Connection failed:
>> SQL State: '01000'
>> SQL Server Error: 14
>> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Invalid
>> Instance())
>> Connection failed:
>> SQL State: '08001'
>> SQL Server Error: 14
>> [Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid Connection
>> What is the problem and how can I fix it?
>> Thanks
>> Regards
> the remote server isn't running sql as a named instance is it?
>|||We are trying to access the SQL Server from behind an ISA 2004 firewall.
Even though I have created a rule for port 1433 on ISA 2004, I wonder if
there is something still missing at the ISA 2004 that I need to do.
Many Thanks
Regards
"densial" <densial@.gmail.com> wrote in message
news:1189754261.882976.147900@.r34g2000hsd.googlegroups.com...
> On Sep 14, 4:57 pm, "John" <J...@.nospam.infovis.co.uk> wrote:
>> Hi
>> I am trying to cerate a System DSN (in ODBC Data Source Administrator)
>> for a
>> remote SQL Server. I am getting the below error message;
>> Connection failed:
>> SQL State: '01000'
>> SQL Server Error: 14
>> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Invalid
>> Instance())
>> Connection failed:
>> SQL State: '08001'
>> SQL Server Error: 14
>> [Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid Connection
>> What is the problem and how can I fix it?
>> Thanks
>> Regards
> the remote server isn't running sql as a named instance is it?
>|||On Sep 14, 8:49 pm, "John" <J...@.nospam.infovis.co.uk> wrote:
> We are trying to access the SQL Server from behind an ISA 2004 firewall.
> Even though I have created a rule for port 1433 on ISA 2004, I wonder if
> there is something still missing at the ISA 2004 that I need to do.
> Many Thanks
> Regards
> "densial" <dens...@.gmail.com> wrote in message
> news:1189754261.882976.147900@.r34g2000hsd.googlegroups.com...
> > On Sep 14, 4:57 pm, "John" <J...@.nospam.infovis.co.uk> wrote:
> >> Hi
> >> I am trying to cerate a System DSN (in ODBC Data Source Administrator)
> >> for a
> >> remote SQL Server. I am getting the below error message;
> >> Connection failed:
> >> SQL State: '01000'
> >> SQL Server Error: 14
> >> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Invalid
> >> Instance())
> >> Connection failed:
> >> SQL State: '08001'
> >> SQL Server Error: 14
> >> [Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid Connection
> >> What is the problem and how can I fix it?
> >> Thanks
> >> Regards
> > the remote server isn't running sql as a named instance is it?
that error msg <snip>Invalid Instance()</snip> makes me think your
providor is using a named instance, just ask them if they are, then
reference your server as "servername\instancename" (check the slash
direction, can't remember off hand if it's forward or backward).
Another issue could be the port number, try either "servername,1433"
or "servername\instancename,1433" as your server address. this is
often a problem if your using load balanced sql server. also there's
somestuff about the server knowing which port to reply on (for
sql2005), but this is a bit more complex and sometimes requires some
server side config in awkward situations, anyways if it's 2k5 your
connecting to read up about sqlbrowser replying to the client on port
1434 instead of 1433.