Forum Replies Created

Viewing 15 posts - 436 through 450 (of 582 total)

  • RE: SP help. Trying to find databases on remote servers

    you will need to use dynamic sql and make sure you have a linked server defined. You can use database_id > 4 to exclude system databases. you should used sys.databases...

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: How to loop through tables with dynamic names?

    Here is an example to use to give you an idea of what can do to achieve desired result . Also, Please read the link in my signature for tips...

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: find users that only have certain value

    Julie, you are correct that exists tends to be better performing.

    Drew, thanks for that query. It is pretty much what I was looking and it helped me find another criteria...

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: find users that only have certain value

    This work fine but I was hoping to be able to do this without having to query #tmp twice.

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: script

    you can use sys.master_files instead of sys.database_files to get all databases on server.

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: script

    sp_spaceused will get you the info you need although it will only show you space used of current database.

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: Moving NDF files to different location in sql 2005

    Easiest way to do so is to detach database, move file, then re-attach.

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: Retrieving members of Active Directory groups through SQL Server

    I have a script I was working with a while back that loads tables of user, groups and group membership from active directory using ADSI via a linked server. You...

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: How can I tell if a schema is being used?

    this should give you all unused schemas

    select b.name from sys.objects a

    right outer join sys.schemas b

    on a.schema_id = b.schema_id

    where a.name is null

    and b.schema_id > 4

    and b.schema_id < 16384

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: change default binding programmatically

    this is for default constraints thus there will always be a column associated with them.

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: Programmatically Exporting All Constraints

    I just posted a script to update all check constraints yesterday here. With some modification you can have it scripts out all constraints. Let me know if you need any...

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: change default binding programmatically

    Just whipped this up, so it is not tested very well but it should do the trick.

    declare @defname varchar(100)

    declare @tabname varchar(100)

    declare @colname varchar(100)

    declare @sql nvarchar(max)

    DECLARE _def CURSOR

    FORselect a.name, b.name,...

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: Query multiple databases on one server for existence of one table

    do you want the existence of table(as in your subject heading) or a column (as stated in body)?

    in any case this should get you what you need

    create table #tmp(

    databasename varchar(100),

    tablename...

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: Clustering - SQL Services

    Upon failover the cluster service will startup all services included in the cluster group thus if the sql server services are in the cluster group that is failing over then...

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • RE: Compare Multiple Rows in a table with Multiple Rows

    You had stated

    Actually Each Accounts_ID will be associated with value from different tables.

    which , by inserting those extra rows, would make that statement incorrect. so one accounts_ID can have...

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

Viewing 15 posts - 436 through 450 (of 582 total)