SQL Overview SSIS Package III - Full Package

  • The SQL Agent is running the package as 'FNBN\OTGDEV04$'

    This is a local server id which I will assume does not have access to the instance you are trying to connect to. Try configuring SQL Agent to run with an id with the proper authority. Or you can grant 'FNBN\OTGDEV04$' the authority on each instance.

    David Bird

  • Hi,

    I tried to implement SQL Overview Part 1,

    SQL Overview SSIS Package II - Retrieving SQL Error Log and SQL Overview SSIS Package III - Full Package. But finally when run the SQL Agent Job

    DBA-SQL Overview - Was successful one

    DBA-SQL Overview - Report Instances Recently Started Job -- Failed stating Invalid object name 'rep.SQL_Overview_Last_Run_Date'. [SQLSTATE 42S02] (Error 208). The step failed.

    DBA-SQL Overview - Report Table Refresh Errors Job -- Failed stating Invalid object name 'SSIS_Errors'. [SQLSTATE 42S02] (Error 208). The step failed.

    Please let me know, what do I need to do to correct this errors. Any help will be highly appreciated.

  • BigSam (6/25/2008)


    I'm getting an error in s01-Job Last Run Datetime. It's a syntax error near '(' in this code. I'm not familiar with the $(ESCAPE_NONE(JOBID)) portion of the statement.

    -- Get Job Name

    SET nocount ON

    DECLARE @JobName sysname

    SELECT @JobName = [name] FROM msdb.dbo.sysjobs

    WHERE Job_id = CONVERT(uniqueidentifier, $(ESCAPE_NONE(JOBID)))

    PRINT '>'+@JobName+'<'

    I really like what you've done & want to make this work for me too.

    Thanks

    I also have this error, even when I past the statementinto a Query window. I'm using SQL 2008 64btis standard edition.

    Seems that he does no like the $(ESCAPE_NONE(JOBID))) part.

    Any idea?

    Nice article by the way.

  • Hi,

    I am just trying to use the sql script for the disk space (I have everything else I need except for disk space)

    I have tried a couple different things but am coming up short.. Can someone please give me the script to run in my SSIS package that will find the disk space on all of my servers (I have all of them foreachloop) together already.

    I am just not sure on what tables need set up and what the script is.

    Please help!

    Thanks

  • David - first off, want to thank you for this awesome series of articles on Server Overview. I built an Overview package and its been running for about 3 months. Its been fantastic and it's made the DB team look good on several occasions already by being proactive instead of reactive about server and db issues. We love it!

    My question is, do you know if there is a way to add a check for seeing when a cluster has a failover? Perhaps a ServerProperty or some way to query a Last Failover Date or something like that? Any thoughts would be helpful....thanks!

    Dave Coats

  • First, when a cluster instance is started, you can check if the active node has changed. The active node name is captured in the [SQL_Overview].[dbo].[SQL_Servers] table. You can add a column to the SSIS_ServerList to track the active node and create a special report when it changes.

    If the instance is restarted multiple times in the day, the SQL Overview error log report could be updated to include records of it happening. It might already.

    I personally watch for unexpected instance restarts and if it is a cluster, I check the windows event log to find the cause of the failover. Most of our cluster failovers are caused by window security patching.

    David Bird

  • Hi Dave,

    One way to accomplish this would be to read the errorlogs to get the last date. This will be the LogDate and the NetBIOS name of the node in the error log when the rollover occurred. Try the below code and see if this may work for you. This can easily be rolled into the DBA Repository, which I will be doing to the next update to the original solution.

    --Read Error Logs

    DECLARE @TSQL NVARCHAR(2000)

    DECLARE @lC INT

    CREATE TABLE #TempLog (

    LogDate DATETIME,

    ProcessInfo NVARCHAR(50),

    [Text] NVARCHAR(MAX))

    CREATE TABLE #logF (

    ArchiveNumber INT,

    LogDate DATETIME,

    LogSize INT

    )

    INSERT INTO #logF

    EXEC sp_enumerrorlogs

    SELECT @lC = MIN(ArchiveNumber) FROM #logF

    WHILE @lC IS NOT NULL

    BEGIN

    INSERT INTO #TempLog

    EXEC sp_readerrorlog @lC

    SELECT @lC = MIN(ArchiveNumber) FROM #logF

    WHERE ArchiveNumber > @lC

    END

    select * from #templog where text like '%netbios%'

    DROP TABLE #TempLog

    DROP TABLE #logF

  • I know that this thread is old, but I'm hoping you're still answering questions David. These articles are extremely helpful! Very easy to follow for a beginner.

    I had one question that I wasn't sure if someone else hit as well. The tempdb.sql script creates all necessary tables in the tempdb. That works just fine. However, when the SQL Service is bounced those tables are removed. I had to recreate them. Is there a possible work around for this?

  • The package should be checking for their existence and creating them anew automatically. Are you saying that is not the case? At least that is how it worked in the original SQL Magazine DBA Repository. Or perhaps these are temp tables that store permanent values with the modified repository?

    Rodney Landrum

  • I do see that it does create the temp tables in each step if they don't exist. I don't see where it would be storing permanent values, at least I can't find any. But the instructions do say to create them, step 8.

    I'm still running this manually from BIDS, I haven't deployed it to SSMS yet. Maybe that is the problem? The MultiServer connection is setup to point to the server housing the SQL_Overview database (at least initially) and it expects those temp tables to be there. So when the instance was restarted, they were dropped, then I couldn't run it manually any longer without recreating them. I believe that's the problem.

    So I guess my real question is (if my prior assumption is correct), once I deploy this to SSMS and schedule it, will it behave the same way if the instance is restarted or will it not care at that point since all the create statements will be executed?

    I appreciate your help!

  • I believe you are right that it will be handled appropriately when scheduled. At least I have not had any issues. Design is different because now you will be fighting validation issues.

    Rodney

  • Great, thank you!

  • The scheduled job in the second step creates the temp tables on the local server. This allows the SSIS package to start.

    Then when an item in the package connects to a remote instance the TEMPDB table is recreated on that instance.

    David Bird

  • David, thank you for your reply.

    I hadn't made it that far in the documentation. I now see that you specifically point that out under the Create Job section.

    My apologies!

  • This SQL Overview is great help but I am having a problem with Part 3.

    I am getting an odd error from the Multiserver in the SQL_Overview_part3_package. It doesn't have the sql instance and when i try to add it the package doesn't remember it. The package fails when i run it from my desktop or from the SQL server.

    Why doesn't the connection remember the database name where I ahve the SQL_Overview database? It worked fine in Parts 1 and 2.

    Is it possible to get a discription of what goes into Package 3?

Viewing 15 posts - 46 through 60 (of 64 total)

You must be logged in to reply to this topic. Login to reply