Forum Replies Created

Viewing 15 posts - 211 through 225 (of 498 total)

  • RE: Replicating Changing Databases

    I've never actually done a thorough test to see what all initializing the subscription does. One thing it does is goof up managed identities! So if you are using them...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Trigger

    Create a stored proc that just does an INSERT VALUES statement against the table. Then debug the stored proc in QA. As you step into the SP it will in...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Stored Procedure Question

    How about something like this...

     

    CREATE PROCEDURE dbo.procAddContactAddress

    (

    @Contact int,

    @Address int,

    @ContactAddressPK int = NULL OUTPUT,

    @RetCode int=NULL OUTPUT

    )

    AS

    SELECT @ContableAddressPK = tblContactAddressPK

    FROM dbo.tblContactAddress

    WHERE tblContactFK = @Contact AND tblAddressFK = @Address

    IF @ContactAddressPK IS NULL

    BEGIN

    INSERT INTO...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Replicating Changing Databases

    This is not a trivial thing. If you modify the publication you will likely end up having to re-initalize all your subscriptions. So before setting up this scenario TEST TEST...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: How to pass TABLE datatype as input parameter to a stored procedure

    Using one sproc to go against 10 different tables means that you would need to use dynamic sql rather than staight sql. This means that the caching of the query...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Can Procedure return datatype TABLE?

    No it's not possible to do a table as an output parameter. My question is why would you want to? Either use a UDF or simply use a temp table...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Multiple connection strings

    The only way I can think of to do this would be to use dynamic sql inside your sp. Even though the user specifies different databases couldn't you still have...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: if -- else with ALTER PROC and CREATE PROC

    Ahh, but if I remove the articles from the subscription then I have to re-initialize all the subscribers. Due to the way our database is set up that is something...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: if -- else with ALTER PROC and CREATE PROC

    guardata,

    That is a very good work around! I may just have to do that. The previous DBA replicated all my Sprocs with merge replication so I can't actually drop and...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: if -- else with ALTER PROC and CREATE PROC

    I'm like Steve, most of my scripts do a drop/create with permissions tacked on at the end.




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Transaction error when loading SQL table from linked server to Oracle DBase

    Did you read this KB article?

    http://support.microsoft.com/default.aspx?scid=kb;en-us;280106




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Job fails because remote server insert fails. Need testing method.

    You could throw something like this in your script and then drop it at the end....

     

    DECLARE @LinkedServerName     sysname

        , @provstr                nvarchar(4000)

        , @ServerName             sysname

    -------------------------------------------------------------------------------

    -- Change the following to the remote...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Job fails because remote server insert fails. Need testing method.

    Have you tried creating a linked server instead of using the openrowset? It may handle this situation a little differently. I don't currently have a machine to test this with....




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Need syntax help

    Don't I wish! More like 6 days a week!




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Transaction error when loading SQL table from linked server to Oracle DBase

    If you are running WIN2003 then try checking the following.

     

    Open Component Services, Drill down to "My Computer" and right click it. Open the Properties box and click on the MSDTC...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

Viewing 15 posts - 211 through 225 (of 498 total)