Forum Replies Created

Viewing 15 posts - 7,126 through 7,140 (of 7,504 total)

  • RE: SQLMail & SQLServerAgent mail problem

    You'll need to alter the service-accounts for sqlagent and sqlserver to a windows-account that has access to your mail-server and mailbox.

    afaik local administrator has no network authority

  • RE: Small WHERE clause problem

    Avoid NULL !

    ALTER procedure _getInvoices ( @DateFrom as datetime = null, @DateUntil as datetime) AS

    if @DateFrom  IS NULL

    begin

       set @DateFrom = '1900-01-01 00:00:00.000'  

    end

    if...

  • RE: "With Encryption"

    I've updated the T-sql text in my previous reply ! (also included tabulation-char) .

    Watch out for UDF's. sp_stored_procedures...

  • RE: "With Encryption"

    tricky but maybe ...

    -- ALZDBA dd 18/03/2004

    -- convert sp to with encryption

    set nocount on

     

    DECLARE @SearchString varchar(255)

    Declare @WhichProcs varchar(255)

    Declare @sp_owner varchar(255)

     

    select @WhichProcs = '%spc%',  @sp_owner = '%'

    DECLARE @spcount int,

     @spLoopCount int,

     @proc_name...

  • RE: Copy Databases to another machine with same Windows name

    First take a look at the articles diogenes0412 mentioned !

    then try this.

    Clone sqlserver-server (i.e. keep servername,...)

    - install windows...

  • RE: Index not used on Select *

    - what's the filter-factor of the columns in your index ?

    - what portion of data would be part of your query ?

  • RE: Cascade delete slow on SQL 2000 sp3

    as you have noticed, RI should have an index per FK-definition (unless the overlap is matching columnorder and sortdirection), otherwize indexes might not be used for RI-purposes.

  • RE: Preventing automatic startup of database

    Maybe use this to put them offline when sqlserver is started :

    (you must be sysadmin to install this)

    use master

    create procedure sp_MyOwn_SetUserDbOffline

    as

    set nocount...

  • RE: Cascade delete slow on SQL 2000 sp3

    - are there any indexes on the foreign-key-columns to support the delete-join ? (with all child-tables)

    - If yes, are the columns in the same columnorder and sortorder(asc/desc) as the parent...

  • RE: table fragmentation

    keep in mind you are working with a heap table ! (indid =0 )

    If you want to defrag a heap, you'll have to put a clustering index on it.

    check BOL

  • RE: Login transfer from 6.5 to 2000

    create a dummy-db and transfert it to your SQL2k with the copy database wizard. It gives the possibility to migrate userid's.

    dont just do it from the prod-db, because it performs...

  • RE: Tables and File Groups

    I hope this gets you started :

    SELECT  sysFile.groupid AS GroupID

    , SUBSTRING(sysFile.groupname,1,30) AS FilegroupName

    , SUBSTRING(sysObj.name,1,30) AS ObjectName

    FROM sysobjects sysObj

     INNER JOIN sysindexes sysIdx

      ON sysObj.id = sysIdx.id

     INNER JOIN sysfilegroups sysFile...

  • RE: Datetime comparison

    What do you want to do ?

    datepart(hh,**) will only return hours-part.

    Datepart(mi,..) will only return minutes-part.

    why not compare to convert(datetime, convert(char(10),getdate(),121) + ' 07:00:00'))

     

    from Books Online :

    DATEPART

    Returns an integer...

  • RE: Database file growth monitoring..??

    - you could just have an alert raised when a file grows (e.g. error 5005 might be logged). Then extract the info from sql-log or windows-eventlog.

    - you can gather the...

Viewing 15 posts - 7,126 through 7,140 (of 7,504 total)