Welcome to MSDN Blogs Sign in | Join | Help

Feedback to the SQL Azure team

Hey all,

During PDC09 we spent a bunch of time handing a survey for folks to fill out to give feedback to the team.  I would really encourage you to fill this out.  If there’s a data type that you’d like to see supported, feature enabled, enhancement, etc please try some time to fill this out.

Thanks in advance from the SQL Azure team!

Posted by jcurrier | 0 Comments
Filed under: , ,

SQL Azure talks are now available online

Hey all,

My, "SQL Azure: Under the hood" talk is available for viewing now here.  During the talk, I referred to GopalK's earlier under the hood talk in mine so I've attached a link to this here for those that are interested.

You can also find some of the other talks for SQL Azure here as well:

Development Best Practices and Patterns for Using Microsoft SQL Azure Databases 

SQL Azure Database: Present and Future

Scaling out Web Applications with Microsoft SQL Azure Databases

The Future of Database Development with SQL Azure

Hope you find them interesting

--Jeff--

Posted by jcurrier | 0 Comments
Filed under: , ,

PDC is on!

I'm here in LA this week for PDC along with a bunch of other SQL Azure folks.  If you're interested in chatting, asking a question, etc have a swing by our both in the partner area and ask away!

Additionally, and this is a shamelss plug, but I'll be giving an under the hood talk tomorrow here at PDC.  The talk is, "SQL Azure: Under the hood" and it's taking place in 403B. 

Hope to see you there or in the booth! 

Posted by jcurrier | 0 Comments
Filed under: ,

SQL Azure PDC talks

So, a number of us are doing talks this year for PDC (myself included!).  You can find the full list here.  So, if you're going to be in LA for PDC this be sure to check out the sessions.  Having seen, and helped author, the content I know you'll enjoy it!

 

--Jeff--

Posted by jcurrier | 0 Comments
Filed under: , ,

SQL Azure and limits

Quite a few folks have been asking recently about the limits we have in SQL Azure and I thought I would take some time to chat about this here.  The question varies of course by the person asking but the question inevitably goes something the following, “Hey, why don’t you guys let me have a database bigger then 10 gigs… Are you guys ever going to support big workloads or large instances?”

The short answer is yes but the truth is almost always more complicated than simple answers like this.  Frankly, while we could increase the size here it’s important to think about what raising that limit means.  It means that if we experience a failover event (hard drive dies, node reboots, you get the picture) that it may take longer to get your database up and going on another node as data may need to be caught up from other nodes on the network.  This translates into reduced availability for you in the long run and this something we try really hard to avoid.

Secondly, what about the I/O?  If your databases are getting that large then might it not be more advantageous to shard?  We’ve observed that in many workloads it does.  Granted, this may not make sense in all cases but it does in many so in a sense there is a bit of tension between the need for larger individual user db’s and enhanced support for things like sharding.

Finally, as I allude to here it would be good to hear the community’s thoughts on larger instances versus enhanced support for sharding.  We’re still debating a bit internally on which of these to tackle and in what order so this is your chance to help influence this.

--Jeff--

Posted by jcurrier | 0 Comments
Filed under:

SQL Azure: Invite codes, traffic patterns and feedback.

We've sent out the first couple batches of invite codes this week for SQL Azure (apologies if you haven't yet received yours).  It's important to keep in mind that in general services tend to do this kind of thing for good reason.  So, what are the reasons? There are many but these are the two that I look at the most:

1) Traffic patterns - How are the newly on-boarded people using the service.  Are they using it in the manner that we thought they would or are they doing things we totally didn't expect.  Is there some constraint that we hadn't previously observed in our own in-house load/stress testing?  Thus far, this hasn't been the case for us :-)

2) Load - The second thing we're trying to understand how many people that we send invite codes to are actually using the service (thereby increasing the load on the system).  People consume resources in the system which, ultimately, there is a finite amount of.  Therefore, this needs to be monitored carefully. 

So far, we're looking good in these departments but my bet, if folks are like me, that we will see an increase in both of these things this weekend as people get more play time with the service.

Now, for those of you presently using the service.  The team would love to hear any feedback that you have on the primary service as well as the Portal experiences.  If you like you can comment here or better yet on the forums.  All feedback is appreciated and important for us as we figure out where we need to improve things in the service.  So, if you have 1 big grip (or several) please do drop a message.  It will be looked at.

Finally, for those of you who haven't yet received a code.  Please hang in there.  We are picking up the pace that we're sending these things out.  I know it's tough to wait (trust me) but we're getting out as fast as we can.

--Jeff--

Posted by jcurrier | 0 Comments
Filed under: ,

Coming up for air..

I've been rather silent here for sometime.  This is primarily due to the fact that the whole dev team for SQL Azure (SADB not SAD by the way) has been really pushing hard to make our deliverables for PDC this year.  As has been explained previously, we've done pretty much a 180 degree move here w.r.t the prior version of the service.  This takes, as you can imagine, quite a bit of work to pull off.

This week has been a week of relief for the team.  We're rounding out the release that will be available for early access to a limited set of early access customers.  We've got the bits running in the cluster, we're passing our load/stress tests on the system as well as our security tests.  It's one of those quiet moments where you reflect back on the hard work you've done before the storm kicks up again next week as we make the final engineering push for the PDC.

 It's a good day.

Posted by jcurrier | 0 Comments
Filed under:

Nigel and Zach talking about SDS

Hey, check out a new video of Nigel and Zach chatting about some of the changes that we're in the process of making to SDS.

Posted by jcurrier | 1 Comments

SDS Java JDBC examples

In my previous blog entry I mentioned that I would post some Java & JDBC examples for connecting to and interacting with the SDS service.  Since that post (roughly an hour ago) I’ve been called a, “slacker” by David Robinson one of the PM’s on the team.  Therefore, to show that I am not a, “slacker” I’ve decided to just post the code today.  Happy Dave :-)

So, in this example I’m using Java 1.6, NetBeans as the editor and the latest JDBC driver for SQL Server which you can download from here.  The only jar file I’m currently using to compile (and run with) other than the expected JRE jar files is the, “sqljdbc4.jar” jar file which comes along with the download I’ve linked to above.  NOTE: That if you choose to use an earlier version of JDBC it *must* support SSL.  This is a requirement for the service.

Now, I’ve purposely made this example to be the exact same as the C# example I did previously so you could focus more on the differences with the client technologies and less on the actual data I’ve created.  As you can see the only significant difference relative to SDS is the format of a couple of connection string values (namely the database, user id format and the initial url for the server).  Other than that it’s the same code that we would use to connect to locally. 

Now, with no further delay.  The Java code for working with SDS.

    public static void main(String[] args)
    {
        String createTableSql = 
                "CREATE TABLE [dbo].[tbl_Person]    " +
                "(                                                    " +
                "     [FirstName] NVARCHAR(64) NOT NULL,              " +
	            "     [LastName] NVARCHAR(64) NOT NULL                " +
                "    CONSTRAINT [personName_PK] PRIMARY KEY CLUSTERED " +
                "    (                                                " +
                "        [FirstName] ASC,                             " +
                "        [LastName] ASC                               " +
                "    )                                                " +
                ")";     
        
        String insertSql = 
                "INSERT INTO dbo.tbl_Person(FirstName, LastName) VALUES ('Jeff', 'Currier'); " +
                "INSERT INTO dbo.tbl_Person(FirstName, LastName) VALUES ('Nigel', 'Ellis'); " +
                "INSERT INTO dbo.tbl_Person(FirstName, LastName) VALUES ('David', 'Robinson');"+ 
                "INSERT INTO dbo.tbl_Person(FirstName, LastName) VALUES ('Jeff', 'Smith');";
                
        try
        {
            // First, format the connection string note that the server name here again is, “myserver”.  The database name (my user database name) is mydatabase.  
            String connectionUrl = "jdbc:sqlserver://myserver.data.dev.mscds.com;" +
                    "database=mydatabase;encrypt=true;user=jeff@myserver;password=*****";

            // Next, make the sure the SQL Server Driver is loaded.
            Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
            
            // Then attempt to get a connection.  This will null or throw if we can't
            // get a connection.
            Connection sqlConn = DriverManager.getConnection(connectionUrl);
            if (sqlConn == null)
            {
                System.out.println("Unable to obtain connection.  exiting");
                System.exit(1);
            }

            // Begin by creating the table we'll use.
            Statement sqlStmt = sqlConn.createStatement();
            sqlStmt.execute(createTableSql);

            // Then, insert some rows into the table that we just created.
            sqlStmt.execute(insertSql);

            // Now, select all of the, "Jeff' data from the table and print them out.
            ResultSet results = sqlStmt.executeQuery("select FirstName, LastName from tbl_Person where FirstName='Jeff'");
            while (results.next())
            {
                System.out.println("FirstName: " + results.getString("FirstName") + " LastName: " + results.getString("LastName"));
            }
            // Close the ResultSet up.
            results.close();

            // Finally drop the table and close the conneciton.
            sqlStmt.execute("drop table tbl_Person");
            sqlConn.close();
        } catch (SQLException ex)
        {
            System.out.println("Error: Unable to execute query ");
            ex.printStackTrace();
        } catch(ClassNotFoundException ex)
        {
            System.out.println("Error: Unable to load JDBC Driver!");
        }

    }
Enjoy,
--Jeff--
Posted by jcurrier | 3 Comments
Filed under: , , , ,

SDS coding examples – Part 1 (C# & ADO.NET)

So, as I did with the original SDS I want to outline some code examples that other developers can use to get a sense of how to interact with the service.  In general, this will be much easier now that we have shifted more to the relational model as some of the more abstract (okay maybe not sooo abstract) concepts don’t necessarily need to be explained from scratch.  Having said that, there are a few concepts that are worth covering before we dive into the code.

 

Servers, and Masters, and User Databases,  oh my!

There are really two different types of databases that we have present in SDS now.  The first, and the one that you’ll generally interact with the most, is the user database.  This is really where your user data resides.  You’re in charge in this space.  You define the tables, schemas and what have you that appear in this database.  We may insert some data into locked down tables (and present them to you with views) here to help assist you with debugging and provide some metrics data but by in large this is your house.  NOTE: The name you choose here for your user database (“mydatabase” in the example below) is the name of the database you specify in the connection string.

connStringBuilder.InitialCatalog = "mydatabase"; // Specify your user database to connect to. 

The second type of database is really what we refer to as the logical master database (or server database) but it actually encapsulates two different things.  The first thing is that the server represents a logical master database.  This is the database where we keep track of all of the user databases that you have on this logical server. It’s important to note that this is *not* a real server and is more logical in nature.  We will also store things your metrics here as well as login information NOTE: Because we store login information here this is why you have specify your server name in the user id as certain elements don’t come across in the initial TDS packets we receive.

The second important thing to note about the server database is that is associated (along with each of the user databases managed by it) with a particular geo-location.  You will pick the geo-location when you go through the provisioning process and requests will be routed to your servers by taking advantage of the DNS system as once done previously.  The code snippet below illustrates how the server presents itself in the connection string.

connStringBuilder.DataSource = "myserver.data.dev.mscds.com"; // Specify the DNS name of my SDS server (which holds my master db).
connStringBuilder.UserID = "jeff@myserver";                   // Specify my user id (and the server name which holds my master db)
On to the code

So now with no further delay is some sample code.  It’s simple (on purpose) but it illustrates the types of operations that you’ll be able to do (DDL & DML).  In this example, I simply create a table, insert some rows, select some rows from that table, and finally drop the table in the end.  Here you go!  If you have other questions around the code please feel free to comment and I’ll try to reply as soon as I can.

        static void Main(string[] args)
        {
            // Begin, by constructing the connection string using the SqlConnectionStringBuilder class for
            // simplicity.  I could just use String.Format but this makes it a bit easier to explain what
            // we're doing with each parameter.

            SqlConnectionStringBuilder connStringBuilder = new SqlConnectionStringBuilder();
            connStringBuilder.DataSource = "myserver.data.dev.mscds.com"; // Specify the DNS name of my SDS server (which holds my master db).
            connStringBuilder.InitialCatalog = "mydatabase";              // Specify your user database to connect to.
            connStringBuilder.Encrypt = true;                             // Specify that I would like the channel to be encrypted.
            connStringBuilder.UserID = "jeff@myserver";                   // Specify my user id (and the server name which holds my master db)
            connStringBuilder.Password = "****";                          // Finally, specify my password.

            string createTableSql =
                @"CREATE TABLE [dbo].[tbl_Person]
                (
                     [FirstName] NVARCHAR(64) NOT NULL,
	             [LastName] NVARCHAR(64) NOT NULL
                    CONSTRAINT [personName_PK] PRIMARY KEY CLUSTERED
                    (
                        [FirstName] ASC,
                        [LastName] ASC
                    )
                )";

            string insertSql =
                @"INSERT INTO dbo.tbl_Person(FirstName, LastName) VALUES ('Jeff', 'Currier');
                  INSERT INTO dbo.tbl_Person(FirstName, LastName) VALUES ('Nigel', 'Ellis');
                  INSERT INTO dbo.tbl_Person(FirstName, LastName) VALUES ('David', 'Robinson');
                  INSERT INTO dbo.tbl_Person(FirstName, LastName) VALUES ('Jeff', 'Smith');";
            try
            {
                // New up a connection to my previously provisioned user database just as I would to any other database.
                // and then open it.
                using (SqlConnection conn = new SqlConnection(connStringBuilder.ToString()))
                {
                    conn.Open();

                    // Construct a new SqlCommand object that we'll use to execute execute our Sql code.
                    using (SqlCommand cmd = conn.CreateCommand())
                    {
                        // Use the above defined SQL to create a simple table that we'll to construct a table for this
                        // example
                        cmd.CommandText = createTableSql;
                        cmd.CommandType = CommandType.Text;
                        cmd.ExecuteNonQuery();

                        // Insert some simple data into that table.
                        cmd.CommandText = insertSql;
                        cmd.CommandType = CommandType.Text;
                        cmd.ExecuteNonQuery();

                        // Next, perform a simple select finding all of the persons in the table whose first name is Jeff.
                        cmd.CommandText = "select FirstName, LastName from dbo.tbl_Person where FirstName = 'Jeff'";
                        cmd.CommandType = CommandType.Text;
                        using (SqlDataReader reader = cmd.ExecuteReader())
                        {
                            while (reader.Read())
                            {
                                Console.WriteLine("First Name: {0} LastName: {1}", reader["FirstName"],
                                                  reader["LastName"]);
                            }

                            reader.Close();
                        }

                        // Finally, drop the table since we no longer need it.
                        cmd.CommandText = "Drop table dbo.tbl_Person";
                        cmd.CommandType = CommandType.Text;
                        cmd.ExecuteNonQuery();
                    }

                    conn.Close();
                }
            }
            catch (SqlException ex)
            {
                Console.WriteLine(ex);
            }
        }

Now, this example was in C# and used SqlClient (ADO.NET) but my next example will use Java & JDBC.  If there are other languages (toolkits) you would like to see us illustrate please comment here or on the main SDS blog and we’ll try to get them out as soon as we can.

Enjoy!

--Jeff--

Posted by jcurrier | 7 Comments

Check out Nigel's Talk on SDS from MIX09

Looks like the MIX folks have posted up Nigel's talk on the newly revamped SDS from MIX.  You can watch it now here.

Posted by jcurrier | 0 Comments
Filed under: , ,

It’s been awhile…

So, it’s been quite awhile since I’ve posted but with the recent SDS announcement I trust you now know why that is.  While I’ll be posting some code samples shortly for accessing the new SDS service via ADO.NET as well as with Java I’d like to give a plug for Nigel’s upcoming MIX09 talk on SDS. 

I don’t want to steal any thunder from the talk next week so I’m going to hold off on talking much more about the service until after Nigel’s talk is completed.  Keep posted though as you will see more details coming out from the team post MIX.

Finally, I’ve seen quite a bit of traffic in the blog community recently with concern that our new model doesn’t scale.  I’ll just say this, we are all familiar with CAP conjecture, we do know what it takes to scale a relational store.  We’ve done this once (with the initial version of Sitka which was built on the same technology) we will do it again.  The larger question is getting the right application patterns in place so apps perform well on the system.  That’s it for now but stay tuned.

Posted by jcurrier | 1 Comments

SDS Channel 9 Video is up

A little while ago Jason and I recorded a Channel 9 video to discuss some of the newer features in SDS (SQL Data Services).  Now that all the Azure components have been announced this is now available up at the Channel 9 site.  You can view it here.

Channel 9 interview for PDC

Jason and I just finished recording a session on some of the new features of the services that will be announced at PDC next week (along with some others such as Blobs).  Keep in eye out for it.  I think you'll enjoy it!

--Jeff--

Posted by jcurrier | 2 Comments
More Posts Next page »
 
Page view tracker