Windows client error for DB2 10.5 fp3 DATA BASE Connection refused:Error:SQL30081N and SQLSTATE IS 08001 - db2

When we connect to database we got error in windows client machine.
Error:SQL30081N and SQLSTATE IS 08001.
SERVER:HP-UX DB2 10.5 FP3
Please suggest on this.

A quick Google suggests this may be the result of a firewall blocking the connection: http://www-01.ibm.com/support/docview.wss?uid=swg21503305

Related

IBM DB2 SQL Connection Errors

I can connect to IBM DB2 inside the IBM Cloud Pak for Data, but when I try to run the exact same %sql connection it errors out. What am I missing?
'''%sql ibm_db_sa://un:pw#host:port/db?security=SSL'''
(ibm_db_dbi.Error) ibm_db_dbi::Error: [IBM][CLI Driver] SQL5005C The operation failed because the database manager failed to access either the database manager configuration file or the database configuration file.\r SQLCODE=-5005
(Background on this error at: http://sqlalche.me/e/dbapi)
Connection info needed in SQLAlchemy format, example:
postgresql://username:password#hostname/dbname
or an existing connection: dict_keys([])
IBM DB2 SQL
Try loading the package ibm_db

.NET 5 Connecting to MS Access mdb with Odbc

I am trying to connect my web application to an old MS Access mdb file.
I found this page:
https://learn.microsoft.com/en-us/dotnet/api/system.data.odbc.odbcconnection?view=dotnet-plat-ext-6.0
But I can't figure out how to work with connection strings, I keep getting the Error:
'ERROR [08001] [Microsoft][ODBC Driver 18 for SQL Server]MAX_PROVS: Error Locating Server/Instance Specified [xFFFFFFFF].
ERROR [HYT00] [Microsoft][ODBC Driver 18 for SQL Server]Login timeout expired
ERROR [01S00] [Microsoft][ODBC Driver 18 for SQL Server]Invalid connection string attribute
ERROR [08001] [Microsoft][ODBC Driver 18 for SQL Server]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.'
https://www.connectionstrings.com/microsoft-odbc-driver-17-for-sql-server/
Found this page, although I have the 18 driver installed it should only change the 17 -> 18.
My current Connection string looks like this
Driver={ODBC Driver 18 for SQL Server}; Server=.\SQLExpress; AttachDbFilename = D:\temp\datacollector\microfas.mdb; Trusted_Connection=yes;
But I have no idea if I am approaching it the right way. The application will eventually run locally at a customer with a known location of the .mdb file.

quickstart error - Using EF Migrations for local SQL Server and keep loosing db connection

I am following IdentityServer4 quickstart and trying to migrate in memory data to my local SQL Server (not SQL express or LocalDB that came with VS). My connection string is:
#"Server=localhost,1434;Database=MyIDS;user id=tester_1;Password=tester_1;trusted_connection=yes;".
When I start my IdentityServer, it creates the enpty db, MyIDS, and then throw an exception with 2 inner exceptions:
Inner Exception 1:
SqlException: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - An established connection was aborted by the software in your host machine.)
Inner Exception 2:
Win32Exception: An established connection was aborted by the software in your host machine.
Can anyone tell me what's going on here? Why a working connection always gets dropped?
localhost,1434 looks wrong, you don't need to provide the port 1434 and the commma should not be used either, it should be a colon in that case.
I typically use for local development:
server=.;Database=ASPIdentity;Trusted_Connection=True;
dot means localhost, if you use sqlexpress the connetion string would become
server=.\\sqlexpress;Database=ASPIdentity;Trusted_Connection=True;

MySQL-Workbench Connection Fail

Try to ask a question because the DB connection in MySQL Workbench continues to fail.
Enter connection information and Test Connection was successful.
However if i select the appropriate DB Connection in workbench home, the connection success window does not appear.
local DB : mysql Ver 15.1 Distrib 10.3.14-MariaDB, for Win64 (AMD64), source revision ab7b9cf9122f6eb02744082db8672a920ae6009f
Server DB : mysql Ver 15.1 Distrib 10.3.14-MariaDB, for Win64 (AMD64), source revision ab7b9cf9122f6eb02744082db8672a920ae6009f
MySQL Workbench Version : mysql-workbench-community-8.0.16-winx64
The same error occurs even if the version of Workbench is changed to 19 or 20.
How to solve it?
Manage Server Connections - screenshot
MySQL Workbench - screenshot
------More details---------
If you check the log file in the top Help tab of Workbench, you can see the log as below.
11:23:15 [INF][SQL Editor Form]: Opened connection 'DB Name' to mariadb.org binary distribution version 10.3.14-MariaDB
11:23:15 [ERR][ WBContext]: Unsupported server version: mariadb.org binary distribution 10.3.14-MariaDB
However, the connection is normally established on the other coworker's PC.

OBDC and ExecuteReader issues

I'm trying to do a little powerShell script, which establishes a OBDC connection using SQL Server Native Client 11.0 as Driver and retrieve some data which, in my case, is just getting the list to the database tables.
##### Start the database connection and set up environment
$DbString="Driver=SQL Server Native Client 11.0;Server=[server_name];Database=[db_name];Uid=[user];Pwd=admin#[pwd];Encrypt=yes;Connection Timeout=30;"
$DBConnection=New-Object System.Data.Odbc.OdbcConnection
$DBCommand=New-Object System.Data.Odbc.OdbcCommand
$DBConnection.ConnectionString=$DbString
$DBConnection.Open()
$DBCommand.Connection=$DBConnection
$sqlQuery = "show tables;"
$DBCommand.CommandText = $sqlQuery
$DBCommand.ExecuterReader() //Crashes
The problem is when I run it, I get this problem
ERROR [42000] [Microsoft][SQL Server Native Client 11.0][SQL Server] Could not find stored procedure 'show'
It seems like the problem comes from ExecuteReader but I can't find a way out, please help !