Forum Replies Created

Viewing 15 posts - 376 through 390 (of 1,409 total)

  • RE: AlwaysOn AG failed over changed sql user passwords???

    This is the script I use to genereate the CREATE LOGIN code:

    select

    sp.name

    , sp.type_desc

    , 'CREATE LOGIN [' + sp.name + '] '

    + case when sp.type in ('U', 'G')

    then 'FROM WINDOWS '

    else...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: DBA vs Developer

    For the fun of it you wish you could increase the TEMPDB to 93000TB and then watch how the developer handles the resultset in the application. He probably will loop...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: SQL - case statement

    Can't you use an IF statement?

    IF (

    SELECT COUNT(*)

    FROM databasename.sys.tables

    WHERE databasename.sys.tables.NAME = 'tableX'

    ) = 1

    BEGIN

    SELECT TOP 1 NAME

    FROM databasename.tableX

    WHERE cc.cnr = c.ccnr

    END

    ELSE

    BEGIN

    SELECT UPPER(c.FinalNAME) AS 'Name'

    FROM tableY c

    END

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Mirror database stuck-in-restoring-state

    SQLRNNR (7/31/2014)


    Disable the jobs on the mirror that are trying to perform the backups (or other maintenance). Those should only be enabled in the event of a failover.

    You could...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Faster disk for mdf or ldf?

    It depends on what you want to be faster: the nightly recreate process or the daily activities?

    If you want the recreate process be faster I would place the LDF on...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Mirror database stuck-in-restoring-state

    The mirrored databases are there for disaster purposes. When the principal database/server goes down you could (manually or automatically when configured) failover. At that moment the partner database will come...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Restore of db fails

    If you have another instance available try the following:

    1. Restore vendor backup on default destination instance using NAS storage and run CHECKDB

    2. Create a new backup of above database (include...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Error Msg 102, Level 15, State 1, Procedure

    Take a good look at the URL in my previous post about the meaning and position of the parameters. Here is some sample code to help you:

    declare @exists int

    set @exists...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: need repetition of a table when joined with another table

    This will come close to what you want:

    declare @two table (id int, value int)

    insert into @one select 1, 11 union all select 2, 12 union all select 3, 13 union...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Error Msg 102, Level 15, State 1, Procedure

    The RAISERROR parameters need to be provided within brackets and seperated by a comma. See http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&l=EN-US&k=k(RAISERROR_TSQL);k(SQL11.SWB.TSQLRESULTS.F1);k(SQL11.SWB.TSQLQUERY.F1);k(MISCELLANEOUSFILESPROJECT)&rd=true

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Restore of db fails

    Markus (7/25/2014)


    We restored the db from the NAS backup to the NAS device just fine. I then tried to backup the db to local disk then restore it. The...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Cross Join Help

    A cursor is not the right approach for this scenario. Allthough it is not very clear what your situation is, it sounds like you can just insert the results from...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: SQL Agent job to only mail when having failed more than X times in a timeperiod

    tommy 28778 (7/25/2014)


    I could do it so job A, writes to a table everytime it completes, and then have job B check against the table to see if it succeeded,...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: MDF and LDF Threshold

    see this article: http://www.sqlservercentral.com/articles/alerts/89885/ on how to create an alert. From SSMS you can script the actions just before clicking the final [OK] or you can script the object when...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Restore of db fails

    Markus (7/24/2014)


    ...If we restore it TO the NAS device the restore works...

    In addition to Runaldo's post:

    Reading your post it looks like you can succesfully restore the database to the NAS....

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **

Viewing 15 posts - 376 through 390 (of 1,409 total)