Hot answers tagged

4

This question has been cross-posted on Stack Overflow at: http://stackoverflow.com/questions/38080741/in-sql-server-is-there-a-way-to-determine-the-values-of-the-parameters-passed-t As I said there: This information -- run-time parameter values passed into a Stored Procedure (i.e. RPC call) or parameterized query -- is only available via a SQL Trace (...


4

You can turn on the actual execution plan and then look at the execution plan XML. Or you can use sql sentry's plan explorer tool and see the parameters tab that will list the compiled value and run time value for actual execution plan. If you cannot turn on the actual plan then you can look into plan cache as described below. -- borrowed from Erland ...


4

I suspect the issue appears because you are referencing the view twice in the UPDATE statement, once in UPDATE [dbo].[vwMP_VOL] clause and then in FROM clause and the second time you are giving it an alias. But you are not using the alias in the SET clause, only the first reference. The result is that the the two references are unrelated and the rows are ...


2

Another workaround for this problem is to use set based logic, replacing the CASE expression with a left join (or outer apply) to a reference table (ref in code below), which can be either permanent, temporary or a derived table / CTE. If this is needed in multiple queries and procedures, I'd prefer to have this as permanent table: SELECT ref.result_column ...


1

Change your update to UPDATE [dbo].[vwMP_VOL] SET [vwMP_VOL].[id_batch] = inserted.id_batch ,[vwMP_VOL].[id_invoice] = inserted.id_invoice ,[vwMP_VOL].[text_vchr] = inserted.text_vchr ,[vwMP_VOL].[amt_frt_tcur] = inserted.amt_frt_tcur ,[vwMP_VOL].[amt_line_hcur] = inserted.amt_line_hcur ,[vwMP_VOL].[line_total_hcur] = ...


1

I'm suspecting/assuming that some data file had a lot of free space inside it, and the new index simply occupied that already allocated space. Is this likely to be what has happened? Based on your description of events yes this must have been the case. The free space might have arisen either due to the initial size of the database files leaving more ...


1

Any uninstall of SQL Server will not delete the data or log directories used by the particular version. The reason your data and log files stayed in the same spot is because you did an inplace upgrade. It will not move the databases to the "new" folders SQL Server 2012 would create (eg. "..\MSSQL11.MSSQLSERVER\DATA"). The only issue you could hit when ...



Only top voted, non community-wiki answers of a minimum length are eligible