Am connecting azure sql from visual studio 2019.
I try to create database from VS. but its showing following error.
Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the
server is not responding.
CREATE DATABASE operation failed. Internal service error.
MY Code
SqlConnectionStringBuilder xconstr = new SqlConnectionStringBuilder();
xconstr.DataSource = "xxxx.database.windows.net";
xconstr.UserID = "xxxxx";
xconstr.Password = "xxxxxx";
xconstr.InitialCatalog = "xx";
xconstr.ConnectTimeout = 360;
SqlConnection con = new SqlConnection(xconstr.ConnectionString);
con.Open();
SqlCommand cmd = new SqlCommand("CreateDatabase ", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@dbname", dbname);
cmd.ExecuteNonQuery();
con.Close();
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…