I have two instances of IBM Informix Database on a HP-UX UNIX box. One instance is for test and the other instance is our live database. The test instance is a copy of the live instance and the usernames and passwords are identical for the two databases. When I connect to the test instance in Visual Studio 2010 using a drda connection string the connection is successful. When I connect to the live instance with the same username and password the connection fails with this error:
ERROR [08001] [IBM] SQL30082N Security processing failed with reason "24" ("USERNAME AND/OR PASSWORD INVALID"). SQLSTATE=08001.
The test connection string is:
Database=companydb;User ID=dbuser;Password=********;Server=dbserver:1403;Persist Security Info=True
The live connection string is:
Database=companydb;User ID=dbuser;Password=********;Server=dbserver:1402;Persist Security Info=True
The only difference between the two connection strings is the port number.
I have searched the IBM website (nightmare) with no luck.
I have installed IBM Data Server Driver Package - IBMDBCL1, IBM Database Add-Ins for Visual Studio and ClientSDK 3.70 (4.1 doesn't support Visual Studio Add-Ins).
The error is misleading little bit: you just unable to connect. As you know Informix doesn't manage users password: the username and password is inherited from operating system user under which Informix is installed. The simplest way is to install both instances under 2 different operating system users and use different ports. When you able to connect with dbaccess to your DB's under 2 this users you will not have this error.
Related
I have an Access DB that I migrated to SQL server recently. The SQL server is on a Windows server. Now I can work normally with the SQL database but when others log into the same windows server with their credentials they are not able to access the database. As soon as they open Access frontend they get an error saying failed connection. Now I created an ODBC connection string(File DNS) and gave it to the other users in the network but they still are not able to connect to the database. They get an error stating "SQL server connection failed. The server rejected the connection: Access to the selected database has been denied". Can someone please help me to solve this issue so that multiple users can connect to the SQL DB without any issues? Thanks
Hard to know with the limited information. Are you using windows authentication to sql server, or are you using SQL logons? Either should work fine. The other issue to watch out for is what sql driver did you use to link with?
If you link say using the native 17 ODBC driver, then that is not installed on workstations by default - you have to download and install that driver.
Or, maybe you linked using the long time "legacy" sql driver - that is by default installed on all workstations.
So, it not clear if you using SQL logons, or using Windows authentication for the connection to the database????
If your using windows authentication, then all those other users will require permissions to be granted to the database.
If you using a SQL logon, then that logon would have been saved when you link the table(s), and again it should work for all users. Its quite common to create ONE logon on SQL server, link using that logon, and thus all users will be connecting to the database using the one same logon id/password.
And, if you linked using a FILE dsn, then zero configeration should be required, since access converts FILE dsn's into what are called dsn-less connections. (the origonal file is not required anymore once you link - you can even delete that FILE dsn, and it will still work).
So, FILE dsn is the best choice, since that dsn is NOT required to be setup on each workstation.
And if you using sql logon's, then make sure you checked the box to remember the password during linking of the tables. That is this check box:
And note during a re-link the above box does not appear - only on first time linking of table(s).
I have read all the related posts here and many other discussions on other forums, but still cannot solve my problem.
I am porting a SQL Server CE application from a WindowsCE device to Win 7. The code of interests is to remotely download a table from SQL Server database using SqlCeRemoteDataAccess.Pull.
The original code on WinCE device is as follows:
SqlCeRemoteDataAccess.Pull(Tablename, sql, _remoteConnectionString, RdaTrackoption.TrackingOffWithIndexes, "ErrorTable")
When running on Win7 from Visual Studio 2012, it complains:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
I double checked both my local and remote databases. They are not corrupted. Then I searched the Internet and this forum, and tried the suggested solution: changing the connection string from:
Provider=PROVIDER;Data Source=Src;User ID=SUser;Password=1234;Initial Catalog=ABCD_EF;
To:
Provider=PROVIDER;Data Source=Src;User ID=SUser;Password=1234;Initial Catalog=ABCD_EF;Integrated Security=SSPI;
Now I got:
Login failed for user ''. The user is not associated with a trusted SQL Server connection.
I also added Trusted_Connection=Yes or Trusted_Connection=True to the above connection string and saw the identical error. Any suggestions ? Thank you.
NOTE: The server is already set to mixed mode: both Windows and SQL Server authentication.
NEW updating: I am using C# for programming both for the device and on Win7. The remote data server agent is in sqlcesa30.dll (Microsoft SQL Server Compact Edition Server Agent 3.0). The followings are connection strings used and error messages I got:
(1) Original one that Works on WinCE devices, but on Win 7 I got:
Provider=PROVIDER;Data Source=Src;User ID=SUser;Password=1234;Initial Catalog=ABCD_EF;
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
(2) On Win 7 I got:
Provider=PROVIDER;Data Source=Src;Initial Catalog=ABCD_EF;Integrated Security=SSPI;
Login failed for user ''. The user is not associated with a trusted SQL Server connection.
(3) On Win 7 I got:
Provider=PROVIDER;Data Source=Src;User ID=SUser;Password=1234;Initial Catalog=ABCD_EF;Integrated Security=SSPI;
Login failed for user ''. The user is not associated with a trusted SQL Server connection.
You cannot have both the Integrated Security=SSPI; and User ID=SUser;Password=1234 in a connection string at once. Pick one:
either use the integrated security (recommended) to use your current credentials - but then you must remove the UserID=...;Password=.... parts from the connection string
or then you use a specific user and password - and in this case, adding integrated security or trusted connection is moot since the UserID=...;Password=... settings will be used
So in your case, if you have properly set up integrated security, just use:
Data Source=Src;Initial Catalog=ABCD_EF;Integrated Security=SSPI;
as your connection string.
I am using Connection string in my web.config. I have given user id, password, data source etc in the connection string. When i tried to connect to the SQL server using "Connection.Open()" I am getting an exception stating The user is not authorized. The user name that is mentioned is my windows user name(yes my windows user name and not the one mentioned in connection string). I am not sure why and how this is happening. I tried several times and the same thing is happening.
If you believe that VB.NET is part of the problem, try using the same connection parameters from the same client, but with different client software. For example try connecting from Access or SQL Server Management Studio or Excel. This will help you narrow down whether your problem is with the security configuration versus the code or client software. Often times if you try to connect from a remote workstation you can end up with a failure against a server that has not been configured to allow remote connections.
I am trying to connect an ODBC source to the R statistical package but having log in problems.
I have set up the ODBC name eplR with an SQL server driver linking to the (local) server using windows NT authentication with the network login ID default. In the set up the data-source test is successful.
When I try and create the connection in R
library(RODBC)
channel <- odbcConnect("eplR")
I get a failed connection
Login failed for user pssguy-PC/pssguy - my local computer name
When I connect to the (local) SQL server 2005 via management studio with Windows authentication I get a similar error unless I open management studio
with the "run as administrator" option.
In management studio, if I look at the properties of the (local) server, the authentication is set to Windows authentication mode.
The permission to connect SQL grantor is sa and the Grant box is checked. There is also a connect sql permission for pssguy-PC\pssguy with an unchecked box. I check it but on restarting mssql server it has reverted to unchecked.
I had what I thought was an identical setup on another standalone machine and I have no problems connecting in R.
Any help much appreciated
Maybe with odbcConnect() you could try passing the uid and pwd arguments too?
i.e.
odbcConnect("eplR", "**USERNAME**", "**PASSWORd**")
I just created a new database in "Microsoft SQL Server Management Studio Express" and now I'm in "ColdFusion Administrator" and I'm trying to add my database as a Data Source. How do I do that? I believe the servername is .\SQLEXPRESS but I'm not sure what the default username and password are. I've tried creating a new login through Management Studio with an actual username and password, but those aren't working either. The error I'm getting is:
Connection verification failed for data source: xxx
java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver]The requested instance is either invalid or not running.
The root cause was that: java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver]The requested instance is either invalid or not running.
I can see that the service is running, and I can connect to it through management studio. I've tried following a couple tutorials online, but they don't seem to be working for me. Ideas?
Server name can be any resolvable hostname or domain name, in case of having SQL Server and CF server on same box localhost should work for you.
Also make sure that user you created has access to the particular database and needed operations. Look into the database permissions for this. This check is not required when using master account (often login is sa), but this is not recommended practice because of the security reasons.
Also make sure SQL Server and Windows Authentication mode is checked. I had an issue with permissions as well when I only had Windows Authentication enabled under:
right click on server (localhost) -> security
Then restart SQL Server Services to save changes. After that I was able to connect my ColdFusion datasource to SQL Server.
For testings sake use the same credentials that you are connected with in Management Studio, likely the "sa" user and password. Once you have it working with "sa" then go back into Management Studio and create an application level user for your CF app and then update the data source to use your new user / password.