Forum Replies Created

Viewing 9 posts - 1 through 10 (of 10 total)

  • RE: Stored Procedure Naming Conventions

    Just a personal prefix that I like to use rather than "usp_" is "up_" this way I can perform a find for every occurance of "up_" to find all user...


    Kindest Regards,

    Charles Wilkinson
    Database Administrator
    Sastek Pty Ltd
    www.sastek.com

  • RE: copy from multiple files simultaneously

    FOUND IT!!!

    Alright, forget the stuff above, I'm pretty sure it'll just run one after the other as well.

    Go to this article:

    http://www.sqlservercentral.com/columnists/lPeysakhovich/dtsparallelprocessing.asp

    The guy initially gives a query for reindexing multiple...


    Kindest Regards,

    Charles Wilkinson
    Database Administrator
    Sastek Pty Ltd
    www.sastek.com

  • RE: copy from multiple files simultaneously

    *thinks* next best guess is the following. I have no Idea if this would actually work.

    DECLARE @FullCmdString AS VARCHAR(4000)

    DECLARE Path_Cursor CURSOR FOR

    SELECT 'EXEC master.dbo.xp_cmdshell copy '+@CmdSwitches+' '+

     ISNULL(@Target,SrcServerName+'\'+SrcSubDir1+'\'+SrcSubDir2+'\'+SrcSubDir3+'\'+SrcFileName)+' '+

     ISNULL(@Target,TgtServerName+'\'+TgtSubDir1+'\'+TgtSubDir2+'\'+TgtSubDir3+'\'+TgtFileName)+

     Char(13) + 'GO'...


    Kindest Regards,

    Charles Wilkinson
    Database Administrator
    Sastek Pty Ltd
    www.sastek.com

  • RE: copy from multiple files simultaneously

    Alright, I fixed the thing up and shoved it into a stored procedure.  Quite possibly this sort of feature exists somewhere and I've reinvented the wheel, but hell, it was...


    Kindest Regards,

    Charles Wilkinson
    Database Administrator
    Sastek Pty Ltd
    www.sastek.com

  • RE: copy from multiple files simultaneously

    NOTE MISTAKE !!!: I specified the variable as @command rather than @CmdString

    PS: I'm not that great...


    Kindest Regards,

    Charles Wilkinson
    Database Administrator
    Sastek Pty Ltd
    www.sastek.com

  • RE: copy from multiple files simultaneously

    First, setup a table listing your paths and file names (starting with the server name)

    EG: FilePathTable -> columns = FilePath

    FilePath

    FileServer1\Sharename1\FileName1

    FileServer2\Sharename2\SubDir2\FileName2

    /*********************************/

    DECLARE @command varchar(200)

    DECLARE Path_Cursor CURSOR FOR

    -- Remove '\CommonSubDir\CommonFileName.txt' after "FilePath" if there is no...


    Kindest Regards,

    Charles Wilkinson
    Database Administrator
    Sastek Pty Ltd
    www.sastek.com

  • RE: Dynamic Query

    EXEC('sp_executesql ' + @strSQL)

    Hope this works


    Kindest Regards,

    Charles Wilkinson
    Database Administrator
    Sastek Pty Ltd
    www.sastek.com

  • RE: Finding Datatype

    Use:

    sp_columns <table name>

     

    Charles Wilkinson, Database Administrator, Sastek Pty Ltd


    Kindest Regards,

    Charles Wilkinson
    Database Administrator
    Sastek Pty Ltd
    www.sastek.com

  • RE: delete/drop variable/generated SQL database in T-SQL

    ITS ALIVE!!!

    (I think I tried the EXEC angle but left out the brackets *shrug*)

    Thanks Phill


    Kindest Regards,

    Charles Wilkinson
    Database Administrator
    Sastek Pty Ltd
    www.sastek.com

Viewing 9 posts - 1 through 10 (of 10 total)