Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by Sabnac

  1. Sabnac

    How to find if Agent is runing

    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...
  2. Sabnac

    dynamic table creation (table name as variable)

    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
  3. Sabnac

    SQL Server Timeouts, Network issues?

    Have you check for SQLSlammer infection ?
  4. Sabnac

    Help with conditional selections.

    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...
  5. Sabnac

    Online Access...Slow!! Help pls

    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
  6. Sabnac

    Loading a text file with 3 fields into a table with 4 fields

    Just look here : http://doc.ddart.net/mssql/sql2000/html/adminsql/ad_impt_bcp_57qd.htm
  7. Sabnac

    Multiple Increment fields

    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...
  8. Sabnac

    Trigger advice

    To backup your db use scheduled jobs or maintenance plan. To retrieve datetime use the getdate() function
  9. Sabnac

    single_user/multi_user question

    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...
  10. Sabnac

    top question

    SELECT * FROM CALL_LOG WHERE ID IN (SELECT TOP 50 ID FROM CALL_LOG ORDER BY ID DESC) ORDER BY ID
  11. Sabnac

    problems with attachments field in xp_sendmail

    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.
  12. Sabnac

    problems with attachments field in xp_sendmail

    Maybe @fileattachments is truncated (200+200+200 = 600) Set @fileattachments varchar((600)
  13. Sabnac

    problems with attachments field in xp_sendmail

    Delete the last semicolon set @manual = '\\austen\Documents\reports\ALife_inbound\exportfiles\exports' + replace(convert(varchar,getdate()-1,03),'/','') + '\Without Policy Details ' + left(replace(convert(varchar,getdate()-1,03),'/',''),4) + '.xls'
  14. Sabnac

    How to start SQL SP3

    unpacked-drive\sql2ksp3\x86\setup\setupsql.exe
  15. Sabnac

    Tables in SQL

    Use Sysobjects, syscolumns, systypes, ... system tables or associated views (INFORMATION_SCHEMA.)

Part and Inventory Search

Back
Top