Forum Replies Created

Viewing 15 posts - 136 through 150 (of 498 total)

  • RE: Cannot login after default database is deleted

    I've had this problem. Since then I make sure that my login is ALWAYS set to default to the master database. In my case the database in question became suspect...




    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 query for current Recovery Model ?

    Try

    ALTER DATABASE YourDB SET RECOVERY SIMPLE




    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: select where NOT in (query with null values)

    In this situation you are better off using NOT EXISTS with a correlated subquery.




    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: Parsing Question

    Hmmm... Upgrade to SQL2K so you can use User Defined Functions?

     

    You can take this function and modify it to suit your needs.

     

    CREATE FUNCTION...




    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: Scripting Backup, Restore and Shirink of DB

    Also, If you create a backup device on each of the machines then they can go anywhere on the machine and your TSQL becomes much easier...

    BACKUP DATABASE MyDb TO MyDevice...




    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 Do You Pass input parameters to a Stored Procedure Using an ASP Input Screen?

    I don't have time right now to look up the actual syntax but what you need to do is use the "Parameters" collection and add it to the command object.




    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: remove duplicate records

    Give this a try...

    SET NOCOUNT ON

    IF EXISTS(SELECT * FROM tempdb..sysobjects WHERE id = object_id('tempdb..#Foo'))

        DROP TABLE #Foo

    CREATE TABLE #Foo

        (

        FLD1            int

        , FLD2          nvarchar(25)

        , FLD3          int

        , FLD4         ...




    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: recursive stored procedure problem

    This seems like a great place to use a function rather than a procedure. You would then be able to eliminate the cursor and use the function call directly 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: Save Stored Proc Results

    If you want to do this you can convert your SP to a UDF that returns a table. You will then be able to do something like the following

    SELECT *...




    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 do you debug a trigger?

    The easiest way I have found to debug a trigger is to create a simple stored procedure that will fire the trigger. Then debug the stored procedure in Query Analyzer...




    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: Syntax to write to file

    Since you need to do this monthly the best thing to do would be to set up a DTS package and then have a SQL Job run the package once...




    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 Check if Job is Running?

    Koyan,

    Try running sp_helptext sp_help_job when you are in query analyzer in the msdb database.




    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: Parsing XML Doc into multiple tables

    I'm surprised no one has helped you out yet. I would probably go the OPENXML method. Have the XML passed into an SP as a parameter of type text or...




    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: Insert Into, Append, Temp Table ?

    This could also have been done like this...

    UPDATE Foo

    SET Keywords = Keywords + @NewKeywords

    WHERE...




    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: collation

    Fred,

    I would double check the DTS package and make sure that the transformations being done are indeed using nvarchar, nchar or ntext. Also make sure that if the package makes...




    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 - 136 through 150 (of 498 total)