Forum Replies Created

Viewing 15 posts - 13,201 through 13,215 (of 13,457 total)

  • RE: Enterprise Manager - SQL Server Registration script

    i guess i'm confused a bit.... this works perfectly on my machine; let me explain a bit:

    enterprise manager looks on the local machine for the key we exported....

    so when i...

  • RE: Enterprise Manager - SQL Server Registration script

    register your servers, and then call regedit.

    browse to this key:

    [HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\80\Tools\SQLEW\Registered Servers X\SQL Server Group]

    you'll see all the servers you registered; simply export that key.

    to test, delete the key...

  • RE: TOP with parameter

    while TOP doesn't allow a variable in SQL2000(but does in 2005) you can use rowcount instead for the same results:

    drop procedure pr_search

    create procedure pr_search(@limit int=0)

    as

    --rowcount of 0 = all,

    --rowcount of...

  • RE: Triggers

    and here's another method that i use myself; i need to find all trigers and their trigger body if it exists:

    select parent_objects.name,  

      trigger_sysobjects.name,  

      syscomments.text  

      FROM sysobjects trigger_sysobjects  ...

  • RE: How to use variable table name and field name in select command

    if you need to know the maximum possible length of all the text fields, you could use this, whihc does not use a cursor:

    select sysobjects.name as TableName,

    sum(syscolumns.length) as LenOfTextFields

    from sysobjects

    inner...

  • RE: creating a copy of a table programmatically

    views ,functions and procs are easy:

    sp_helptext viewname

    sp_helptext functionname

    sp_helptext procedurename

    gives you the DDL for the view, or the text of the function/proc:

     

  • RE: Table insert issue ( Only once in a while)

    He didn't specifically mention any errors, so i jumped to the conclusion tha that it must be a hardware issue;Kory is right, are you getting any errors back before we...

  • RE: creating a copy of a table programmatically

    this copies the basic structure, but it doesn't copy foreign keys, column defaults, check constraints, etc.

    there are several scripts here on SSC that can programatically export the structure of a...

  • RE: Table insert issue ( Only once in a while)

    could this be related to an index with a high fill factor? if an index is created with a high fill factor, say 90%, but you have a lot of...

  • RE: Help with Bulk Insert Error

    am i wrong, or is this just a simple file does not exist error?

    i realize you probably changed some values for the example, but is there really a \\server1?

    in...

  • RE: Adding column with Identity

    i bet he wants the column in a specific location for this reason:

    in our shop, business rules state the PK columns are always the first columns of the table;

    if the...

  • RE: ReMapping Windows account Login SIDs on Standalone server

    this might help you out:

    replace NTDomain** with your real domain name, otherwise domain users will not be fixed, only SQL login users.

    the sid for sa /dbo on all machines everywhere...

  • RE: SQL Security on a non-domain network

     

    paste the exact error you are getting; there's way to many possibilities to diagnose it at this point;

    there's a huge difference between connecting directly from a laptop to your SQL...

  • RE: Sysobjects xtype vs. type

    i'd have to agree with you, with the exception of referencing PK's:

    select * from sysobjects where xtype <> type

    XTYPE of 'PK' <> TYPE of 'K' was the only difference i...

  • RE: SQL n00b trying to empty data from a database

    this will create the delete/truncate statements to be used  in Foreign key hierarchy order, so it never fails: note that it screws with every table, so any lookup tables or...

Viewing 15 posts - 13,201 through 13,215 (of 13,457 total)