简体   繁体   中英

SAP HANA: Temporary table not dropped automatically when connection pooling is enabled

I am using ADO.NET to connect SAP HANA database. I enable connection pooling in connection string like this: Server=hana-db:30015;Pooling=true;Max Pool Size=50;Min Pool Size=5;UserID=JSmith;Password=secret . But my problem is that, when I first connect to database and create a temporary table called #tbl, then disconnect without dropping #tbl. And when I reconnect to database, table #tbl still exists.
That doesn't happen when I set Pooling=false. So when Pooling=true, do I need manual drop temporary tables? Cause in MSSQL or Postgresql, temp tables dropped automatically when connection closed.

I believe in MSSQL it only drops the temp table on connection close when it's inside of a Stored Procedure. If your query is outside of a SP you will need to drop the temp tables yourself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM