Skip to content

Commit 608d5e5

Browse files
committed
Fix DB_NAME default to TravelHub
1 parent 80622ca commit 608d5e5

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

labs/interactive_agents/actions_agent_interactive.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def get_db_connection():
4747
user=creds['username'],
4848
password=creds['password'],
4949
port=creds['port'],
50-
database='DBOpsLab'
50+
database=os.getenv('DB_NAME', 'TravelHub')
5151
)
5252
return conn
5353
except Exception as e:
@@ -429,7 +429,7 @@ def recompile_object(object_name: str) -> Dict[str, Any]:
429429
if not row or row[0] is None:
430430
cursor.close()
431431
conn.close()
432-
return {'status': 'error', 'error': f"Object '{target}' not found in DBOpsLab"}
432+
return {'status': 'error', 'error': f"Object '{target}' not found in database"}
433433

434434
# Fail fast instead of queueing behind executions holding a schema stability lock.
435435
cursor.execute("SET LOCK_TIMEOUT 5000; EXEC sp_recompile @objname = %s", (target,))

labs/interactive_agents/data_lifecycle_agent_interactive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# Must be the workload database, NOT master. sys.tables, sys.dm_db_partition_stats and
1515
# dm_db_index_physical_stats(DB_ID(), ...) are per-database, so connecting to master
1616
# reports master's catalog instead of the workload tables.
17-
DB_NAME = os.getenv('DB_NAME', 'DBOpsLab')
17+
DB_NAME = os.getenv('DB_NAME', 'TravelHub')
1818

1919
# Helper functions
2020
def get_db_connection():

labs/interactive_agents/query_performance_agent_interactive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# Must be the workload database, NOT master. Query Store options
1515
# (sys.database_query_store_options) and the missing-index / index-usage DMVs are
1616
# scoped by DB_ID(), so connecting to master makes them silently return no rows.
17-
DB_NAME = os.getenv('DB_NAME', 'DBOpsLab')
17+
DB_NAME = os.getenv('DB_NAME', 'TravelHub')
1818

1919
# Helper functions
2020
def get_pi_client():

0 commit comments

Comments
 (0)