No OFFSET command in SQL Azure?

Note: I am a noob at working with databases, as will likely be clear.
I just upgraded my website to use AzureWebsite's built-in SQL database, upgrading from the SQLCE (.sdf) files that came with the default WebMatrix install.  As part of this process, my local database now appears to be a SQLExpress Server (SQL Server
10.50.4000 is what it says in the Server Management Studio).
My OFFSET commands no longer seem to work.  It works when I upload the code to Azurewebsites, but locally, the following command: 
Line 134: var sqlGetImage = "SELECT * FROM CandidateImage WHERE CandidateID= @0 ORDER BY CandidateID OFFSET BY @1 ROWS";
Line 135: var qImg = gdb.QuerySingle(sqlGetImage,candidate,rndImage);
Returns the following result:
Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near 'OFFSET'.
I kind of need OFFSET to do what I want to do in a non-terrible way (I want to choose a random candidate out of the possible SELECT results).  My question:
1) Is there a way to do what I want to do that works on both platforms?  Or alternatively
2) Do I have my development environment set up wrong?  It's hard to imagine most people work in a way where this is possible.

Hi Damion Schubert,
According to your description, we need to verify if you want to use offset and fetch to be added after the ORDER BY clause in SQL Azure database and SQL Server database. If yes, in Windows SQL Azure
 database, it support ORDER BY with OFFSET and FETCH. However, the form of OFFSET and FETCH is a new T-SQL features in SQL Server2012. Since your local database is SQL Server Express 2008R2, when you use offset function, it will occur error.
Usually, with earlier version of SQL Server , to accomplish paging , we are using the ROW_NUMBER. Since SQL Server 2012 we can use the keywords OFFSET and FETCH where OFFSET is the number of row to skip and FETCH the number of row to take. For more information,
you can review the following article.
http://blog.clicdata.com/2013/05/03/paging-with-sql-server-2012-and-sql-azure/
http://dbadiaries.com/new-t-sql-features-in-sql-server-2012-offset-and-fetch
Regards,
Sofiya Li
Sofiya Li
TechNet Community Support

Similar Messages

  • Sql Azure - Change Database Owner

    Is it possible to change the owner of a database in SQL Azure? I have a database that I'm trying to make a copy of, which I am not the owner of. My research seems to show that only the account that created the database (the owner) is allowed to run a command
    such as CREATE DATABASE ... AS COPY OF ...

    Hi lexk,
    According to your description, currently, personally, there is only one login which acts as the administrator. Usually, when you create a server in SQL Azure, you will create this login at the same time, which has access to all databases in the Server. You
    may create other login, however, they are less privileges than the administrator. So only the administrator can execute the create database ..as copy of .. command in SQL Azure database.
    This command requires that you must connect to master database, and also you must have the create database permission in the copy database. Even if you create a login and user in master database, and grant dbmanager permission to this user, when you execute
    the following command after connecting to master database, it will still show error 262.
    Create database <newname> as copy of < exist database>
    Msg 262, Level 16, State 1, Line 1
    CREATE DATABASE permission denied in database ' exist database '.
    If you just want to run create database command in SQL Azure database, you can ask the administrator to grant dbmanager role to your own login. For more information, see:
    http://msdn.microsoft.com/en-us/library/azure/ee336235.aspx
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • "The CREATE USER statement must be the only statement in the batch" in SQL Azure - why? what to do?

    I'm getting an error on a line in the middle of a larger sql script, only in SQL Azure.
    IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'foouser')
    CREATE USER [foouser] FOR LOGIN [foouser] WITH DEFAULT_SCHEMA=[dbo]
    GO
    Error: "The CREATE USER statement must be the only statement in the batch."
    I don't actually understand what 'the only statement in the batch' means.
    What is a batch? Is it a SQL file? Is it related to a 'GO' statement or an 'IF' statement? What is the reason for the error? And how do I avoid it?
    Thanks,
    Tim

    >IF...ELSE imposes conditions on the execution of a Transact-SQL statement
    I understand the general purpose of an If statement. I could let go of our definition of statement counting disagreeing too except that because of the error I'm stuck.
    It's less important for Create User but what I am really puzzled over now is a very similar issue how am I supposed to do a safe version of CREATE LOGIN, when I don't know whether a login has been previously created on the server or whether I
    am setting up the database on a clean server?
    IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = N'foouser')
    CREATE LOGIN [foouser] WITH PASSWORD = 'asdfasdf'
    GO
    If I try and execute this script, it throws the same error as above.
    The first unworkable workaround idea is to omit the if statement
    CREATE LOGIN [foouser] WITH PASSWORD = 'asdfasdf'
    GO
    But if the login already exists on the server (because a similar script was already run), then the script throws an error.
    The second unworkable workaround idea is to do
    DROP LOGIN [foouser]
    GO
    CREATE LOGIN [foouser] WITH PASSWORD = 'asdfasdf'
    GO
    Obviously this throws an error in the second block if the login doesn't already exist on the server.
    The third workaround idea I have is to go conditional by putting an IF condition around DROP instead of CREATE:
    Unfortunately that doesn't work for me either!
    "The DROP LOGIN statement must be the only statement in the batch"
    (This is despite the fact that 'drop login' is listed on the
    supported commands page, not the partially supported page..?! Which disagrees with the notes on
    this page.)
    Anyway the real question I am interesting in addressing is: is there actually a way to have a 'Create/Delete login
    if exists' operation which is SQL-Azure compatible and doesn't throw me error messages (which messes with the sql execution tool I am using)?
    If there is no way, I would like to believe it's because it would be a bad idea to do this. But in that case why is it a bad idea?
    Tim

  • SQL Azure - Intermittent The wait operation timed out

    I have a website engine which runs a few hundred "white label" sites. It's hosted on Azure with a SQL Azure Business database. Generally everything is fine - it all works and runs at a good speed.
    However, throughout the day I get maybe 40 or 50 of the error:
    System.ComponentModel.Win32Exception: The wait operation timed out
    Please don't refer me to the connectivity blog at http://blogs.msdn.com/b/sqlazure/archive/2010/03/22/9982979.aspx as this seems to refer to problems where you just can't connect. My problem is that it's fine most of the time, but I still get these
    intermittently.
    This is sometimes on the main database, but we're also using a database for sessions and this gets the errors too. Both databases are on the same server.
    I also get errors like: 
    An existing connection was forcibly closed by the remote host
    and:
    System.Data.SqlClient.SqlException: The service has encountered an error processing your request. Please try again. Error code 40143. A severe error occurred on the current command. The results, if any, should be discarded.
    and, when evil bots are hammering the site:
    System.Data.SqlClient.SqlException: Resource ID : 1. The request limit for the database is 180 and has been reached. See 'http://go.microsoft.com/fwlink/?LinkId=267637' for assistance.
    Each website can potentially have a Google footprint of around 10,000 pages. The result it that bots are hitting the sites regularly, indexing lots of pages for hundreds of sites. I also have some worker roles doing data work. The database is clearly busy!
    I am hoping to add 2 or 3 times the number of sites that I currently have to the "engine". 
    I am looking at efficiency where possible, but the sites are clearly under a fair load from bots and visitors.
    My question is, will one of the upgrades from Business to S2, P1, P2 or P3 resolve these problems? The financial cost of these database instances stagger greatly so I wouldn't want to update and find I'm left with the same problems but am paying many times
    more each month.
    Thank you in advance.

    Hello,
    For Web/Business edition database, the maximum limit of concurrent requests is 180. Beyond this limit, you will receive error.
    The Max woker threads for Standard(S2) is 100, you should upgrade your database to Permium tier.
    The concurrent requests limit of premium database varies depending on the reservation size of a premium database. For example, for P1, the max worker threads is 200.
    Reference:Azure SQL Database Resource Governance
    Azure SQL Database Service Tiers and Performance Levels
    Regards,
    Fanny Liu
    If you have any feedback on our support, please click here. 
    Fanny Liu
    TechNet Community Support

  • Unable to drop SQL azure table

    Hi,
    I'm trying to drop SQL azure table. However I can delete data inside the table. When using drop command, it is taken long time processing and finally this error message 'Connection Failed'. Please help me. Thanks

    That sounds like an internal error in SQL Server which may be due to corruption. Don't really know how you deal with that in Azure. But if DBCC CHECKDB is available, run it and see what happens.
    Also, do you have any DDL triggers on the database? In such case, disable the trigger, in case it is the trigger that is failing.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Need a better way than killing connections in SQL Azure - Governor

    I've been pushing the boundaries of  SQL azure (S0 and S1) recently. 
    I'm at a point where normal T-SQL code needs to be optimized for SQL azure, I was surprised that all Microsoft have done was enhance the governor process and kill the connection  rather than slow down the connection, guess this was the easy path to
    use. 
    Simple T-SQL statements like MERGE need to be rewritten to support large data (1 million rows).  Given you need to batch core T-SQL commands you need to answer yourself is this the correct approach.  Also had the same issue using SQL Bulk Copy
    but tweaked a few settings to get around that issue. 
    S0 & S1 still haven't got the same IO as Web/Business edition hence Microsoft need to fix this ASAP.
    Is SQL Azure worth that extra hassle compared with other DB engines?
    Micatio Software Free IIS Azure Web Log App

    Hi Jan,
    Its not the command timeout (for example set as 0 in SQL management studio). 
    I've seen it many times where the last wait type is the LOG GOVERNOR. 
    A few minutes later the status is set as KILLED/ROLLBACK.  I can get around the issue by batching the MERGE statement  and it works fine.  
    I would understand if the MERGE was running for 1-2 hours and I've seen the same thing occur when using a bulk insert command in C# (resolved by limiting the batch size, streaming, etc.).
    The azure version is Microsoft SQL Azure (RTM) - 11.0.9230.176.
    The log governor does kill connections, this is documented on a few sites and MSDN.  LOG GOVERNOR was a SQL Enterprise feature in the standalone product except Microsoft in there wisdom ported it across into SQL Azure to resolve users running bad queries
    on the infrastructure.
    Micatio Software Free IIS Azure Web Log App

  • Unable to rebuilding clustered index in SQL Azure

    Hi,
    I'm trying to rebuild a clustered index in SQL Azure.  The table is quite large, and I'm attempting an offline rebuild using:
    ALTER INDEX PK_Asset ON dbo.Asset
    REBUILD 
    Unfortunately, I'm unable to complete this operation because the operation fails with a timeout.  I've tried it several times, but with no success.
    The index fragmentation is estimated to be around 85%, so I'm quite keen to reduce this.
    Does anyone have any tips for getting around this in SQL Azure?
    Thanks,
    Nick

    I believe you must be getting these error messages while tyring this operation:
    Msg 40552, Level 20, State 1, Line 1
    The session has been terminated because of excessive transaction log space usage. Try modifying fewer rows in a single transaction.
    Msg 0, Level 20, State 0, Line 0
    A severe error occurred on the current command.  The results, if any, should be discarded.
    Creating, rebuilding and dropping indexes could generate a lot of transaction log records and may hit this error msg on larger tables. You may be able to work around the issue by creating a new table with the desired index layout, and then move the data
    in smaller chunks over to the new table. However in most cases, you can minimize transaction log space usage with index operations by using the ONLINE option with your statement. Specifying the ONLINE=ON with CREATE, ALTER and DROP INDEX operations change
    the characteristics of the execution. Instead of a single large transaction, the operation is performed in multiple shorter transactions in the background without holding exclusive locks for extended periods of time on the rows. This both improves concurrency
    during the execution of the operation, and it eases the transaction log space requirement for the operation. This can help you avoid the 40552 exception.
    PS: The rebuild command using the ONOINE=ON may also fail if you have BLOB datatype colume (datatype like ttext, image, varchar(max), nvarchar(max), varbinary(max), xml, or large CLR type).
    HTH,
    Thanks and regards,
    __Raman
    Raman Sharma - MSFT Microsoft

  • Out of nowhere, consistant query failures, SQL Azure USA South, Timeout expired. or TransientFailure exceptions..

    Getting a bunch of SQL query failures since yesterday morning pacific time. Have not made changes to any code in months, and server load is about same as it has been for a year. Are you guys doing anything to SQL Azure? This is USA South.
    This is a 20MB database and I'm doing queries on tables with couple thousand entities, shouldn't fail like this!
    Using latest EntityFramework 6.1.1.
    Fails at the SQL server no matter where I connect from.
    Compiled Linq to Entity queries seem to be failing. The do have some .Includes..
    These are the two most common issues:
    System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to
    completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception: The wait operation timed out
       --- End of inner exception stack trace ---
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
       at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
       at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
       at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.<Reader>b__c(DbCommand t, DbCommandInterceptionContext`1 c)
       at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
       at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext)
       at System.Data.Entity.Internal.InterceptableDbCommand.ExecuteDbDataReader(CommandBehavior behavior)
       at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
       at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
       --- End of inner exception stack trace ---
       at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
       at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
       at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.<GetResults>b__6()
       at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
       at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.<GetResults>b__5()
       at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
       at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
       at System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
       at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
       at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
       at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
    and
    System.Data.Entity.Core.EntityException: An exception has been raised that is likely due to a transient failure. If you are connecting to a SQL Azure database consider using SqlAzureExecutionStrategy. ---> System.Data.Entity.Core.EntityCommandExecutionException:
    An error occurred while executing the command definition. See the inner exception for details. ---> System.Data.SqlClient.SqlException: A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - An existing
    connection was forcibly closed by the remote host.) ---> System.ComponentModel.Win32Exception: An existing connection was forcibly closed by the remote host
        --- End of inner exception stack trace ---
        at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
        at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
        at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
        at System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
        at System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
        at System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
        at System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value)
        at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
        at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
        at System.Data.SqlClient.SqlDataReader.get_MetaData()
        at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
        at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
        at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
        at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
        at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
        at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
        at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext)
        at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
        --- End of inner exception stack trace ---
        at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
        at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
        at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
        at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.<GetResults>b__5()
        at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
        --- End of inner exception stack trace ---
        at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
        at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
        at System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
        at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
        at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
        at System.Data.Entity.Core.Objects.CompiledQuery.ExecuteQuery[TResult](ObjectContext context, Object[] parameterValues)
        at System.Data.Entity.Core.Objects.CompiledQuery.Invoke[TArg0,TArg1,TResult](TArg0 arg0, TArg1 arg1)

    Hi,
    I’m writing to follow up with you on this post. Was the problem resolved after performing our action plan steps?If you are satisfied with our solution, I’d like to mark this issue as "Answered". That way, other community members could benefit from
    your sharing.
    Thanks,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Alternatives to CONTEXT_INFO on SQL Azure

    Hi,
    We use CONTEXT_INFO in an application we currently are looking to move to SQL Azure however CONTEXT_INFO is already used to troubleshooting purposes by SQL Azure. Are there any built in alternatives in SQL Azure?
    Thanks,

    Hmm, still no answer since August of 2010?  I hope MS has something for us that use this.  I'll give an example I use CONTEXT_INFO in an applicaiton.
    I use CONTEXT_INFO to prevent users from modifying a table using SQL Studio.  I do this by setting a CONTEXT_INFO in my c#/vb code like so after a begin transaction, along with other TSQL commands, I have this little guy.
        DECLARE @x varbinary(4); SET @x = cast(-1 as varbinary(4)); SET CONTEXT_INFO @x
    update dbo.CusCharges set PaymentAmount=5 where CusChargeAmount=10 and CustomerId=30
    So then in a particular table, in the trigger (after update, insert) I have this piece of code (shown below)This will allow my application to update the table, but casual TSQL users which don't know about this won't be able to perform an update to this table directly.This works great, except in Azure-land where sysprocesses is not available. So how can I pass down a special variable to a trigger in the context of a transaction?If course, someone could still use TSQL studio, but they would really need to examine the trigger and know what they are doing. This just prevents thebeginning DBA from wiping out Customer Charges for the past decade in a table (it's happened, which is why I put it in).  declare @SessionNid int
        select @SessionNid = cast(substring(CONTEXT_INFO,1,4) as int) FROM master.dbo.sysprocesses WHERE spid = @@SPID
        if @SessionNid = 0 begin
            raiserror('You cannot directly modify dbo.CusCharges.', 16, 1)
            rollback transaction
            return
        end

  • Crystal Reports and SQL Azure

    I'm trying to print a report created by Crystal Reports, which the application is run on the client run, NOT run on Windows Azure, and I grant the client IP to allow it to connect to the SQL Azure to retrieve data for the report.
    However, it throw an exception when the client application process the report file, I try to host the database locally and trace the sql it executed in profiler, then run each sql command on the SQL Azure to find out which line of sql command cause the
    problem.
    Finally, I find out that Crystal Report will call "sp_procedures_rowset" and "sp_columns_rowset", which are not existed on SQL Azure.
    Any workarounds to solve this issue?

    Hi Barry,
    Yes, "sp_procedures_rowset" and "sp_columns_rowset" are not existed on SQL Azure. You
    can check with below statement:
    EXEC 
    sp_helptext
    'sp_procedures_rowset'
    I’m afraid you cannot use it in your report. Could you create your own Stored
    Procedure?  
    Thanks,
    Raymond                                          
    Raymond Li - MSFT

  • How to add description of a column of a table in SQL Azure

    Hi
    I have some tables in my application database where there are descriptions added against certain columns. Needless to say they were done by using sp_addextendedproperty.
    Now I am trying to migrate the Database to SQL Azure. SQL Azure does not support sp_addextendedproperty.
    Hence I am not able to figure out how to add descriptions to those columns.
    Any help would be much appreciated.
    Thanks
    Soumyadeb

    Hello,
    Just as Latheesh post above, Windows Azure SQL database are not support extended stored procedures. That’s one of the limitations on SQL database, and I don’t know there is another way to achieve the same on Azure.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Cannot refresh data in Excel Services with SQL Azure databases

    I am using Excel Services on a SharePoint Online.
    I get my data from a SQL Azure. When i create my Excel repor with Excel 2013 pro I have no problem. So I upload my file on my Sharepoint and try to refresh data.
    Connexion : Power Query - RPT_Event_ByEventType 
    Erreur : Erreur sur site (OnPremise) : Sorry, the data source for this data connection isn't registered for Power BI. Ask your Power BI
    admin to register the data source in the Power BI admin center. 
    I do not understad why I get that error because my data source is on Azure why It told me "OnPremise" ?

    hi,
    >> this button of excel gets just address of web and have button for import it
         i test it by rest API project , but doesn't work, do you know how it is work?
    Do you mean that you don't know how to get the table? You may input the site address into the address box, and then click go button nearby, select the table you want to import into the Excel. Then click import button.That also works for  rest API,
    and your rest API should get the data that you want
    By the way, this is the forum for discussions about Excel develop(VBA ,customization), better to go to TechNet forum for Excel for Excel features question, so that you could get more professional help.
    Best Regards
    Lan
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Performance is too slow on SQL Azure box

    Hi,
    Performance is too slow on SQL Azure box (Located in Europe)
    Below query returns 500,000 rows in 18 Min. on SQL Azure box (connected via SSMS, located in India)
    SELECT * FROM TABLE_1
    Whereas, on local server it returns 500,000 rows in (30 sec.)
    SQL Azure configuration:
    Service Tier/Performance Level : Premium/P1
    DTU       : 100
    MAX DB Size : 500GB     
    Max Worker Threads : 200          
    Max Sessions     : 2400
    Benchmark Transaction Rate      : 105 transactions per second
    Predictability : Best
    Any suggestion would be highly appreciated.
    Thanks,

    Hello,
    Can you please explain in a little more detail the scenario you testing? Are you comparing a SQL Database in Europe against a SQL Database in India? Or a SQL Database with a local, on-premise SQL Server installation?
    In case of the first scenario, the roundtrip latency for the connection to the datacenter might play a role. 
    If you are comparing to a local installation, please note that you might be running against completely different hardware specifications and without network delay, resulting in very different results.
    In both cases you can use the below blog post to assess the resource utilization of the SQL Database during the operation:
    http://azure.microsoft.com/blog/2014/09/11/azure-sql-database-introduces-new-near-real-time-performance-metrics/
    If the DB utilizes up to 100% you might have to consider to upgrade to a higher performance level to achieve the throughput you are looking for.
    Thanks,
    Jan 

  • Link a Crystal Report report with an SQL Azure database

    Hi,
    I want to use my database on SQL Azure in Crystal Report. So I want to link my reports with data contained not in a local db, but in a SQL Azure one.
    Insiede Crystal Report I have created a new ADO connection to my SQL Azure, providing server, db, user, password, and Crystal Report have recognized the database. But when I go to the Database Expert and I try to set this ADO connection inside my report,
    I recieve this error:
    "Not Implemented
    Source ADODB.Connection
    L'operazione richiesta non è supportata dall'oggetto o dal provider (operation not supported by the object or by the provider)"
    Why? How can i use my SQL Azure data in my Crystal Report reports?
    Thanks

    Hi Delfins,
    Please create a UDL file to test the connection, ensure the connection is fine and then use the same connection string in your Crystal Report.
    For UDL file, you can refer to:
    http://msdn.microsoft.com/en-us/library/e38h511e(VS.71).aspx
    Hope this helps,
    Raymond
    Raymond Li - MSFT

  • Unable to save a report that includes a datasource of "Microsoft SQL azure" type

    I have install SSRS in azure using the following instructions (http://msdn.microsoft.com/en-us/library/dn449661.aspx) and all seems to work fine, however when I create a report in report builder 2014 (in this case empty) that includes a Microsoft SQL Azure
    datasource type I am unable to save the report and get the following error message (even though when I test connection it succeeds). 
    "The report definition was saved, but one or more errors occurred while setting the report properties"
    Reports with standard sql datasources work fine.
    I have also tried creating the report using Visual Studio 2013 and get a similar error message.
    I have tried this using SQL 2012 and SQL 2014 and get the same error.
    Does anybody know how I can create a report with Microsoft SQL Azure datasource type?

    Hi jamesla,
    Based on my research, the issue can be caused by a deleted shared data source still exist under the Data Sources list in Report Builder. For more details about this scenario, we can refer to the following thread:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/7170dbee-048c-4298-89ba-df4d42924c8e/the-report-definition-was-saved-but-one-or-more-errors-occurred-while-setting-report-properties?forum=sqlreportingservices
    Since the error message without detail information, we can try to render the report to see the detail error message. Besides, we can try to check it in the log file. The SQL Reporting Services log files are found on the reporting services point server, in
    the folder %programfiles%\Microsoft SQL Server\<SQL Server Instance>\Reporting Services\LogFiles.
    For more information about how to use Microsoft SQL azure as the data source of a report, please see:
    http://msdn.microsoft.com/en-IN/library/ff519560.aspx
    http://programming4.us/database/2158.aspx
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

Maybe you are looking for

  • Parser: Invalid Sequence error

    I'm using the Google API's map web service to geocode some addresses. The program works fine for US addresses until it tries an address in Germany that causes this fatal error: [Fatal Error] geo?output=xml&key=AB...Q&q=HOLBEINSTRASSE+GERMANY%2C:1:220

  • Character Set questions on setup

    I am trying to determine what the best setup recommendations are for creating non_English Oracle 10g databases. I have not had much experience building databases for non_English locales, so this is getting a little overwhelming as I have been researc

  • PLS-00304 Circular reference

    Hi all, thanks for helping me in resolving the follwoing error USER234@dev>Create or replace package a2 2 is 3 4 TYPE a2_rectype is RECORD 5 (drop_no varchar2(100)); 6 7 TYPE a2_tabtype IS TABLE OF a2_rectype 8 INDEX BY BINARY_INTEGER; 9 10 Procedure

  • PIR consumption

    Please suggest me with effective planning. I have a FG "A" having phantom A_PHAN which has a component "B" (planning strategy 70). when i plan for B, lets say i entered 600 qty in a planning table for 12/2010. now i got a sales order with 2 schedules

  • In search of someone who's capable of doing their job.

    7 weeks ago we signed up to eircom with e-fibre broadband, techy came out a couple days later and told us work had to be done on the road because there was no landline in the house. Fair enough , then we were told we had to wait 2 weeks to get permit