Index was outside the bounds of the Array. (Microsoft.SqlServer.smo)
Restarting the Management Studio worked for me.
Restarting the Management Studio worked for me.
use the command-line tool SQLCMD which is much leaner on memory. It is as simple as: SQLCMD -d <database-name> -i filename.sql You need valid credentials to access your SQL Server instance or even to access a database Taken from here.
You do not need to use ORDER BY in inner query after WHERE clause because you have already used it in ROW_NUMBER() OVER (ORDER BY VRDATE DESC). SELECT * FROM ( SELECT Stockmain.VRNOA, item.description as item_description, party.name as party_name, stockmain.vrdate, stockdetail.qty, stockdetail.rate, stockdetail.amount, ROW_NUMBER() OVER (ORDER BY VRDATE DESC) AS RowNum –< ORDER BY FROM … Read more
I encountered some performance issues using the COUNT() OVER() method. (I’m not sure if it was the server as it took 40 seconds to return 10 records and then later didn’t have any issues.) This technique worked under all conditions without having to use COUNT() OVER() and accomplishes the same thing: DECLARE @PageSize INT = … Read more
If you have a TRY/CATCH block then the likely cause is that you are catching a transaction abort exception and continue. In the CATCH block you must always check the XACT_STATE() and handle appropriate aborted and uncommitable (doomed) transactions. If your caller starts a transaction and the calee hits, say, a deadlock (which aborted the … Read more
This is all perfectly normal. Microsoft added sequences in SQL Server 2012, finally, i might add and changed the way identity keys are generated. Have a look here for some explanation. If you want to have the old behaviour, you can: use trace flag 272 – this will cause a log record to be generated … Read more
Solution: Close your table designers and database diagrams and try again. If that doesn’t help, close all windows in Management Studio. Cause: The “New Index” option gets disabled when the table is schema-locked by the designer window.
You are encountering this behaviour due to a performance improvement since SQL Server 2012. It now by default uses a cache size of 1,000 when allocating IDENTITY values for an int column and restarting the service can “lose” unused values (The cache size is 10,000 for bigint/numeric). This is mentioned in the documentation SQL Server … Read more
The server was set to Windows Authentication only by default. There isn’t any notification, that the origin of the errors is that, so it’s hard to figure it out. The SQL Management studio does not warn you, even if you create a user with SQL Authentication only. So the answer is: Switch from Windows to … Read more
Check to see if your user is mapped to the DB you are trying to log into.