SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL Overview SSIS Package III - Full Package


SQL Overview SSIS Package III - Full Package

Author
Message
David Bird
David Bird
Mr or Mrs. 500
Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)

Group: General Forum Members
Points: 517 Visits: 1224
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
Rodney Landrum
Rodney Landrum
SSC Veteran
SSC Veteran (293 reputation)SSC Veteran (293 reputation)SSC Veteran (293 reputation)SSC Veteran (293 reputation)SSC Veteran (293 reputation)SSC Veteran (293 reputation)SSC Veteran (293 reputation)SSC Veteran (293 reputation)

Group: General Forum Members
Points: 293 Visits: 716
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
SQLdba-473999
SQLdba-473999
Old Hand
Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)

Group: General Forum Members
Points: 321 Visits: 767
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?
Rodney Landrum
Rodney Landrum
SSC Veteran
SSC Veteran (293 reputation)SSC Veteran (293 reputation)SSC Veteran (293 reputation)SSC Veteran (293 reputation)SSC Veteran (293 reputation)SSC Veteran (293 reputation)SSC Veteran (293 reputation)SSC Veteran (293 reputation)

Group: General Forum Members
Points: 293 Visits: 716
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
SQLdba-473999
SQLdba-473999
Old Hand
Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)

Group: General Forum Members
Points: 321 Visits: 767
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!
Rodney Landrum
Rodney Landrum
SSC Veteran
SSC Veteran (293 reputation)SSC Veteran (293 reputation)SSC Veteran (293 reputation)SSC Veteran (293 reputation)SSC Veteran (293 reputation)SSC Veteran (293 reputation)SSC Veteran (293 reputation)SSC Veteran (293 reputation)

Group: General Forum Members
Points: 293 Visits: 716
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
SQLdba-473999
SQLdba-473999
Old Hand
Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)

Group: General Forum Members
Points: 321 Visits: 767
Great, thank you!
David Bird
David Bird
Mr or Mrs. 500
Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)Mr or Mrs. 500 (517 reputation)

Group: General Forum Members
Points: 517 Visits: 1224
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
SQLdba-473999
SQLdba-473999
Old Hand
Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)Old Hand (321 reputation)

Group: General Forum Members
Points: 321 Visits: 767
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!
smurphy-995925
smurphy-995925
SSC Veteran
SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)

Group: General Forum Members
Points: 212 Visits: 87
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?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search