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.
ALTER TABLE will works perfectly.
From BOL :
A. Alter a table to add a new column
This example adds a column that allows null values and has no values provided through a DEFAULT definition. Each row will have a NULL in the new column.
CREATE TABLE doc_exa ( column_a INT)
GO
ALTER TABLE...
In this case, you will have the distinct value of the 10 top rows. If the top 10 rows are the same you will get 1 rows.
Try this :
SELECT TOP 10 exposureid
FROM iinstrumentid
GROUP BY exposureid
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.