Forum Replies Created

Viewing 15 posts - 196 through 210 (of 1,409 total)

  • RE: How to get percent of total

    ben.brugman (10/21/2016)


    ...

    Questions to others in the group:

    With examples as these how do we prevent a division by zero. (Because the complete column does only contain zero's). (The same for averaging...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: How to get percent of total

    If I understand your question correct, this could give you the results you need:

    select PtLanguage

    , sum(Abington) as total_abington

    , cast(sum(Abington) * 100.0 / max(grand_total.total_abington) as decimal(6,3)) as pct_abington

    , sum(BelmontSt) as total_Belmont

    ,...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Testing System DB backups

    Restoring the [master] databases using another name is possible. In the past I myself have performed it on SQL2005 (if I recall correct) and SQL2008 (for sure) and a collegue...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Can I do this?

    Eric M Russell (10/20/2016)


    So, you're saying that the users are entering values that are considered invalid due to their excessive length? You can avoid this by implementing check constraints on...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: change results orientation

    You can use the PIVOT funtion to do this. The PIVOT is clearly explained here: http://www.databasejournal.com/features/mssql/converting-rows-to-columns-pivot-and-columns-to-rows-unpivot-in-sql-server.html

    Over here https://www.simple-talk.com/sql/t-sql-programming/questions-about-pivoting-data-in-sql-server-you-were-too-shy-to-ask/ can also some nice explanation be found.

    If you still have doubts/questions about...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: JOb fails if there is no data to load to a table from a query

    komal145 (10/20/2016)


    ...My dba has to run job manually if there is no data. Is there a way to do it?

    Do you mean the DBA must (re-)start the job if there...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: SQL Jobs auto start after downtime ends

    I think you have two options:

    First create a stored procedure to check if the "last run" moment of the applicable jobs meets the requirements of the schedule. You can use...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: ALTER DATABASE permission error

    Just to make sure about your settings; can you post the output of the following query?

    SELECT IS_SRVROLEMEMBER('sysadmin') as I_am_SA, * FROM sys.databases WHERE name = 'DB1'

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Execute tsql script against multiple sql server instances

    I found a blog that describes a possible solution: Use PowerShell to Collect Server Data and Write to SQL[/url]

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Execute tsql script against multiple sql server instances

    The most easy way to do it is using PowerShell. The invoke-sqlcmd (see URL invoke-sqlcmd) can be used to run a SQL command (or SQL file) against an instance. Put...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: SQL Cluster Migration

    This is an old thread. You could better start a new one to get more and better response...

    To migrate instances nowadays good scripting tools are available, especially with the Powershell....

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Cannot enable Database Mail XP

    durga.palepu (6/23/2016)


    This works but I faced another issue:

    No global profile is configured. Specify a profile name in the @profile_name parameter.

    just a simple internet search came up with the solution for...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: How does SQL detect if a database backup was done?

    You can check table [database_recovery_status] for the specific database. When value of column [last_log_backup_lsn] is NULL a FULL backup needs to be performed, before a LOG backup can be created.

    SELECT...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Problem with Restored DB

    data already previously loaded into memory on one server, but reading from disk on other server?

    index fragmentation?

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: moving cluster group to a different node

    A movement of a SQL cluster group inside a WFC to another node is basically the same as an automatic failover. The SQL Server will go down on the active...

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

Viewing 15 posts - 196 through 210 (of 1,409 total)