Forum Replies Created

Viewing 15 posts - 1,381 through 1,395 (of 1,993 total)

  • RE: How to access/Run query on other SQL Servers

    you can use a linked server to do this, but you will need to enable MSDTC and distrtibuted transactions in order to pump the results into a table

    once you have...

    MVDBA

  • RE: When index was created

    unless i'm mistaken that gives you the table CREATE date, not he index create date

    sysobjects.id = the table id

    sysindexes.id = the table id

    sysobjects.name = table name

    sysindexes.name=index name

    sysindexes.indid= the index number...

    MVDBA

  • RE: DBA: Mentor vs. Protector

    with regards to locked down environements and open vs closed environemtns, we're trialling the new Policy feature in SQL 2008 so that all dev machines and databases meet a minimum...

    MVDBA

  • RE: Truncation error reporting app

    ok - i would suggest something like the followiing

    declare @strsql varchar(max)

    declare @temptabname varchar(100)

    set @temptabnme='mysourcetable'

    declare @destnamevarchar(100)

    set @destname='mydestinationtable'

    set @strsql='select '

    select @strsql=@strsql+' max(datalength('+name+'),'

    set @strsql=@strsql+ 'from syscolumns where object_name(id)='''+@temptabname+''''

    exec (@strsql)

    select name,length from syscolumns...

    MVDBA

  • RE: default port 1433 open

    are you looking to close port 1433 to prevent external clients from connecting to sql server?

    if so then just disable the TCP/IP server protocol and listen on shared memory only.

    so...

    MVDBA

  • RE: Update or Reinsert? which one is best

    this really depends on what you are trying to acheive and also your data volumes/indexes

    if you delete/re-insert then this may be slow and you may get heavy fragmentation on your...

    MVDBA

  • RE: ALTER INDEX

    you can use ALTER INDEX.... WITH DROP EXISTING

    however all this does is drop the exising index and re-create

    if anyone is using the index at the time then the command will...

    MVDBA

  • RE: SQL Joins

    nope

    the use of left or right determines which side of the join returns all results

    my example is clearly a left outer join

    if this were right outer then the results would...

    MVDBA

  • RE: SQL Joins

    left outer self join - easy

    show me all employees and their managers

    include all employees that do not have a manager

    select e1.*,e2.name from employee e1 left outer join employee e2 on...

    MVDBA

  • RE: SQL Joins

    I have one question -

    I posed a question on our technical tests for new DBA/Developers and I asked

    "Name All Types of join you are aware of"

    The question was deliberatly loosely...

    MVDBA

  • RE: Expanding column length on very large table

    apologies - i went from varchar(1) to varchar(2)

    i'd had too much coffee

    MVDBA

  • RE: Expanding column length on very large table

    yes - my column was populated

    i converted it from 'a' to 'bb' 39 million rows

    MVDBA

  • RE: Expanding column length on very large table

    if you are using management tools then this will be very slow as management studio will work on the principle of making this backwards compatible (to sql7 i think -...

    MVDBA

  • RE: UPDATE inside an UPDATE TRIGGER - any downside

    you could do several things here

    1st - disallow recursive triggers using

    sp_configure 'nested triggers',0

    but this might break other DB functionality

    possibly i might suggest performing a check on the columns...

    MVDBA

  • RE: paging data and maximum number of rows

    ok - let me be clear

    the original post indicated that i wanted an Efficient method of getting the max value from Rown_number()

    but the query inside the CTE/subquery may have...

    MVDBA

Viewing 15 posts - 1,381 through 1,395 (of 1,993 total)