Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8033447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:42:01+00:00 2026-06-05T01:42:01+00:00

I am new in sql azure. Now i am facing a big problem that

  • 0

I am new in sql azure. Now i am facing a big problem that is because of SQL Azure federation. In one of my project I want to use federation. For that I want to read data from all federation. How can I check total number of federation in the server and read data from the federation? And also how can I insert data into the federation?
currently I am using:

string strSQL = @"SELECT f.name, fmc.federation_id, fmc.member_id, fmc.range_low, fmc.range_high " +
                                                            "FROM sys.federations f " +
                                                            "JOIN sys.federation_member_distributions fmc " +
                                                            "ON f.federation_id=fmc.federation_id " +
                                                            "ORDER BY fmc.federation_id, fmc.range_low, fmc.range_high";
        string strTableName = "federation_member_distributions";

        try
        {
            using (SqlConnection connection = new SqlConnection(csb.ToString()))
            {
                connection.Open();
                sbResults.AppendFormat("-- Open {0}\r\n\r\n", csb.ToString());

                data = new DataSet();
                data.Locale = System.Globalization.CultureInfo.InvariantCulture;

                using (SqlCommand command = connection.CreateCommand())
                {
                    // Connect to federation root or federation member
                    command.CommandText = "USE FEDERATION ROOT WITH RESET";
                    command.ExecuteNonQuery();
                    sbResults.AppendFormat("{0}\r\nGO\r\n", command.CommandText);
                }

                //Retrieve federation root metadata, and populate the data to the DataGridView control
                SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(strSQL, connection);
                sqlDataAdapter.Fill(data, strTableName);
                sbResults.AppendFormat("{0}\r\nGO\r\n", strSQL);
            }

        }
        catch (Exception ex)
        {

        }

but it does not work

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T01:42:04+00:00Added an answer on June 5, 2026 at 1:42 am

    For your above questions you really need to look these articles which talks about how to use SQL Azure Federation:

    Introduction to Fan-out Queries for Federations in SQL Azure (Part 1): Scalable Queries over Multiple Federation Members, MapReduce Style!

    Above you can find Fanout sample tool which has the code that show you how to get data out from Federation(s).

    The second part of this sample “Fan-out Querying for Federations in SQL Azure (Part 2): Scalable Fan-out Queries with TOP, ORDER BY, DISTINCT and Other Powerful Aggregates, MapReduce Style!” show how you can run fan-out queries with particular examples.

    Try above sample and let us know if you met any problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to Azure, I want to know about how we can implement SQL
I am querying through linq to a SQL Azure database. When a new company
I am writing some new SQL queries and want to check the query plans
I need to create an entirely new Sql Server 2008 database and want to
I'm new to SQL and could use some help in creating a database schema
I am trying to use a Database in SQL Azure. I have installed SQL
I want to Install New SQL Server 2008 Instance. I want to know whether
I'm new to Azure, I want to know about how we can implement Data
Sql Azure allows to copy databases both within one instance and across multiple instances
We have moved a database from SQL 2000 to a new SQL 2005 that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.