Azure SQL Databse
6 TopicsGetting Started with Azure SQL Database
Imagine you’re building an app that needs to store and manage loads of user data securely and efficiently. With Azure SQL Database, you can set up your database in minutes, scale it as you grow, and access powerful tools to run your first SQL queries with ease. Dive into our step-by-step guide and get started on transforming your app’s data handling today! In this blog, we’re unlocking the potential of Azure SQL Database, guiding you through setup, configuration, and your first SQL commands. Whether you’re developing or deploying, this guide has you covered for a smooth start in Azure.2KViews3likes1CommentAbout Azure SQL Database
Hi, how are you? I wonder if you can help me to understand something about Azure SQL Database in the Azure Calculator. This is: I have read extensively https://azure.microsoft.com/en-us/pricing/details/azure-sql-database/single/#pricing and https://learn.microsoft.com/en-us/azure/azure-sql/database/serverless-tier-overview?view=azuresql&tabs=general-purpose. I understand that Min and Max vCores is the range in wich the compute will be scaled and billed, but I can get: CPU Used Memory Used Duration. ¿Is this the auto pause delay (https://learn.microsoft.com/en-us/azure/azure-sql/database/serverless-tier-overview?view=azuresql&tabs=general-purpose#create-serverless-db)? I hope you can help me to understand Best regards Jona700Views0likes2CommentsNeed help in restoring table using large .sql data file(4GB)
We have run into a situation where we need to restore the data into a SQL table. We have taken backup of data only using MS SQL Server and the .sql file size is 4 GB. Since we are unable to open this file in SQL server, we are using sqlcmd to execute this file but after restoring 140K records it is throwing some syntax error (Unclosed quotation mark after the character strig 'abc_121223354565 and incorrect syntax near 'abc_121223354565 ). The .sql file has total 240K records in it. Questions: 1. When the backup was provided by SQL server only, why it is throwing syntax error? 2. How to open this large file to fix the syntax error? if option 2 is not possible, how do we split the large file into smaller chunks so we can identify the exact place where the issue is? Thanks, Srikanth400Views0likes5CommentsLesson Learned #512: Handling Connection Reuse in ODBC After a Critical Error
Working on several connectivity cases with ODBC across different programming languages, I’ve noticed a behavior that I would like to share, as it can lead to incorrect conclusions about whether a connection has actually been closed. In one of these cases, I found that once a connection is established, if a query execution results in a code error, timeout, or any other critical issue, reusing the same connection to execute another query may produce Connection closed messages. This behavior occurs because, when a critical error happens, ODBC drivers set an internal flag indicating that the connection is no longer in a 'clean' state. This flag prevents further commands from being executed on the connection until it is fully closed and reopened. In these situations, the best approach is to open a new connection to avoid further issues. def TestConnectionErrorReuse(): try: thread_id = threading.get_ident() conn, db_name = ConnectToTheDB(querytimeout=10) if conn is None: logging.info(f'(TestConnectionErrorReuse) - Thread: {thread_id} - Failed to establish initial connection. Exiting...') return cursor = conn.cursor() # Step 1: Execute a query that will cause an error (division by zero) try: logging.info(f'(TestConnectionErrorReuse) - Thread: {thread_id} - Executing a query that will cause an error (SELECT 1/0)...') cursor.execute("SELECT 1/0") # This should trigger a division by zero error except pyodbc.Error as e: logging.error(f'(TestConnectionErrorReuse) - Thread: {thread_id} - Error during query execution: {e}') # Step 2: Attempt to reuse the connection by running another query try: logging.info(f'(TestConnectionErrorReuse) - Thread: {thread_id} - Attempting to execute a follow-up query after error...') cursor.execute("SELECT 1") # Simple query to test reuse of connection row = cursor.fetchone() print(f"(TestConnectionErrorReuse) - Thread: {thread_id} - Follow-up query result: {row[0]}") except pyodbc.Error as e: logging.error(f'(TestConnectionErrorReuse) - Thread: {thread_id} - Error reusing connection after previous failure: {e}') except Exception as e: logging.error(f'(TestConnectionErrorReuse) - Thread: {thread_id} - Unexpected error occurred: {e}') finally: if conn: conn.close() logging.info(f'(TestConnectionErrorReuse) - Thread: {thread_id} - Connection closed.')