No start database manager command was issued. SQLSTATE=57019 - database

I am new to DB2 and I have installed DB2 9.7.
I created an instance which is shown below
[sathish#oc3855733574 ~]$ db2ilist
sathish
Settings of /etc/services is shown below
DB2_sathish 60000/tcp
DB2_sathish_1 60001/tcp
DB2_sathish_2 60002/tcp
DB2_sathish_END 60003/tcp
DB2_TMINST 50000/tcp
But, when I start using 'db2start' it throws the following error
07/31/2015 10:26:20 0 0 SQL1042C An unexpected system error occurred.
SQL1032N No start database manager command was issued. SQLSTATE=57019
I installed DB2 using 'root' and starting 'DB2' from 'instance' (sathish in this case)
Any help or URL link will be of great use
Thanks
Sathish Kumar

I had a look into db2diag.log file and I got a unusual hack from one of the website
I followed the steps mentioned below and it worked
a) db2trc on -f db2trace.out
b) db2start
c) db2trc off

This problem generally occurs if you have recently changed the password of the account which is the owner of that db2 instance what you need to do is go to services-> properties of the db2 instance -> and then from log on part select local system account

This looks like something is wrong with the installation. There should be some hints on what DB2 ran into in the db2diag.log file (look under ~/sqllib/db2dump/db2diag.log).
What you could do if the db2diag.log does not provide a clue is to verify your installation is correct. DB2 includes a tool for that named "db2val". Here is the link to the documentation of db2val for version 9.7. Just run "db2val" as the instance owner and check the output.

Try
sudo -i -u db2inst1 /database/config/db2inst1/sqllib/adm/db2start
For more information
https://dba.stackexchange.com/questions/49807/sql1641n-error-on-linux-while-running-db2start-using-db2-express-c-on-linux-luw

Related

SnowSQL connection test fails with "No module named 'win32timezone'"

I've just installed SnowSQL for Windows as per the instructions at https://docs.snowflake.com/en/user-guide/snowsql-install-config.html#installing-snowsql-on-microsoft-windows-using-the-installer
However, when I attempt to connect to Snowflake, it fails:
C:\>snowsql -a <account> -u <user> --authenticator externalbrowser -o log_level=DEBUG
No module named 'win32timezone'
If the error message is unclear, enable logging using -o log_level=DEBUG and see the log to find out the cause. Contact support for further help.
Goodbye!
C:\>snowsql -v
Version: 1.2.7
Any ideas appreciated
What version of windows are you using? How did you install?
No module named 'win32timezone'
Per the official documentation snowsql is a python application. The error message above is a python error indicating it cannot find the aforementioned package. However, installing that package is not likely a fix as snowsql appears to ship with a version of python. Which makes a lot of sense, dealing with python dependencies is a nightmare.
I started a Windows 2016 host in AWS and installed snowsql 1.2.7 via the MSI. I was able to get to the login screen without any problems.
I would completely remove snowsql, do a search for snowsql and delete any folders you find, then reinstall. If it's still not working I'd provide more information as requested above.
This was acknowledged as a defect by Snowflake, and they will fix it in a newer version. The workaround is to install v 1.2.5, and invoke this version from the command line
snowflake <options> -v 1.2.5

Laravel sql server on mac

So i installed SQL serve with docker on mac and i can actually manage to access my local sql server database with datagrip, but when i want to do a php artisan migrate i get this error:
[Illuminate\Database\QueryException] could not find driver (SQL: select * from sysobjects where type = 'U' and name = migrations)
and this error
[PDOException]could not find driver
i search for some answer but they where mostly for linux.
So i manage to installed al the necessary drivers just by installing this:
https://github.com/Microsoft/msphpsql/releases
php and Laravel worked perfectly after i installed those package and added this lines on my php.ini file:
extension=sqlsrv.so
extension=pdo_sqlsrv.so
You need a module called "pdo_mysql". Try php_info()to see if it's installed - I doubt it's there.
In your php.ini file (you can find it via php --ini) uncomment the line which has extension=pdo_mysql.so on it and restart the server.
edit: also make sure that the default key is set in your config/database.php file. Something like 'default' => env('DB_CONNECTION', 'mysql'),

Backup and Restore option not available in pgAdmin III

I have to take backup of my database but when I right click DB and then backup The button for backup is disabled. Similarly in existing database ,not able to restore because the Restore button too disabled.
I was working fine till the time I created a new database.
How do they get enabled?
I had the same problem in ubuntu 14.04. It was necessary to install both postgresql-client-common (which contains pg_dump and pg_restore) and postgresql-client packages.
There is no need for reinstall,
just open File->Options->Binary paths and add set "PG bin path" to path where pg_dump/pg_restore is located.
Here is a solution:
$ yum install postgresql-contrib
Problem could be caused by a fact that you simply do not have pg_dump and pg_restore tools installed (or they are not visible for pgadmin).
This had happen to me when installing pgadmin3 on CentOS 7 via PostgreSQL yum repository. To resolve this I had to install package with those tools - in my case postgresql94 (PostgreSQL client programs and libraries).
On other distros you will need to find which package should be installed. AFAIK this issue is not present in Windows environment, pgadmin installer probably have all needed dependencies.
I was facing problem in restoring my database from backup, so I followed some steps:
Go to c:\ drive and find this path "C:\Program Files\PostgreSQL\13\bin"
Copy all the files from there then
past all the copied files to the given folder
"C:\Program Files\PostgreSQL\13\pgAdmin 4\runtime"
Your problem will definitely be solved.
You can go and check my video Where I showed step by step problem.
[link]
(https://youtu.be/GS3Dg0TfyFI)
Just reinstall your PGAdmin3.
We had the same problem on a Mac and after reinstallation, the right click menu showed more options like "Restore" and "Backup".
I had this issue (restore button disabled) and the problem was a corrupted dump.
So, I've created a new dump and tried again. After selecting the new file, the button became available.
in my case i'm on windows,
if python isn't installed, install it.
restart, and you're done.
I have checked in the pgadmin4 sql:
SELECT * FROM pg_available_extensions;
and got the current installed 2.1 which is not correct. You need to check on the db command line, the same query did result that the adminpack is NOT installed.
Solution: Logon to the DB on comand line and write
CREATE EXTENSION adminpack;

sqlplus doesn't start on linux 64

I installed, on Mint15 64bit, the Oracle Instant client package 11
Each time I try running sqlplus I get message
Error 6 initializing SQL*Plus
SP2-0667: Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
Of course I set correctly the $ORACLE_HOME. I tried to set LANG=us
Same result.
I tried with instant oracle 12.1, same results !?
Except waving to MariaDb ;) What part is wrong in my install ?
export ORACLE_HOME=/yourpath
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=your sid
sqlplus / as sysdba
Have you added the ORACLE_HOME bin path to the PATH and are you running the sqlplus command with oracle user.
Thanks & Regards,
Alok Thaker
The installation instructions at the bottom of the download page say:
Set the library loading path in your environment to the directory in Step 2 ("instantclient"). On many UNIX platforms, LD_LIBRARY_PATH
is the appropriate environment variable. On Windows, PATH should be
used.
You need to set LD_LIBRARRY_PATH, not (just) ORACLE_HOME. And make sure it's exported, not just set in your current shell.
Ok, Done...
In fact, the sqlplus binary must be in $ORACLE_HOME/sqlplus !
Larry... Why did you "hardcode" that ;)

what does "Connecting to database specified by database.yml" in the log file mean?

I'm working on a Rails 3.2.9 app , on performing a certain action, the app doesnt go any further and when i chech the log file i get this line to be the last in the log
Connecting to database specified by database.yml
I have no idea what's causing this problem.. When i sign up or sign in also it needs to connect to db and it works fine then.. only when a function (called execute test case) is clicked, the app doesnt go further and freezes there itself..
Please help me if you have come across this ...or suggest what may be the cause!!
Check this answer. This may help you.
Rails Connecting to database specified by database.yml
I found the cause of this error.. Problem is when the gem ‘mysql2’ is installed for the app , it might not be the one compatible with the version of MySQL server that is installed in our machine. And also a corresponding libmysql.dll file to be copied to Ruby folder.
So install the gem by specifying the local directory of Mysql
1.In the cmd,
gem install mysql2 -- --with-mysql-dir=C:\Program Files\MySQL
As directed in the cmd, follow the link to download the dll. Extract the zip from that location and copy the file as instructed in cmd
If the zip is empty or the link shows file not exist.(which does happen for some versions!!)
--> Go to the link and follow the flow in the url.. Like the website.. http://dev.mysql.com ->downloads -> MySQL Connectors -> MySQL Connector/C -> the latest version zips are displayed.. Choose the one with the exact file name as in the empty zip/broken link. If not click on previous GA versions and find the according zip file. Download, extract and copy the libmysql.dll to Ruby’s bin folder

Resources