Skip to main content

Posts

Showing posts from September, 2015

Good guide on getting output from a stored procedure

https://technet.microsoft.com/en-us/library/ms187004(v=sql.105).aspx The sp itself.. USE AdventureWorks2008R2; GO IF OBJECT_ID('Sales.uspGetEmployeeSalesYTD', 'P') IS NOT NULL DROP PROCEDURE Sales.uspGetEmployeeSalesYTD; GO CREATE PROCEDURE Sales.uspGetEmployeeSalesYTD @SalesPerson nvarchar(50), @SalesYTD money OUTPUT AS SET NOCOUNT ON; SELECT @SalesYTD = SalesYTD FROM Sales.SalesPerson AS sp JOIN HumanResources.vEmployee AS e ON e.BusinessEntityID = sp.BusinessEntityID WHERE LastName = @SalesPerson; RETURN GO the call to get the value  -- Declare the variable to receive the output value of the procedure. DECLARE @SalesYTDBySalesPerson money; -- Execute the procedure specifying a last name for the input parameter -- and saving the output value in the variable @SalesYTDBySalesPerson EXECUTE Sales.uspGetEmployeeSalesYTD N'Blythe', @SalesYTD = @SalesYTDBySalesPerson OUTPUT; -- Display the value returned by the procedure.

SQL Notifications

Some good information on SQL notifications. Step 1, Create a Database Mail Profile https://msdn.microsoft.com/en-AU/library/ms187605.aspx#SSMSProcedure Step 2.  Define an operator and create the alert https://www.mssqltips.com/sqlservertip/1523/how-to-setup-sql-server-alerts-and-email-operator-notifications/

Adding security on a mssql file, when moving backups or data files around

Every now and then you need to move a MSSQL database file around. However, how to do you put the MSSQL security attributes back on the file. Turns out it is real easy, all you need to do is put "NT Service" in front of  the database name ie: NT Service\MSSQL$ InstanceName For me, that was NT Service\MSSQL$PBSQL

Adobe Digital Editions

I think that Adobe Digital Editions is the worse excuse for drm in documents. I'm always having one problem or another in the thing. This link seems to fix key problems https://helpx.adobe.com/digital-editions/kb/error-e-adept-internal-download.html#