I try to execute a very simple sql statement that sets isolation level in DB2. I do it like so:

```
>>> import ibm_db
>>> cnx = ibm_db.connect("sample", "root", "root")
>>> sql = "CHANGE ISOLATION TO CS"
>>> query_stmt = ibm_db.prepare(cnx, sql)
>>> ibm_db.execute(query_stmt)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
Exception

```

I also tried this:

```
>>> stmt = ibm_db.exec_immediate(cnx, sql)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
Exception

```

The query for setting isolation level I took from [this](https://www.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0001946.html) official tutorial. So, what's wrong with that and how can I fix it?

**EDIT**

I also tried other simple queries. And none of them works:

```
>>> ibm_db.exec_immediate(cnx, "LIST TABLES")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
Exception

```

It seems like I lack some configuration, but I do not know how to check it and how to debug it. Need help.

**EDIT**

I tried this in `DB2 CLP`:

```
db2 => set schema sample

```

And got this error message:

> 
> SQL1024N A database connection does not exist. SQLSTATE=08003
> 
> 
> 

However, when I do this:

```
db2 => LIST DATABASE DIRECTORY

```

I get this:

```
...
database alias   SAMPLE
database name    SAMPLE
...

```

So, what the heck is going on? PS. I'm working on Windows 10, if it matters.

**EDIT**

Well, I managed to connect to sample database in command line and even listed all tables. However, I cannot do the same thing in Python. I even tried other simple queries like `select * from act` - in the console I get a number of rows, but in Python I still get this `Exception`.

**PROOF**

Here is a proof:

[![enter image description here](https://i.stack.imgur.com/Ke7nE.png)](https://i.stack.imgur.com/Ke7nE.png)

As you can see on the first screen, everything is ok. However, the same thing does not work in Python according to the second screen.

[![enter image description here](https://i.stack.imgur.com/lYVRW.png)](https://i.stack.imgur.com/lYVRW.png)