on 04-21-2015 4:19 PM
Hi consultant,
I has a mistake, input wrong password many times and user SAP* & DDIC on client 000 was locked.
I try to unlock these user, but when i run a command on db2 (with Administrator permission) , it show me a error message:
"SQL1031N The database directory cannot be found on the indicated file system.
SQLSTATE=58031 "
I jus found this page: IBM SQL1031N when running DB2 command - United States
it show the direction - found the db2 instance, but i do not how to do
could you please help me do it, i very need open these user to config the system for the SAP services consultants check our system.
Thanks you for your read !
Best Regards,
Hien Nguyen
Hi,
I think, you must use for connect to DB name and not to instance name.
db2 connect to P01.
B.R.
Martin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hien,
It won't work because you missed double qoutes in the command, Please copy paste below commands and try..
db2 "list db directory on E:\db2\P01" or db2 "list db directory on \db2\P01"
db2 "select tabschema from syscat.tables where tabname = 'SVERS'" (Ends with ' and ")
Let me know the result
Regards,
Prithviraj.
Hi Hien,
In the screenshot you have fired both the commands at once.
You need to type db2 "list db directory on E:\db2\P01" if this doesnot work than give the command db2 "list db directory on \db2\P01"
Either of this should work
Also what is the result of
db2 "select tabschema from syscat.tables where tabname = 'SVERS'"
Did this work...?
Regards,
Prithviraj.
Hello Hien,
You still haven't confirmed back the following:
- If your SAP system is up and running
- if it is down, have you checked with your OS Admins if there is an issue with storage
- if it is up, are you executing all these commands on the correct system, my hunch is that you are logged into a passive node in a cluster environment. On the server can you find the Directory K:\db2\P01\sapdata4 ?
Further,
If you think you are on the correct server and system is up and running you can pack your SQL statements in a text file called test.sql
find the executable db2cli.exe on your system, copy/move test.sql in the same directory as db2cli.exe
And execute the command
db2cli execsql -dsn <Database> -inputsql test.sql
in your case it might be:
db2cli execsql -dsn P01 -inputsql test.sql
Regards,
Siddhesh
Dear Siddhesh,
Directory K:\db2\P01\sapdata4 is exactly i can access it via my computer. The db2 Database is running for SAP users.
The problem was done. I was restart Database Servers (we have 2 not running in clustering), after we do restart, it change the active node to another server and we can run db2 command successful. But we don't know how it done, could anyone give me some advice ?
Best Regards,
Hien
Hello Hien,
Could you please check the result of following command?
>> db2 list db2 directory on /db2/P01/
If it fails, then it might not be solved in a straight foward way.
Kind regards
Maria
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hien,
The correct command after you connect to DB using db2<sid> user is as below...
db2 "list db directory on /db2/<SID>"
db2 "select tabschema from syscat.tables where tabname = 'SVERS'" (Ends with ' and ")
The command should not work for /db2/db2<sid> path as far as I know.
Regards,
Prithviraj.
Hello Hien,
"db2 list db directory" gives the result, while "db2 list db directory on K:\db2\P01" returns same SQL1031N error. It seems to be some issues with database files under local database directory
You have to firstly check where the database directory exactly resides. The first result gives "K:\db2\P01\sapdata4". Is it really there? Does it have subfolder like NODE0000\SQL00001?
In any case, the repair is not straight forward, and may need to have SAP incident created.
Kind regards
Maria
Hello Hien,
With Any Database you first need to connect to it. Looks like you are executing the sql statement when you are not connected to the DB, hence you get an error.
Please read the following document before proceeding to execute sql statements.
DB2 Basics: Getting to know the DB2 UDB command line processor
Regards,
Siddhesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Hien,
Check if the directory K:\db2\P01\sapdata4 exists and its not empty. Looks like the command can't find the DB, this could happen if there is a problem accessing storage or the directory is offline.
Speak to your OS admins to check if the node (cluster node) is offline etc.
Regards,
Siddhesh
Hello Hien,
Can I also ask if everything is working at the moment ? Is SAP application up, it would be stupid of me to ask this after I have given you suggestions to check the DB is offline, but I thought i'll check.
Since, If SAP is up and you are attempting to reset password at DB level, are you sure you are on the correct node ?
Regards,
Siddhesh
Hi Hien ,
Have you logged on as db2<sid> user ? also log into the database server
If not login as db2<sid> user /server and try once again
also before executing any commands on the db , execute the following
db2 connect to <SID >
Thanks ,
Manu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.