on each servers
I have created a job that send a mail to a choosen master server (nearest of my office).
This mail contains a statement that update a status table (srv_name, status, date)
On the main server
I update my status table setting all switch to 0.
On the "main" server i...
Create the stmt into a nvarchar variable and use the sp_executesql
Declare @stmt nvarchar(2500)
Set @stmt =
'SELECT * INTO' + @Tablename +
'CAST(@COUNT AS VARCAHR(5))
FROM MyTable
WHERE MyCol1=100 + ' + @Count
sp_executesql @stmt
SELECT
'Result1' =
case
when getdate() between '2003-01-01' and '2003-09-30'
then F3
when getdate() between '2003-05-01' and '2003-09-30'
then F6
else F9
end,
'Result2' =
case
when getdate() between '2003-01-01' and '2003-09-30'
then F4
when...
Merge replication seems to be adapted.
Snapshots for each servers will be merge in th evening (or when you want).
Just take a look on replication in BOL
From BOL :
IDENTITY
Indicates that the new column is an identity column. When a new row is added to the table, Microsoft® SQL Server™ provides a unique, incremental value for the column. Identity columns are commonly used in conjunction with PRIMARY KEY constraints to serve as the unique row...
For each kill a rollback is initiated.
To kill connections i use a SP created in master
CREATE PROC Kill_Connections (@dbName varchar(128))
as
DECLARE @ProcessId varchar(4)
DECLARE CurrentProcesses SCROLL CURSOR FOR
select spid from sysprocesses where dbid = (select dbid from sysdatabases...
i just test a mail with an attachement greater than varchar(700) with n times the \\issrv001\ftp_data_ares\ares\ft kms\out\KMS.zip file attached.
It works. Just do a print of @fileattachment before executing the xp_sendmail to be sure of the content.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.