Viewing 8 posts - 1 through 8 (of 8 total)
please provide the code for the usp_GetResellerSales
December 12, 2016 at 6:48 am
unComplicate:
create table #tmp (x nvarchar(max))
declare @s-2 nvarchar(max) = 'a,1,2,x,3,4,z'
declare @aux nvarchar(max)
while charindex(',',@s) > 0
begin
set @aux = substring(@s,0,charindex(',',@s))
SET @s-2 = LTRIM(STUFF(@s,1,len(@aux)+1,''))
insert into #tmp select @aux
end
insert into #tmp...
August 26, 2016 at 4:19 am
IS SQL 2012, add "where object_id > 0" to exclude temporary objects
October 20, 2015 at 2:53 am
BEGIN TRY
exec xp_cmdshell @PScmd
END TRY
BEGIN CATCH
BEGIN TRY
exec sp_configure 'xp_cmdshell',1;RECONFIGURE
exec xp_cmdshell @PScmd
exec sp_configure 'xp_cmdshell',0;RECONFIGURE
END TRY
BEGIN CATCH
exec sp_configure 'show advanced options',1;RECONFIGURE
exec sp_configure 'xp_cmdshell',1;RECONFIGURE
exec xp_cmdshell @PScmd
exec sp_configure 'xp_cmdshell',0;RECONFIGURE
exec sp_configure 'show advanced options',0;RECONFIGURE
END CATCH
END...
August 31, 2015 at 3:49 am
USE [master]
GO
ALTER DATABASE [MyDatabase] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
RESTORE DATABASE MyDatabase FROM ...
August 5, 2015 at 2:24 am
Hi, It is nice to know that "you are not alone".
I too believe in the separate service account per instance, although you're "do not store the password and change it...
August 10, 2012 at 2:28 am
If you chose to restore the system DBs, be careful about the servername (Hostname) registered on the SQL Server.
I rather recreate the objects (just generate the scripts and run them...
December 22, 2009 at 2:08 am
Install the DR instance with the same version and collation of the Prod.
Then, copy your DBs, Logins, SPs...either throught wizard or backup/restore
December 21, 2009 at 2:41 am
Viewing 8 posts - 1 through 8 (of 8 total)