tag:blogger.com,1999:blog-1710167566496408192024-02-07T19:38:55.042-08:00WANNA BE MVPhuhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.comBlogger32125tag:blogger.com,1999:blog-171016756649640819.post-73919446083281690242015-02-16T08:20:00.000-08:002015-02-23T03:00:34.125-08:00REGEX poradzi sobie z "niemieckimi naukowcami"Od kilkunastu dni nasz antyspam przepuszcza wiadomości z informacją, że niemieccy naukowcy zbudowali program, który zarabia pieniądze za darmo. Okazuje się, że nie tylko nasz system sobie z tym nie radzi, ale jest to problem dotykający generalnie "polski" internet.<br />
<br />
Próbka takiego maila:<br />
<br />
"<br />
<div class="MsoNormal">
<i>Niemieccy
uczeni dokonali imponujacego odkrycia!<br />
Stworzyli oni program, ktory handluje i zarabia pieniadze na gieldzie bez
udzialu czlowieka!<br />
W odroznieniu od czlowieka, program nie potrzebuje jedzenia, snu, nie myli sie
i podejmuje decyzje dopiero po dokonaniu szczegolowej analizy calego rynku...<br />
Zwykly czlowiek nie jest w stanie tego dokonac..<br />
<br />
Nie spiesz sie. Nie zarabiaj wiecej niz 10 000 euro miesiecznie. W przeciwnym
razie zwrocisz na siebie uwage i pokazesz, ze handluje za ciebie maszyna.<br />
Instrukcje znajdziesz klikajac na odnosnik..<br />
<u>Nie trac
czasu, graj i zarabiaj!</u></i> <o:p></o:p></div>
<div class="MsoNormal">
<i>"</i></div>
<br />
Mail za każdym razem przychodzi z innego adresu email, z innym tytułem, z inną treścią. Zawsze zawiera link, ale ten zawsze prowadzi gdzie indziej.<br />
<br />
A jednak jest w tym prawidłowość..<br />
<br />
Spójrzcie na budowę tych linków.. zawsze jest to jakiś skrypt PHP o mądrej nazwie (code.php, error.php, page.php, etc.)<br />
<br />
Takie URL-e trafiły do naszych skrzynek:<br />
http://go3mobilesites.com/options.php?7Aqyu=b9MaZy<br />
http://2539.club/model.php?ZPdgVzg3=QjP<br />
http://turkhafizleri.com/inc.php?BqYmR8=UjR6s<br />
http://chungcu-hongkongtower.com/utf.php?GYw=g67wUUZD<br />
http://podhalanie.com/config.php?jX=zJwo6JLmp<br />
http://babytoshi.com/config.php?1=5H6NVqLTyV<br />
http://womenshealthnet.org/template.php?5a9db5L=pkXc<br />
http://appinmobiliaria.com/footer.php?EZ=Enznww7G5<br />
http://tablainteractiva.ro/css.php?3GYyhx=HkoAf<br />
http://fileppi.com/files.php?9i54rc=AzfCD<br />
http://bookasailing.com/menu.php?9i54r=cAzfCD<br />
http://fantaniarteziene.eu/dir.php?Cufyus=kNhP9<br />
http://traderscapital.com/code.php?GyU3A=Uxt2po<br />
http://praxisforum-europa.eu/error.php?efj3NAe=Svrk<br />
http://riodio.eu/error.php?47Jn2=wbsFT1<br />
http://siberserv.com/template.php?FcVeXfA=qaUq<br />
http://tk-transport.eu/page.php?47Jn2=wbsFT1<br />
http://karekartun.com/admin.php?WFt=8RReyJRk<br />
http://rifkin-investments.com/lib.php?13dyeM=bg2aK<br />
http://bresourceseventmanagement.com/lib.php?r98k8=XL2Rw<br />
i tak dalej i tak dalej - mam tego zdecydowanie więcej.<br />
<br />
Aż się prosi o REGEX.<br />
<br />
Tu posiłkuję się onlinowym narzędziem <a href="https://regex101.com/">https://regex101.com/</a> i buduję regex-a z palca.<br />
<br />
Wychodzi mi na to, że poniższy REGEX obejmuje wszystkie moje przypadki:<br />
<br />
<span style="background-color: orange;"><span style="font-family: Courier New, Courier, monospace; font-size: large;">http:\/\/[\d\w\-\.]+\.(\w){2,5}(\/\w+)?\/\w+\.php\?(\d|\w){1,10}=(\d|\w){1,10}</span><span style="font-family: Courier New, Courier, monospace; font-size: large;">[^&]</span></span><br />
<br />
..choć przydałby się mądrzejszy (który np. uwzględnia słownikowe nazwy plików php: code.php, error.php, page.php, etc.), żeby zminimalizować ryzyko błędnej klasyfikacji.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVV2erZ_JdtKICPlJb6j69MjAXM_FZmm8eFuT_BvySPISWJ4oq7Ap7jY4MXSzvfWVRCagB9OqaF2opcFEuReqc_LiQm45QP9RChcqiJR84ivgG2UEcGkPOMm-zcMXJvYOVs01-A2UvN78/s1600/regex.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVV2erZ_JdtKICPlJb6j69MjAXM_FZmm8eFuT_BvySPISWJ4oq7Ap7jY4MXSzvfWVRCagB9OqaF2opcFEuReqc_LiQm45QP9RChcqiJR84ivgG2UEcGkPOMm-zcMXJvYOVs01-A2UvN78/s1600/regex.PNG" height="478" width="640" /></a></div>
<br />
<br />
Nasz firmowy software to Symantec Messaging Gateway 10.5. Okazuje się, że potrafi posługiwać się wzorcami regularnymi.<br />
<br />
Klikam kolejno Content (na górze) > Patterns (po lewo) > Custom (zakładka). I dodaję nowy wzorzec (nazywam go sobie "SPAM by URL"). Wklejam wyżej zaproponowany REGEX.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOorEgWUYwxzXMxpOprf5s7879AmR2jOkbaFK1zaf3PHB6xpX8qIgU4s6fIyOgD-IKtWQJwzkvv3bbf-6vOSx8INuew6WR39WWXNntePBgv0mwxoCwBMPNVn0CNNryEqktxJTzwZZ1Ml0/s1600/sms1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOorEgWUYwxzXMxpOprf5s7879AmR2jOkbaFK1zaf3PHB6xpX8qIgU4s6fIyOgD-IKtWQJwzkvv3bbf-6vOSx8INuew6WR39WWXNntePBgv0mwxoCwBMPNVn0CNNryEqktxJTzwZZ1Ml0/s1600/sms1.PNG" height="352" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1P5wn75r482SM-oURS5224dcmwxqZie7_T_9SVeczI5_Vdz8ODUROFL_y-reDzuX-lJD5N5JHT1HF61feigXwL5OAO0mxLTn769oQk6EcVg_5WRKnixqthDI8-OoGzdDGrGBRWbo8gq4/s1600/sms2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1P5wn75r482SM-oURS5224dcmwxqZie7_T_9SVeczI5_Vdz8ODUROFL_y-reDzuX-lJD5N5JHT1HF61feigXwL5OAO0mxLTn769oQk6EcVg_5WRKnixqthDI8-OoGzdDGrGBRWbo8gq4/s1600/sms2.PNG" height="352" width="640" /></a></div>
<br />
Następnie trzeba zbudować politykę, która wykorzysta ten wzorzec. Dodaję nową politykę, klikając Content (u góry) > Polices | Email. Nazywam ją "SPAM by URL (by REGEX)".<br />
<br />
Dodaję i definiuję warunek, jak poniżej na ilustracji. Dodaję akcję "Treat as suspected spam" (suspected dlatego że nie mam pewności, że zaproponowany REGEX nie zacznie wycinać rzeczy ważnych i potrzebnych).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgne3LRuMTJ472fQxSlsaN-Q-z-cktDcV8slT7V1TEHuUa3E18likbFWhZnrT3KPVyTzOjKtbMvD3ztFxxefccb43ABCwrxk837Fk0z06kw6rVlCdKUfTt03f74bI9F7b-NepXcuVidq5A/s1600/sms3.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgne3LRuMTJ472fQxSlsaN-Q-z-cktDcV8slT7V1TEHuUa3E18likbFWhZnrT3KPVyTzOjKtbMvD3ztFxxefccb43ABCwrxk837Fk0z06kw6rVlCdKUfTt03f74bI9F7b-NepXcuVidq5A/s1600/sms3.PNG" height="640" width="450" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLxi5gLSUnkoLw6IILwq_YzCJIotrSjl6roDsIg3xkPFK5kWz9hOlVxaY21h1XuRhtnyyBXOT0wA1GOMc19IeBxEMNrzwagnZumQYj-Qd84l5dPWKaa1UBOBc9xmlxm7SY2kneXf3r0yQ/s1600/sms4.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLxi5gLSUnkoLw6IILwq_YzCJIotrSjl6roDsIg3xkPFK5kWz9hOlVxaY21h1XuRhtnyyBXOT0wA1GOMc19IeBxEMNrzwagnZumQYj-Qd84l5dPWKaa1UBOBc9xmlxm7SY2kneXf3r0yQ/s1600/sms4.PNG" height="640" width="608" /></a></div>
<br />
Idąc dalej, ponieważ podjęte akcja znaczy "traktuj jako SPAM", muszę się upewnić, że na zakładce Spam mam przygotowaną odpowiednią politykę na "Suspected Spam".<br />
<br />
W moim przypadku jest to przesunięcie maila do kwarantanny (user dostanie podsumowanie maili podejrzanych o bycie spamem - może je uwalniać indywidualnie z kwarantanny do swojej skrzynki).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHz8G6mS0Fj-2fxpc5m-Yu3KNYWKz2CXLt5ewvxWgotuH99pGSx_9sBhocg2y6qNGXSA89eLoBcni8EHGylcJNNG84inaCdPT6cOtO0w0gAbFlh26AIxFpYT8AJImB-aKWlmFPhydElCM/s1600/sms5.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHz8G6mS0Fj-2fxpc5m-Yu3KNYWKz2CXLt5ewvxWgotuH99pGSx_9sBhocg2y6qNGXSA89eLoBcni8EHGylcJNNG84inaCdPT6cOtO0w0gAbFlh26AIxFpYT8AJImB-aKWlmFPhydElCM/s1600/sms5.PNG" height="496" width="640" /></a></div>
<br />
To jest rozwiązanie podane na szybko. Ale daje nadzieję. Być może będzie wymagało drobnego dostosowania.<br />
<br />
AKTUALIZACJA<br />
<br />
Linki spamerów ulegają zmianie.<br />
<br />
Pojawiły się nowe maila, których linki pasują do nowego wzorca:<br />
<br />
<span style="background-color: cyan; font-family: Courier New, Courier, monospace; font-size: large;">http:\/\/[\d\w\-\.]+\.(\w){2,5}\/sites\/default\/files\/\w+\.php\?(\d|\w){1,10}=(\d|\w){1,10}[^&]</span><br />
<br />
W Symantecu tworzę wzorzec (pattern) numer #2 i dodaję go do utworzonej uprzednio polityki (Email Content Filtering Policy) jako dodatkowy warunek. W polityce ustawione jest spełnienie dowolnego z warunków (Any).huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com0tag:blogger.com,1999:blog-171016756649640819.post-76085937448928399032015-02-03T16:31:00.001-08:002015-02-04T13:34:57.043-08:00IBM TS3100 - You can reuse cleaning tapes labelsIBM TS3100 is LTO tape library (autoloader). Onboard software offers auto cleaning feature. The library makes decision when to load and use cleaning tape. To use that feature you have to reserve one or more slots for cleaning tapes at management webapp. (Other method is not to use auto cleaning and schedule cleanings at backup software installed on server.)<br />
<br />
Screenshot below, active slots set to 21, so slots no. 22 and 23 are reserved for cleaning tapes (Symantec BackupExec can see only 1-21 slots and the portal slot)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFwJgLNHALREkcyIYtdv8uVhxM7aBer69_pdu95rq4Brtz601WN3amilgCiiGpRXMYIksuGRLYwxz8CQEnA2wPAO04KNlldL2wIXG8NuPgbxPx9WaNeHWH43iNHk83ncVP717LzR_QSow/s1600/clean00.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFwJgLNHALREkcyIYtdv8uVhxM7aBer69_pdu95rq4Brtz601WN3amilgCiiGpRXMYIksuGRLYwxz8CQEnA2wPAO04KNlldL2wIXG8NuPgbxPx9WaNeHWH43iNHk83ncVP717LzR_QSow/s1600/clean00.PNG" height="201" width="320" /></a></div>
<br />
<br />
This is cleaning tape from IBM with genuine label (included with TS3100 device). You can see label which begins with CLNU prefix and L1 suffix.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJhScJNRynhGBv0x7T3qgsDFMSqHXn4sHZ0f5lrryceXcFwMSKiDJotyHoRiW85j0gw4OYj1Kdn9s7JgeqKBUkAII_Yhmo-dIu03DrlsE2Ee-yQfASN8oV2O1bmXQLVTitONTnIsvyLYc/s1600/IMG_1284.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJhScJNRynhGBv0x7T3qgsDFMSqHXn4sHZ0f5lrryceXcFwMSKiDJotyHoRiW85j0gw4OYj1Kdn9s7JgeqKBUkAII_Yhmo-dIu03DrlsE2Ee-yQfASN8oV2O1bmXQLVTitONTnIsvyLYc/s1600/IMG_1284.JPG" height="240" width="320" /></a></div>
<br />
This is reorder code included on that tape (photo below) - 35L2086:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfPE3Ztjqwj4O5rjo6UheQLY3tSzSAuSMUH8LCbsjo_Y69X31u7Q-CNzfAMP6m5-EYXi2RQGDAuy_ibm1ccXVJIsQC3Zott9cHWjeL9ZKaD0HGD_UgeF2ev0sfhLIe24yofoA0ii28wFo/s1600/IMG_1285.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfPE3Ztjqwj4O5rjo6UheQLY3tSzSAuSMUH8LCbsjo_Y69X31u7Q-CNzfAMP6m5-EYXi2RQGDAuy_ibm1ccXVJIsQC3Zott9cHWjeL9ZKaD0HGD_UgeF2ev0sfhLIe24yofoA0ii28wFo/s1600/IMG_1285.JPG" height="240" width="320" /></a></div>
<br />
The LTO library alerted me that both of our cleaning tapes are worn out (50 loads per tape). I did ordered another two tapes using reorder code 35L2086.<br />
<br />
But the new 35L2086 came without labels (photo below):<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2K_D2WftUnroo4GTPNSHS5FgC3rqVgQLKiH62ZUaS10njx1I6WGVjXL8FBjsIEe__SNG8ka1xbTz3tPcEf5IF27RWkLz-Z3_szmqzGGrOgZpEzPYTnE4D8XSI8tyqPP9x4V0iyw00KhI/s1600/IMG_1288.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2K_D2WftUnroo4GTPNSHS5FgC3rqVgQLKiH62ZUaS10njx1I6WGVjXL8FBjsIEe__SNG8ka1xbTz3tPcEf5IF27RWkLz-Z3_szmqzGGrOgZpEzPYTnE4D8XSI8tyqPP9x4V0iyw00KhI/s1600/IMG_1288.JPG" height="240" width="320" /></a></div>
<br />
Some questions appeared in my head:<br />
<br />
<ul>
<li>Does library really need a label on a tape? There are slots reserved for cleaning tapes. LTO tapes have got number of uses stored on chip - so library does not have to store it in own memory and to refer by label ID, does it? Empty slot in magazine has its own label - so library can recognize if slot is occupied even if tape has not a label on it, can't it?</li>
<li>Can I use any new label on a tape with auto cleaning feature (with no CLNU prefix)?</li>
<li>Can I reuse a label from old tape? Can it be safely removed without being damaged? How onboard software manage new tape (new chip) and label with already known ID.</li>
<li>Will I have to make an order for new custom labels (which is not cheap and takes time)?</li>
</ul>
<div>
All screenshot below are taken after first new tape (slot 23) was forced to work with the library. Watch slot 22 at screenshots below.</div>
<div>
<br /></div>
<div>
The management webapp alerts "end of life" of tape at 22 (50 media loads):</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd-N7ksNMp7LJKL4iAODGmeY2QK0cWn_gSnvjVlpzLegOibZWeIu9P2wh2gvAu-9zkkt7Vvr_ORz67A6coZ0t0iG6NROmZMjKLDCJsgSkNW3WXQ1fl8Pyi-2NNSdh9MVEEXjigsi5cxqk/s1600/clean01.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd-N7ksNMp7LJKL4iAODGmeY2QK0cWn_gSnvjVlpzLegOibZWeIu9P2wh2gvAu-9zkkt7Vvr_ORz67A6coZ0t0iG6NROmZMjKLDCJsgSkNW3WXQ1fl8Pyi-2NNSdh9MVEEXjigsi5cxqk/s1600/clean01.PNG" height="193" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbZ03i9aV_zalM8X4h3Qyvd6XArMflC564czuJ7Z2gyoVCsuNRyOhYXsceiFLTFtE0zwHeo6HpcjjBaNIC9OPOxcwJ91bvni4fC6K7cRlQLi_K2MSS_u3tpV07uF9UOv8dvXadfDrjGxM/s1600/part01.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbZ03i9aV_zalM8X4h3Qyvd6XArMflC564czuJ7Z2gyoVCsuNRyOhYXsceiFLTFtE0zwHeo6HpcjjBaNIC9OPOxcwJ91bvni4fC6K7cRlQLi_K2MSS_u3tpV07uF9UOv8dvXadfDrjGxM/s1600/part01.PNG" /></a></div>
<div>
<br /></div>
<div>
I am taking away old tape from 22 slot (by removing whole right magazine).</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgovHfoGeQI4G6cRw3LBiUwZlqMik8vMAIDEyfpOTLiLWiwdWMZxVKrb88AG-DbEYg4ER9z4MQmMs7La6Jg3LHVq8eBxB6abWYHD5LWtlV3X95J0T2ZcFMGxRIJcT6HsceL1Hdz_M6eF-c/s1600/part03.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgovHfoGeQI4G6cRw3LBiUwZlqMik8vMAIDEyfpOTLiLWiwdWMZxVKrb88AG-DbEYg4ER9z4MQmMs7La6Jg3LHVq8eBxB6abWYHD5LWtlV3X95J0T2ZcFMGxRIJcT6HsceL1Hdz_M6eF-c/s1600/part03.PNG" /></a></div>
<div>
Slot 22 is empty. Label value is "-----------".</div>
<div>
<br /></div>
<div>
I am exchanging tape at 22 with new cleaning tape WITHOUT any label on it (by removing whole right magazine).</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyXTH7pXUMFvWE6x4wGdkHVfleJdDnt0L_6kMayz1_JIKdYTFvU4adoT1HsIzenegcUG7xxPC3yG42eAZTofqXGYmK0JSIaE6xczULU9jE_pERKi4m2fcDQtiNGHa89j-w8oF36X4W0HE/s1600/part02.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyXTH7pXUMFvWE6x4wGdkHVfleJdDnt0L_6kMayz1_JIKdYTFvU4adoT1HsIzenegcUG7xxPC3yG42eAZTofqXGYmK0JSIaE6xczULU9jE_pERKi4m2fcDQtiNGHa89j-w8oF36X4W0HE/s1600/part02.PNG" /></a></div>
<div>
The unlabeled tape is at slot 22 (screenshot above). Label value is "Unknown". The library can notice that slot is occupied but it does not try to read a tape. There is NO "Cleaning Tape" in a "Comment" column. You cannot also choose slot 22 for cleaning task from webapp (only 23 slot is on dropdown list).</div>
<div>
<br /></div>
<div>
Now I am removing genuine label sticker from old IBM tape. I have to use Victorinox knife to catch a corner at first. Then I am pulling a label. The label sticker is strong enough. It's in one piece after operation. Then I putting a label back to new tape. It sticks very well. It won't fall off.</div>
<div>
<br /></div>
<div>
I am putting new tape labeled with old sticker into slot 22 once again.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0i1tutW6uaoSO1ISBq35fq-VkjmG_nOnSa_lDFWwiaxAVjAa-MR_JuwAC3jrTPjVoMY0tsBGiIhG5gIEtGfGXXNXb33oZe_pQ8s1ljQm1ttPgKUsX-DknOyFyDb_9yzHAWDStxUFDFkM/s1600/part04.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0i1tutW6uaoSO1ISBq35fq-VkjmG_nOnSa_lDFWwiaxAVjAa-MR_JuwAC3jrTPjVoMY0tsBGiIhG5gIEtGfGXXNXb33oZe_pQ8s1ljQm1ttPgKUsX-DknOyFyDb_9yzHAWDStxUFDFkM/s1600/part04.PNG" /></a></div>
<div>
Now slot 22 is recognized as "Cleaning Tape" (still don't know if "CLNU" prefix has something in common). Notice that "Media Loads" is without value (it was 50 earlier with the same label).</div>
<div>
<br /></div>
<div>
Now I am forcing to clean a drive with webapp menu. Slot 22 is available as cleaning tape source.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBZL_kVN4d5W4T2tCYsIO7L6JkvBEFRNc9UVbsApWJvgvfwfrY8SsBFpo6HE8kN2ddfwc3-M-KLFACYSYfF2-RZ7Bg7rmOwQc6QyqMiEt_g1kT4G4p037pIPD7hhksGE7NZf0RtVBD0wk/s1600/clean05.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBZL_kVN4d5W4T2tCYsIO7L6JkvBEFRNc9UVbsApWJvgvfwfrY8SsBFpo6HE8kN2ddfwc3-M-KLFACYSYfF2-RZ7Bg7rmOwQc6QyqMiEt_g1kT4G4p037pIPD7hhksGE7NZf0RtVBD0wk/s1600/clean05.PNG" height="193" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Works! After job is completed "Media Loads" is incremented to 1 for this tape.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWx1WrhaljR_BSRrolEhZ0eTnmeHJQnwFvGSNODjeXmW7TG8e64kyJ43IB8eTWLhYpLjejdl0YqpkHYaPj6TV8vKJUYjK_fqWw3u_EJ4ZVHzOtu1ohGdj6tl8VgxXsyjkie1Cw-qaCCE0/s1600/part06.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWx1WrhaljR_BSRrolEhZ0eTnmeHJQnwFvGSNODjeXmW7TG8e64kyJ43IB8eTWLhYpLjejdl0YqpkHYaPj6TV8vKJUYjK_fqWw3u_EJ4ZVHzOtu1ohGdj6tl8VgxXsyjkie1Cw-qaCCE0/s1600/part06.PNG" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<strike>My ass</strike> The world is saved!</div>
<div>
<br /></div>
<div>
Conclusions:</div>
<div>
<br /></div>
<div>
<ol>
<li>You can reuse old labels because they are strong and TS3100 has no problem with duplicating ID on new tape. Still don't know if there is possibility to use any new label - without CLNU prefix. Maybe (I didn't want to loose any of new label for this exercise).</li>
<li>Reorder No. on IBM tape does not determine if the label is included.</li>
<li>While ordering custom labels for new labels - add some labels for future cleaning tapes.</li>
</ol>
</div>
<div>
<br /></div>
<div>
<br /></div>
<br />
<br />huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com0tag:blogger.com,1999:blog-171016756649640819.post-45867158498367991282015-01-04T05:13:00.000-08:002015-01-04T05:33:42.401-08:00iPhone nie jest źródłem tego problemu - czyli jak zdjąłem SIM Lock w iPhoneNowy rok zaczął się dla mnie niepomyślnie. Od telefonu bossa, że nie może poradzić sobie z nową kartą SIM, którą przygotowałem mu do zmiany 1-ego stycznia, w związku z przejściem z numerem do nowego operatora. Coś poszło nie tak - praktyka nie zgadzała się z teorią - przygotowana przeze mnie instrukcja była nic nie warta. iPhone 5 (iOS7) po zmianie karty z Orange na T-Mobile domagał się podłączenia do sieci WIFI. Żeby było trudniej boss wypoczywał gdzieś na szczytach Alp.<br />
<br />
Znajdujemy sieć WIFI, nawiązujemy połączenie wideo przez FaceTime w iPad.<br />
<br />
Powtarzamy próbę z iPhone. iPhone próbuje się aktywować jednak zgłasza problem z kartą SIM - słyszę od bossa komunikat, który w skrócie brzmi "Nieważna karta SIM (...) iPhone nie jest źródłem tego problemu". Shit! iPhone 5 był kupiony w Orange, a ten założył SIM LOCK. Naprawdę nie wiem, jak to się stało, że nie uwzględniłem takiej możliwości. Błędne przeświadczenie, że Orange śladem innych sieci zarzucił zakładanie SIM LOCK?<br />
<br />
Czytałem uprzednio o procedurze zdejmowania SIM LOCK w Orange, ale nigdy tego nie robiłem: Udajesz się do jednego z głównych punktów Orange, przedstawiasz papiery zakupu telefonu, płacisz 77 PLN, czekasz kilka dni - w tym czasie Orange wysyła żądanie do Apple - po kilku dniach podpinasz telefon do Tunes (tj. do PC lub Mac), iTunes zdejmuje SIM LOCK.<br />
<br />
Znajduję również artykuł na stronie Orange, potwierdzający powyższe: <a href="http://www.orange.pl/fid,4002278347,id,126700017,title,faq-simlock,forumthread.html">http://www.orange.pl/fid,4002278347,id,126700017,title,faq-simlock,forumthread.html</a><br />
<br />
Jest 1-szy stycznia, nie mam żadnych firmowych papierów, a wszystkie punkty usługowe są pozamykane. Dzwonię do Orange. Szczęśliwie 1-ego stycznia telefoniczne biuro obsługi pracuje. Chociaż numer telefonu został przeniesiony już do T-Mobile, to rachunek firmowy jest aktywny, ponieważ znajdują się na nim inne aktywne numery telefonów (chociaż na dobrą sprawę i tak powinien być aktywny, do momentu rozliczeń za miesiąc grudzień). Podaję ID klienta z faktury, którą pobrałem z Orange On-Line. Uwierzytelniam się znanym mi kodem abonenckim. Nie znam numeru IMEI, ale operatorka odnajduje tę informację - powiązaną z numerem klienta - w swojej bazie danych. Zgadzam się na opłatę siedemdziesięciu kilku złotych. Podaję swój email do kontaktu. Zlecenie zostaje przyjęte. Operatorka oznajmia, że zlecenie będzie realizowane do dwóch dni roboczych, ale jest szansa, że otrzymam odpowiedź jeszcze dziś. Odpowiedź będzie w postaci email z instrukcją.<br />
<br />
I rzeczywiście. Późnym wieczorem otrzymuję email od bok@orange.pl, o treści:<br />
<br />
<div class="MsoPlainText">
<i>Witam, <o:p></o:p></i></div>
<div class="MsoPlainText">
<i><br /></i></div>
<div class="MsoPlainText">
<i>Numer IMEI: ###################### został zaimplementowany do
systemu Apple.<o:p></o:p></i></div>
<div class="MsoPlainText">
<i><br /></i></div>
<div class="MsoPlainText">
<i>Instrukcja postępowania:<o:p></o:p></i></div>
<div class="MsoPlainText">
<i><br /></i></div>
<div class="MsoPlainText">
<i>1. Zainstalować kartę innego operatora w iPhonie z
naładowaną baterią .<o:p></o:p></i></div>
<div class="MsoPlainText">
<i>2. Włączyć urządzenie i wprowadzić kod PIN.<o:p></o:p></i></div>
<div class="MsoPlainText">
<i>3. Uruchomić aplikację iTunes na komputerze z dostępem do
Internetu.<o:p></o:p></i></div>
<div class="MsoPlainText">
<i>4. Podłączyć iPhona do komputera.<o:p></o:p></i></div>
<div class="MsoPlainText">
<i>5. Aplikacja iTunes automatycznie wykryje urządzenie i
rozpocznie proces odblokowania.<o:p></o:p></i></div>
<div class="MsoPlainText">
<i>6. Proces odblokowania może potrwać od 2 do 30 minut w
zależności od prędkości transmisji łączy internetowych.<o:p></o:p></i></div>
<div class="MsoPlainText">
<i>7. Zakończenie procesu odblokowania będzie potwierdzone
komunikatem: "Congratulations, your iPhone has been unlocked".<o:p></o:p></i></div>
<div class="MsoPlainText">
<i> (Dokładna treść
komunikatu i wersja językowa może się różnić w zależności od wersji aplikacji iTunes)<o:p></o:p></i></div>
<div class="MsoPlainText">
<i><br /></i></div>
<div class="MsoPlainText">
<i>Uwaga:<o:p></o:p></i></div>
<div class="MsoPlainText">
<i>Odłączenie iPhona od komputera przed zakończeniem procesu
odblokowania może skutkować uszkodzeniem oprogramowania urządzenia. <o:p></o:p></i></div>
<div class="MsoPlainText">
<i><br /></i></div>
<div class="MsoPlainText">
<i>Pozdrawiam, <o:p></o:p></i></div>
<div class="MsoPlainText">
<i><br /></i></div>
<div class="MsoPlainText">
<i>Piotr #######<o:p></o:p></i></div>
<i><br /></i>
<br />
<div class="MsoPlainText">
<i>Doradca ds. Obsługi Klienta Indywidualnego Orange Polska
S.A.</i><o:p></o:p></div>
<div class="MsoPlainText">
<br /></div>
<div class="MsoPlainText">
Próbuje znaleźć informację w Google, czy faktycznie iTunes i podłączenie z PC jest teraz niezbędne. Czy wystarczy WIFI, żeby aktywować telefon i zdjąć SIM LOCK. Jednak nie znajduję, by było to możliwe.</div>
<div class="MsoPlainText">
<br /></div>
<div class="MsoPlainText">
Finalnie umawiamy się na dalsze próby za 3 dni, w biurze, w Polsce. Doraźnie w telefonicznym BOK T-Mobile zlecam przekierowanie wszystkich połączeń na inny telefon (innego uczestnika wyprawy). Zlecenie zostaje przyjęte i przekierowania działają po upływie około 30 minut.</div>
<div class="MsoPlainText">
<br /></div>
<div class="MsoPlainText">
Spotykamy się w biurze. Nastawiony jestem na podłączenie iPhone do PC-ta i iTunes. Jednak komunikat na iPhone zachęca mnie do próby aktywacji bez podłączania iPhone do PC-ta. iPhone 5 (iOS7) prosi o podanie Apple ID i hasła (podpowiada jaki to powinien być Apple ID, podając zamaskowany email z odsłoniętymi wybranymi literami). Podajemy Apple ID i hasło. Telefon aktywuje się w mig i loguje do sieci T-Mobile. Wyłączamy z poziomu iPhone przekierowanie rozmów. Telefon poprawnie przyjmuje połączenia i pozwala je wykonywać. Ja mam do siebie nieco żalu, że nie podjęliśmy próby aktywowania telefonu przez WIFI trzy dni wcześniej, tj. po otrzymaniu email z Orange.<br />
<br />
Uff! Wszystko działa. Moja dupa jest uratowana.<br />
4 dni zepsutej krwi - "iPhone nie jest źródłem tego problemu". :)</div>
<div class="MsoPlainText">
<br /></div>
<div class="MsoPlainText">
Wnioski z całej tej historii:</div>
<div class="MsoPlainText">
</div>
<ul>
<li>Od iOS7 do usunięcia SIM Lock nie jest potrzebne połączenie z PC z iTunes - potrzebne jest WIFI i karta SIM docelowego operatora</li>
<li>Nie jest potrzebna wycieczka do Orange - wystarczy kontakt telefoniczny z BOK (jeżeli konto klienta jest wciąż aktywne i Orange ma możliwość dopisania kwoty za zdjęcie SIM LOCK do rachunku)</li>
<li>Sprawę daje się zorganizować w 24h</li>
<li>Instrukcje dostarczane przez Orange są nieaktualne</li>
</ul>
<div>
W domowych warunkach podjąłem próbę zilustrowania sytuacji zrzutami ekranu. Zrzuty pochodzą z iPhone 4S i iOS 8.1.2. Mój iPhone 4S ma SIM LOCK na Orange. Dysponuję tanim starterem z T-Mobile. Na ten moment udało mi się przygotować jedynie zrzuty ekranu ilustrujące, jak zachowuje się iPhone z SIM LOCK po włożeniu obcej karty.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggbikV4v-BRBnkpg8Uem4Er0B8sF1nCN-_xA_cWpX8EI1IbvrejXiHQ6hdPZX74Q6WQE02YF3IVzYJzEuQjVbZES5Lx7E772nIwLttRPYwtzaL5xi1aYPhYcFDIoUalLorNYeQLptq7Ew/s1600/IMG_1018.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggbikV4v-BRBnkpg8Uem4Er0B8sF1nCN-_xA_cWpX8EI1IbvrejXiHQ6hdPZX74Q6WQE02YF3IVzYJzEuQjVbZES5Lx7E772nIwLttRPYwtzaL5xi1aYPhYcFDIoUalLorNYeQLptq7Ew/s1600/IMG_1018.PNG" height="320" width="213" /></a></div>
<div style="text-align: center;">
Po włożeniu obcej karty SIM na moment pojawia się logo Apple (ale iOS faktycznie się nie restartuje)</div>
<div style="text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtZSUqljG2lgkWjnI-J1wJJt6POkUZ23uUetT7AdYRfJHlgBcEL_mWh6OdSyvYQF1ZDqwUIpIWWiVJX_7IYV9ouL2Ly084KaTEZCPrpUH4T4PntN1jKs7EKHPtp-L0pX1yZbREzDkaznQ/s1600/IMG_1013.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtZSUqljG2lgkWjnI-J1wJJt6POkUZ23uUetT7AdYRfJHlgBcEL_mWh6OdSyvYQF1ZDqwUIpIWWiVJX_7IYV9ouL2Ly084KaTEZCPrpUH4T4PntN1jKs7EKHPtp-L0pX1yZbREzDkaznQ/s1600/IMG_1013.PNG" height="320" width="213" /></a></div>
<div style="text-align: center;">
Zaraz potem pojawia się komunikat o konieczności aktywacji telefonu.</div>
<div style="text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoHxetdzpO4sMPkL3y4A4v_sWmqfL3gL-eEB_FTJzA2iJrZ7ZdRugCiVWcpIkuEGb2DAi_zGRUtOhdQxi4LqDylt0Z8oYFF1pJ0C9vKMR8iSN0XfsZuVMQR2t_oLGihZdSF9BS2nGTY-g/s1600/IMG_1014.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoHxetdzpO4sMPkL3y4A4v_sWmqfL3gL-eEB_FTJzA2iJrZ7ZdRugCiVWcpIkuEGb2DAi_zGRUtOhdQxi4LqDylt0Z8oYFF1pJ0C9vKMR8iSN0XfsZuVMQR2t_oLGihZdSF9BS2nGTY-g/s1600/IMG_1014.PNG" height="320" width="213" /></a></div>
<div style="text-align: center;">
Konieczność wprowadzenia kodu do telefonu.</div>
<div style="text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhonDdNk4dKcvUWNTTcfpbhoD_gbIjQFPfoL_Z3bCUD7-5tp6RvCU2SrqgLu2LMbtW012LEIbily3nITJYBb8K2ZcYaxz9LkILkQJeBU5JAtHBdYW1bu__V5Qk3x4iJCro36XyibUq66qQ/s1600/IMG_1015.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhonDdNk4dKcvUWNTTcfpbhoD_gbIjQFPfoL_Z3bCUD7-5tp6RvCU2SrqgLu2LMbtW012LEIbily3nITJYBb8K2ZcYaxz9LkILkQJeBU5JAtHBdYW1bu__V5Qk3x4iJCro36XyibUq66qQ/s1600/IMG_1015.PNG" height="320" width="213" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
To być może jest informacja o pobraniu ustawień dla T-Mobile (centrum SMS, APN) - w tej próbie iPhone znajdował się w zaprzyjaźnionej sieci WIFI.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyE44qFzv1Ie7sAiyM3qAhm3C3Ln9CT-p2TYmHqha9PLsx0Dy6VAPR5epqKMNrwfRHY7yX2HOAz7k1ZzO7pX4cDQFKElPBBuTilybKIy-Ebdk2O_FOPxifJLrKHoFFDuaqLNL3WBBF-xw/s1600/IMG_1016.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyE44qFzv1Ie7sAiyM3qAhm3C3Ln9CT-p2TYmHqha9PLsx0Dy6VAPR5epqKMNrwfRHY7yX2HOAz7k1ZzO7pX4cDQFKElPBBuTilybKIy-Ebdk2O_FOPxifJLrKHoFFDuaqLNL3WBBF-xw/s1600/IMG_1016.PNG" height="320" width="212" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Teraz następuje próba aktywacji i trwa to kilkanaście sekund (iPhone znajduje się w zaprzyjaźnionej sieci WIFI).</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikbCz36PctIv6kgjaIAkjv0o4VC4XxoXPV4QtR1pNF_h6yBQMOblm9RMzZf6-RtujmWkV64AAIVRtbOiywuyvaXkzpWj6mYjez7rI4wN20v_SYYRpmrZfUnwxqrggXD4YBXX__rYzZsWs/s1600/IMG_1017.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikbCz36PctIv6kgjaIAkjv0o4VC4XxoXPV4QtR1pNF_h6yBQMOblm9RMzZf6-RtujmWkV64AAIVRtbOiywuyvaXkzpWj6mYjez7rI4wN20v_SYYRpmrZfUnwxqrggXD4YBXX__rYzZsWs/s1600/IMG_1017.PNG" height="320" width="213" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
"iPhone nie jest źródłem tego problemu". W tym całym wywodzie nie pada sformułowanie SIM LOCK.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Teraz jeszcze jedna próba, którą rozpoczynam poza znaną siecią WIFI (tj. usunąłem dostępy do domowej sieci WIFI z pamięci iPhone)</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNu47oF20Cyl9oDkq6pzADLNpLzkAEulWutiVi1JDnpStW_TpTHOYW3dnqn69OkvqIUG8G7gqDlxthRfJeXvv8NKTZa1dcv0DkEL8z6lw5y6dF2MYVe5rbrvEYAISqZep5FNqdg4bj7PE/s1600/IMG_1018.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNu47oF20Cyl9oDkq6pzADLNpLzkAEulWutiVi1JDnpStW_TpTHOYW3dnqn69OkvqIUG8G7gqDlxthRfJeXvv8NKTZa1dcv0DkEL8z6lw5y6dF2MYVe5rbrvEYAISqZep5FNqdg4bj7PE/s1600/IMG_1018.PNG" height="320" width="213" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHNv5IFD8SIRCBrcg1Bg46GJaUjqjXJ2Gn-SzkKLW89CvB6Xq6TfvLocMX_QJY9mMSXm-WHLHYtQvF7IrdhvajotbbctvmjaNazNS5976dq4X2uTpejxgRJ35I0t0fKJ9mwt7FbNFTIeo/s1600/IMG_1019.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHNv5IFD8SIRCBrcg1Bg46GJaUjqjXJ2Gn-SzkKLW89CvB6Xq6TfvLocMX_QJY9mMSXm-WHLHYtQvF7IrdhvajotbbctvmjaNazNS5976dq4X2uTpejxgRJ35I0t0fKJ9mwt7FbNFTIeo/s1600/IMG_1019.PNG" height="320" width="213" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCjssM7Kjm6qlrUwMr_QkVTzgk1X0kLLCxh5UjqWYr3iP0HtTHGQhqGhC39AE74crZY-ntp7DW9_SK1IoUWrRSrXi_Zz1J0eDj_8XAqtmwrlOAwRJS1nj4kT2It2grEnRmX7JUbf5ZyMM/s1600/IMG_1021.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCjssM7Kjm6qlrUwMr_QkVTzgk1X0kLLCxh5UjqWYr3iP0HtTHGQhqGhC39AE74crZY-ntp7DW9_SK1IoUWrRSrXi_Zz1J0eDj_8XAqtmwrlOAwRJS1nj4kT2It2grEnRmX7JUbf5ZyMM/s1600/IMG_1021.PNG" height="320" width="213" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Zgodnie z oczekiwaniami iPhone daje możliwość dołączenia się do WIFI.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh47YzGs8AxcCAU3mbZNXkIqa7IW_1FEjr2-Wkzti9omlODozn5lOLDhxJ60NvZeaXO65HhBU8TTlXpyGwL-rGNLbgIkPbrd6q-C9ve9NDMxBV4dwG4J33g0KZK7VD1TrWPry3gRhYvUZA/s1600/IMG_1022.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh47YzGs8AxcCAU3mbZNXkIqa7IW_1FEjr2-Wkzti9omlODozn5lOLDhxJ60NvZeaXO65HhBU8TTlXpyGwL-rGNLbgIkPbrd6q-C9ve9NDMxBV4dwG4J33g0KZK7VD1TrWPry3gRhYvUZA/s1600/IMG_1022.PNG" height="320" width="213" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Próba opuszczenia tego wizarda przez naciśnięcie przycisku HOME powoduje jedynie wyświetlenie powyższego menu zamiast powrotu do ekranu początkowego.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Na ten moment nie dysponuję zrzutami ekranu prezentującymi moment usunięcia SIM LOCK-a w procesie aktywacji urządzenia przez WIFI.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com3tag:blogger.com,1999:blog-171016756649640819.post-43820027266882117162014-08-28T03:43:00.001-07:002014-08-28T03:43:52.209-07:00Where to find Skype for Business (MSI package), nowadays?I'm always wasting time while looking for MSI package download link on Skype status. <strike>Skype </strike>Microsoft makes it harder and harder to find. On community forum I've found this useful link:<br />
<br />
<a href="http://www.skype.com/go/getskype-msi">http://www.skype.com/go/getskype-msi</a><br />
<br />
File downloads as "SkypeSetup.msi". To find what exact version is this, you may check file properties.<br />
<br />
Properties > Details > Comment (like on image below; sorry PL version)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRgDmF1dJUV838pg4wndCI-jltEElpqV5Hng_UgRZusgxXYGzt3Xtw_dBqoJBRxO7ObWjy8iu5G4CNDStq-XcHt1HfMFN036vzA-XdBCcr5WSac9oht3v3yk95C_V_QHhvOUaBI2CefmQ/s1600/skype_msi.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRgDmF1dJUV838pg4wndCI-jltEElpqV5Hng_UgRZusgxXYGzt3Xtw_dBqoJBRxO7ObWjy8iu5G4CNDStq-XcHt1HfMFN036vzA-XdBCcr5WSac9oht3v3yk95C_V_QHhvOUaBI2CefmQ/s1600/skype_msi.png" /></a></div>
<br />huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com0tag:blogger.com,1999:blog-171016756649640819.post-75720779075624689742014-07-23T14:15:00.000-07:002014-07-23T14:15:59.484-07:00Convert SVN repo to GIT repos. Ready-to-use scripts.<h2>
Finally..</h2>
Finally, I managed move all my micro-projects from one huge SVN repo to multiple GIT repos. My micro-projects (about 100+) are generally SQL/Crystal reports, SQL procedures and triggers, ad-hoc SQL queries (maybe useful in future) and some of C# and MVC3 projects also.<br />
<br />
I have spent a lot of time to make my mind how should all those micro-projects be organized as a GIT repo or repos.<br />
<br />
There were arguments to have all of those projects in one monolith GIT repo (as it was in SVN):<br />
<ul>
<li>When I clone my monolith GIT repo I have all my micro-projects cloned (and backed up this way);</li>
<li>It's easier to track my past activity reading one log than hundred of them;</li>
<li>Some of micro-projects depends on other (they were linked in SVN using externals).</li>
</ul>
<div>
And there were arguments not to have those project in one monolith GIT repo:</div>
<div>
<ul>
<li>Some of projects should be moved to an <i>attic</i> (I like CVS idea of having an <i>attic</i>);</li>
<li>SVN repo was not a regular structure (some of micro-projects had trunk/tags/branches structure, some of them had not, some of them was organized into common folder which had trunk/tags/branches structure) - converting this irregular may be a <strike>headache</strike> <i>ass-ache</i>.</li>
</ul>
<div>
Finally, I decided to have multiple GIT repositories. And also to break sets of micro-projects with common trunk/tags/branches structure into individual GIT repos. Then I moved all GIT bare repos to company shared folder where I clone from. Shared folder is backed onto Ultrium tape everyday.</div>
</div>
<div>
<br /></div>
<div>
So I have following cases in one monolith SVN repo:</div>
<div>
<br /></div>
<h4>
Case 1 - SVN structure per project</h4>
<div>
<span style="font-family: Courier New, Courier, monospace;">https://svn.mycompany.local/svn/main/client1/project1/trunk --> project1.git</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">https://svn.mycompany.local/svn/main/client1/project2/trunk --> project2.git</span></div>
<div>
<br /></div>
<h4>
Case 2 - common SVN structure for set of projects</h4>
<div>
<span style="font-family: Courier New, Courier, monospace;">https://svn.mycompany.local/svn/main/client1/set-of-projects1/trunk/project3 --> project3.git</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">https://svn.mycompany.local/svn/main/client2/set-of-projects2/trunk/project4 --> project4.git</span></div>
<div>
<br /></div>
<h4>
Case 3 - no SVN structure</h4>
<div>
<span style="font-family: Courier New, Courier, monospace;">https://svn.mycompany.local/svn/main/client1/project5 --> project5.git</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">https://svn.mycompany.local/svn/main/client1/project6 --> project6.git</span></div>
<div>
<br /></div>
<div>
I did succeed to convert all above cases using linux scripts I want to share you with.</div>
<div>
<br /></div>
<h2>
Download / clone the tool</h2>
<div>
You may download / clone them from my GitHub: <a href="https://github.com/htrzewik/svn-repos-to-git-repos">https://github.com/htrzewik/svn-repos-to-git-repos</a></div>
<div>
<br /></div>
<h2>
Description of the tool</h2>
<div>
There are two scripts. They are converting one project at once.</div>
<div>
<span style="font-family: Courier New, Courier, monospace;">rebuild-repos-svn-layout.sh</span> is for projects with SVN trunk/tags/branches structure (like case 1 described earlier)</div>
<div>
r<span style="font-family: Courier New, Courier, monospace;">ebuild-repos-flat-layout.sh</span> is for projects with no SVN trunk/tags/branches structure (like case 3 and case 2 also)</div>
<div>
<br /></div>
<div>
and three config files:</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">authors</span> - it's dictionary of developers who worked over SVN repos. IT'S VERY IMPORTANT THAT AUTHORS DICTIONARY IS COMPLETE. Other case history of project may be truncated - you will lost most recent commits, not the oldest. Ask uncle Google for SVN trick to list all authors in SVN repo.</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">default_svnbase</span> - put there an URL of your repo with subdirs (or put that URL into argument 2 every time you run script)</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">default_workir</span> - put there a path to workdir created for this script (temporary repos will be stored there)</div>
<div>
<br /></div>
<h3>
Examples of use</h3>
<div>
<br /></div>
<h4>
Example for case 1</h4>
<div>
Put <span style="font-family: Courier New, Courier, monospace;">https://svn.mycompany.local/svn/main/client1</span> into <span style="font-family: Courier New, Courier, monospace;">default_svnbase</span></div>
<div>
<br /></div>
<div>
Run <span style="font-family: Courier New, Courier, monospace;">./rebuild-repos-<u>svn</u>-layout.sh project1</span></div>
<div>
<br /></div>
<div>
If script succeeded move <span style="font-family: Courier New, Courier, monospace;">svn2git_workdir/git-bare/project1.git</span> to your GIT server / GIT shared folder.</div>
<div>
BE CAREFUL OF WARNING: You appear to have cloned an empty repository. Review you URL, project name, authors list.</div>
<div>
<br /></div>
<div>
Run .<span style="font-family: Courier New, Courier, monospace;">/rebuild-repos-<u>svn</u>-layout.sh project2</span></div>
<div>
<br /></div>
<div>
Move <span style="font-family: Courier New, Courier, monospace;">svn2git_workdir/git-bare/project2.git</span></div>
<div>
<br /></div>
<h4>
Example of case 2</h4>
<div>
Put <span style="font-family: Courier New, Courier, monospace;">https://svn.mycompany.local/svn/main/client1/set-of-projects1/trunk</span> into <span style="font-family: Courier New, Courier, monospace;">default_svnbase</span>. Notice: tags and branches will be lost (not converted).</div>
<div>
<br /></div>
<div>
Run <span style="font-family: Courier New, Courier, monospace;">./rebuild-repos-<u>flat</u>-layout.sh project3</span></div>
<div>
Move <span style="font-family: Courier New, Courier, monospace;">svn2git_workdir/git-bare/project3.git</span></div>
<div>
<div>
Run <span style="font-family: Courier New, Courier, monospace;">./rebuild-repos-<u>flat</u>-layout.sh project4</span></div>
<div>
Move <span style="font-family: Courier New, Courier, monospace;">svn2git_workdir/git-bare/project4.git</span></div>
</div>
<div>
<br /></div>
<h4>
Example of case 3</h4>
<div>
Put <span style="font-family: Courier New, Courier, monospace;">https://svn.mycompany.local/svn/main/client1</span> into <span style="font-family: Courier New, Courier, monospace;">default_svnbase</span>.</div>
<div>
<br /></div>
<div>
<div>
Run <span style="font-family: Courier New, Courier, monospace;">./rebuild-repos-<u>flat</u>-layout.sh project5</span></div>
<div>
Move <span style="font-family: Courier New, Courier, monospace;">svn2git_workdir/git-bare/project5.git</span></div>
<div>
<div>
Run <span style="font-family: Courier New, Courier, monospace;">./rebuild-repos-<u>flat</u>-layout.sh project6</span></div>
<div>
Move <span style="font-family: Courier New, Courier, monospace;">svn2git_workdir/git-bare/project6.git</span></div>
</div>
</div>
<div>
<br /></div>
<h2>
How it works</h2>
<div>
What scripts exactly do?</div>
<div>
<br /></div>
<div>
1. Script clones SVN repo into local GIT repo using <i>git svn clone </i>command.</div>
<div>
2. Creates target GIT bare repo and does refs trick.</div>
<div>
3. Configures local GIT repo where SVN was cloned into and add target GIT bare repo as remote.</div>
<div>
4. Pushes SVN cloned repo into target GIT bare repo.</div>
<div>
5. Renames <i>trunk </i>branch into <i>master</i> trunk (only script for SVN style repo).</div>
<div>
6. It does a test clone into temporary GIT repo.</div>
<div>
<br /></div>
<div>
After script complete you may check <span style="font-family: Courier New, Courier, monospace;">svn2git_workdir/git-test-workdir/project.git</span> if project files exists and if commit log seems complete. </div>
<div>
<br /></div>
<div>
Now, you have no excuse for not switching to GIT.</div>
huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com0tag:blogger.com,1999:blog-171016756649640819.post-64984622653171619512014-03-15T11:55:00.001-07:002014-03-15T12:14:54.503-07:00(Don't waste time for) Cisco QuickVPN Client and Windows 8.1 compatibility issueToday, I've lost many, many hours fighting with Cisco/Linksys VPN software called Cisco QuickVPN Client, which is dedicated VPN client to small business line of Cisco/Linksys routers (RVxxx family).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWw90pyHgBrsTTct7z8VQc8emxd6-cenLcfP2ku_cwA0Q-Z_2fPKfSmDhQG9kEiw42SFhID6O_jsiW4v3XeLv1xx5Z4Iy5zE26foxyQKj2GF-CGoyBkhp6o1mjKQRC4nuscycWfSeeSDA/s1600/cisco-rv082.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWw90pyHgBrsTTct7z8VQc8emxd6-cenLcfP2ku_cwA0Q-Z_2fPKfSmDhQG9kEiw42SFhID6O_jsiW4v3XeLv1xx5Z4Iy5zE26foxyQKj2GF-CGoyBkhp6o1mjKQRC4nuscycWfSeeSDA/s1600/cisco-rv082.jpg" height="105" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8aZ7rovuNiu2kts4IiyzPImnGzi8Fj_qanPZpHW9XyFXahh2Jvh_L13jEEJTRoNIANFkZOAaHBWr7koVOxBcKTmbisnVD4B9rOQGfjOVAOFXJ4XDIoo119jbks-EF4eOFNIlEic5LhwY/s1600/linksys-rv082.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8aZ7rovuNiu2kts4IiyzPImnGzi8Fj_qanPZpHW9XyFXahh2Jvh_L13jEEJTRoNIANFkZOAaHBWr7koVOxBcKTmbisnVD4B9rOQGfjOVAOFXJ4XDIoo119jbks-EF4eOFNIlEic5LhwY/s1600/linksys-rv082.jpg" height="240" width="320" /></a></div>
<br />
<br />
The newest version of Cisco QuickVPN is 1.4.2.1, dated on 2011-08-09 (<a href="http://www.cisco.com/c/en/us/products/routers/quick_vpn.html">http://www.cisco.com/c/en/us/products/routers/quick_vpn.html</a>) and it's not compatible with Windows 8/8.1.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLOXk9Y_72QXiNNsW_g9m0v0SyRywuE_ZV4ogZl3raUkSRdV8a0KFvtolZd5Oxie9-mVTW42Do9iIChonT_6YX8BfloLailN3bho7C88x_llgAJ29l3aGf0Yd0_tK20mg5BlDsRZIlDZk/s1600/vpn_logon.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLOXk9Y_72QXiNNsW_g9m0v0SyRywuE_ZV4ogZl3raUkSRdV8a0KFvtolZd5Oxie9-mVTW42Do9iIChonT_6YX8BfloLailN3bho7C88x_llgAJ29l3aGf0Yd0_tK20mg5BlDsRZIlDZk/s1600/vpn_logon.PNG" /></a></div>
<br />
The problem with Cisco QuickVPN and Windows 8/8.1 is ... it does not work ;) It always ends with following dialog.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6AqXnZunHudCrbe8924qe4AHH9NxXZdXLwfZdumM26RX_ZHyVCAtszbHwAdMbjo4IaI_m8BH0tHCCLsnICmKcgRa_pm4-j1E1aB2_MDYBR4STJAfclm3HdnWjBjv9VnB9mzAH_wv6JuU/s1600/vpn_error_message.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6AqXnZunHudCrbe8924qe4AHH9NxXZdXLwfZdumM26RX_ZHyVCAtszbHwAdMbjo4IaI_m8BH0tHCCLsnICmKcgRa_pm4-j1E1aB2_MDYBR4STJAfclm3HdnWjBjv9VnB9mzAH_wv6JuU/s1600/vpn_error_message.PNG" /></a></div>
<br />
<br />
Did read a lot of posts today, finding a lot help requests but not finding 100% guarantee solution nor proof that it really can work with W8.<br />
<br />
Some of tips were:<br />
<ul>
<li>Enable Windows 7 compatibility while installing and running client</li>
<li>Enable ICMP on Windows Firewall</li>
<li>Enable 60443 port on Windows Firewall</li>
<li>etc.</li>
</ul>
<div>
None of them worked for me. Hours of trying and trying. Always the same message and always the same log:</div>
<div>
<br /></div>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">2014/03/15 17:00:19 [STATUS]OS Version: Unknown</span></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">2014/03/15 17:00:19 [STATUS]One network interface detected with IP address 192.168.1.101</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">2014/03/15 17:00:19 [STATUS]Connecting...</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">2014/03/15 17:00:19 [DEBUG]Input VPN Server Address = XXX.XXX.XXX.XXX</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">2014/03/15 17:00:19 [STATUS]Connecting to remote gateway with IP address: XXX.XXX.XXX.XXX</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">2014/03/15 17:00:24 [STATUS]Remote gateway was reached by https ...</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">2014/03/15 17:00:24 [STATUS]Provisioning...</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">2014/03/15 17:00:27 [STATUS]Success to connect.</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">2014/03/15 17:00:27 [STATUS]Tunnel is configured. Ping test is about to start.</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">2014/03/15 17:00:27 [STATUS]Verifying Network...</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">2014/03/15 17:00:33 [WARNING]Failed to ping remote VPN Router!</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">2014/03/15 17:00:36 [WARNING]Failed to ping remote VPN Router!</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">2014/03/15 17:00:39 [WARNING]Failed to ping remote VPN Router!</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">2014/03/15 17:00:42 [WARNING]Failed to ping remote VPN Router!</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">2014/03/15 17:00:45 [WARNING]Failed to ping remote VPN Router!</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">2014/03/15 17:00:47 [WARNING]Ping was blocked, which can be caused by an unexpected disconnect.</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">2014/03/15 17:00:50 [STATUS]Disconnecting...</span></div>
<div>
<span style="font-size: xx-small;"><span style="font-family: Courier New, Courier, monospace;">2014/03/15 17:00:57 [STATUS]Success to disco</span>nnect.</span></div>
</div>
<br />
Hopefully my stubbornness was bigger then my frustration today. And I went onto creative path.<br />
<br />
I've sent Cisco QuickVPN to the hell and started processing this instruction: <a href="https://www.shrew.net/support/Howto_Linksys">https://www.shrew.net/support/Howto_Linksys</a> - which is complete instruction how to prepare Linksys RV router to work with Shrew Soft VPN Client which is free.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvtCNy_PGZu9oSqpwIuSuF8hbjS4JcaHG2shOYrPEq4YbHbx7HM0vBgVP9yCTxLW5gqAYYzuPAadG5_kPNE29W88SlwmyBDfft3by33hAA_X5svo7anDMjrZv-3G4fh33qnKoaUhTIGE4/s1600/shrew_logon.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvtCNy_PGZu9oSqpwIuSuF8hbjS4JcaHG2shOYrPEq4YbHbx7HM0vBgVP9yCTxLW5gqAYYzuPAadG5_kPNE29W88SlwmyBDfft3by33hAA_X5svo7anDMjrZv-3G4fh33qnKoaUhTIGE4/s1600/shrew_logon.PNG" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Doc above gives complete example. I did manage to set up remote router and Shrew client in minutes (succeed on first try!). What's more - Shrew Soft client brings up VPN tunnel with light speed comparing to native Cisco/Linksys - which needs few seconds for that.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDmk5g3i215HFrjogh6iuU1wKONXIyFzClFSLk4FkpwP5ywarRg0yAprvwvcwvE9bQu2rkvBuVeYd0OdH-5TWi42iIwayOArZxyNObq5Q18SWerPSVbEDaeHPVb9KwJvLaAEBOIzZCdlI/s1600/shrew_tunnel_up.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDmk5g3i215HFrjogh6iuU1wKONXIyFzClFSLk4FkpwP5ywarRg0yAprvwvcwvE9bQu2rkvBuVeYd0OdH-5TWi42iIwayOArZxyNObq5Q18SWerPSVbEDaeHPVb9KwJvLaAEBOIzZCdlI/s1600/shrew_tunnel_up.PNG" /></a></div>
<br />
<br />
Also I did test services availability via VPN tunnel:<br />
<ul>
<li>RDP (to visualized Windows 8.1) - works..</li>
<li>HTTP (to local web server) - works..</li>
<li>DNS queries (to Active Directory server) - works.. </li>
<li>PING - works.. (it didn't with Cisco QuickVPN)..</li>
<li>teleportation.. failed, additional license required ;)</li>
</ul>
So my tip is - don't waste time on getting Cisco software works. Download Shrew Soft VPN Client and complete the HOWTO. It's not as complicated nor time consuming as it may appear.<br />
<br />
Good luck!huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com2tag:blogger.com,1999:blog-171016756649640819.post-17493270409334705102014-03-12T15:03:00.000-07:002014-03-12T16:53:46.524-07:00Konfiguracja usługi Orange Neofon (VoIP) na urządzeniu Sagem F@st 3764Mógłbym snuć wiele opowieści o różnych moich przejściach z firmą Orange, ale nie temu poświęcony jest ten blog.<br />
<br />
Poniżej notatka jak skutecznie skonfigurować usługę VOiP o marketingowej nazwie Neofon na <strike>francuskim gównie</strike> Sagem F@st 3764 od Orange.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaqVb08YUTrgZHJJFOFWLhi7TgOFdedmTTUQQ5vNfQstbv3leEHRdr56pgtt8UFgwaibV-tXH1vOZvaQNXcOiK2XEaRVFP3eROfOX0oT12oJCPEGKiMACdi5kz8IIupP8PAapTxXzHyxg/s1600/sagem_box.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaqVb08YUTrgZHJJFOFWLhi7TgOFdedmTTUQQ5vNfQstbv3leEHRdr56pgtt8UFgwaibV-tXH1vOZvaQNXcOiK2XEaRVFP3eROfOX0oT12oJCPEGKiMACdi5kz8IIupP8PAapTxXzHyxg/s1600/sagem_box.jpg" height="269" width="320" /></a></div>
<br />
<br />
Wskazówka. Nawet jeśli jesteś doktorem informatyki, wykonuj wszystko jak opisano - w przypadku tych urządzeń nic nie działa tak jak powinno, żadne przyzwyczajenia użytkowników nie zostały uszanowane.<br />
<br />
Zaczynamy od ustalenia login i hasła.<br />
<br />
Login trzeba wygrzebać z papierów. Ogólnie powinien być zgodny z szablonem <b>48xxyyyyyyy@neofon.tp.pl</b>, gdzie xxyyyyyyy to numer telefonu stacjonarnego z numerem kierunkowym.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGX6J1JapXvHCutpi50-9x5v121vNvVIW9RmaVPiua75kLgHmy8P7pC30j0s614-40IN0rKitlIiSpOeY7orzCEqTOKGoowcJTTG0xnMf4KPmZDEa8UsJ0JohQHmyUwj6zcj0gmL_ZVxQ/s1600/neostrada_aneks.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGX6J1JapXvHCutpi50-9x5v121vNvVIW9RmaVPiua75kLgHmy8P7pC30j0s614-40IN0rKitlIiSpOeY7orzCEqTOKGoowcJTTG0xnMf4KPmZDEa8UsJ0JohQHmyUwj6zcj0gmL_ZVxQ/s1600/neostrada_aneks.PNG" height="206" width="320" /></a></div>
<br />
Hasło otrzymuje się na maila. Szukaj w skrzynce wiadomości od info@orange.com lub szukaj po frazie "Telefonia".<br />
<br />
Aby otrzymać hasło na maila trzeba się o nie upomnieć (już po wejściu aneksu w życie). Najlepiej zrobić to pod bezpłatnym numerem 800500555.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGdJJAM2zo3uZ6CpYcdsWq6ioosUcc6e1t5BF9qgKC6BnO2OfO8KQjCHzB8sjS7-qtL4G8MRx69qrE9o9NqP_7mrbqcswJA2Z4t9zAwrODYnrbtsPQ892GuWZQmobyqpU3RdKhtPBazWc/s1600/neofon_haslo.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGdJJAM2zo3uZ6CpYcdsWq6ioosUcc6e1t5BF9qgKC6BnO2OfO8KQjCHzB8sjS7-qtL4G8MRx69qrE9o9NqP_7mrbqcswJA2Z4t9zAwrODYnrbtsPQ892GuWZQmobyqpU3RdKhtPBazWc/s1600/neofon_haslo.PNG" height="312" width="320" /></a></div>
<br />
Zalogować się do strony zarządzania ruterem. Wskazówka: Po wypełnieniu loginu i hasła, <b>kliknąć</b> w przycisk OK. Naciśnięcie klawisza ENTER spowoduje przeładowanie strony i wyczyszczenie hasła, co może silnie sugerować brak jego poprawności. Zatem - nie ENTER, tylko klikać w OK.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikpZQfzu5BuCgKbsCmpWZWwLzHwvLzKn5T_Fr7_sZiv9HP1wX58HVGQ8acNRIvHCt2m6qk7IOf389JeNxCwgzajRH2B5itFdtDVmQm9Eg0TDxNAaKfzKzJ9_XjlMSlqGY9JwOLfmRthV8/s1600/sagem_login.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikpZQfzu5BuCgKbsCmpWZWwLzHwvLzKn5T_Fr7_sZiv9HP1wX58HVGQ8acNRIvHCt2m6qk7IOf389JeNxCwgzajRH2B5itFdtDVmQm9Eg0TDxNAaKfzKzJ9_XjlMSlqGY9JwOLfmRthV8/s1600/sagem_login.png" height="284" width="320" /></a></div>
<br />
W menu z lewej, sekcja Konfiguracja, klikamy w VOiP.<br />
<br />
Zakładkę Ogólne ustawiamy jak na ilustracji.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0wdP20T1DTiS7f92IQudHWzNJ1Df6wICeScTMmsNp3PPpgALqfLRIKjlh0tQbZ6ouanTXZl5xNKljID4RAHITcWSJlZkEl2EUOTRKwdj7Gvdnyp9uAgbM22tWK6J3m9QPTDq2SRPPzpo/s1600/sagem_neofon_ogolne.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0wdP20T1DTiS7f92IQudHWzNJ1Df6wICeScTMmsNp3PPpgALqfLRIKjlh0tQbZ6ouanTXZl5xNKljID4RAHITcWSJlZkEl2EUOTRKwdj7Gvdnyp9uAgbM22tWK6J3m9QPTDq2SRPPzpo/s1600/sagem_neofon_ogolne.png" height="320" width="309" /></a></div>
<br />
Zakładkę Linia 0 ustawiamy jak na ilustracji.<br />
W przypadku, gdy zaznaczyłem opcję CLIR obserwowałem taki efekt, że mogłem odbierać rozmowy przychodzące, ale nie mogłem nawiązywać połączeń (zawsze otrzymywałem sygnał zajętości).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipOix-swxYavSsVWZ8SJ3Mw1EbYq_NLPr1dnT3yeqD0qiTy-KzwcxQQC1lW5aml15orqMEWlM8GKZAdHWafxVOWuWib1qWtd54fj9oyDJqLJ0sxU5WHiTk6r72ffNlXsS58Boh87GQAy8/s1600/sagem_neofon_linia0.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipOix-swxYavSsVWZ8SJ3Mw1EbYq_NLPr1dnT3yeqD0qiTy-KzwcxQQC1lW5aml15orqMEWlM8GKZAdHWafxVOWuWib1qWtd54fj9oyDJqLJ0sxU5WHiTk6r72ffNlXsS58Boh87GQAy8/s1600/sagem_neofon_linia0.png" height="320" width="310" /></a></div>
<br />
Dla porządku umieszczam ilustrację zakładki Linii 1, chociaż w tym przypadku Linia 1 nie była używana.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdQ7awZknO-DRkbG6iizQZYnFUdQoqothU_6Cxcpn0LTqWMHquEWGywtnVkvAlJLVwnsBxi1r-gwYSxqjQgDO4py1jVr1RAXFG6Dy175fk0qRWt656dd57hr6nIzpLsajD2WTdpKtWWAc/s1600/sagem_neofon_linia1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdQ7awZknO-DRkbG6iizQZYnFUdQoqothU_6Cxcpn0LTqWMHquEWGywtnVkvAlJLVwnsBxi1r-gwYSxqjQgDO4py1jVr1RAXFG6Dy175fk0qRWt656dd57hr6nIzpLsajD2WTdpKtWWAc/s1600/sagem_neofon_linia1.png" height="320" width="312" /></a></div>
<br />
Teraz magiczna sekwencja przekazana przez konsultanta.<br />
<br />
<ol>
<li>Przechodzimy na zakładkę <b>Linia 0</b>.</li>
<li>Klikamy w przycisk <b>Potwierdź</b>. Nie będzie żadnego wizualnego potwierdzenia akcji użytkownika poza tym, że w pasku adresu przeglądarki coś się zadzieje.</li>
<li>Przechodzimy na zakładkę <b>Ogólne</b>.</li>
<li>Klikamy w przycisk <b>Potwierdź</b>. Nie będzie żadnego wizualnego potwierdzenia akcji użytkownika poza tym, że w pasku adresu przeglądarki coś się zadzieje.</li>
<li>Przechodzimy <b>Narzędzi zaawansowanych</b> (menu z lewej).</li>
<li>Przechodzimy do <b>Restart</b> i potwierdzamy restart. Warto sobie zapuścić ping-a na ruter i coś w internecie, żeby zorientować się kiedy można powrócić do strony zarządzania.</li>
<li>Powracamy do głównej strony zarządzania i obserwujemy status telefonu. <b>Niczego nie dotykamy!</b> Stan będzie odświeżał się samoczynnie. Najpierw Internet/VDSL, potem telefon. <b>Nie klikamy</b> w Włącz usługę - po prostu cierpliwie czekamy.</li>
<li>Sprawdzamy telefon - rozmowa przychodząca, rozmowa wychodząca. Jeżeli nie działa - przetwarzamy powyższą instrukcję jeszcze raz, nie pomijając żadnego kroku ani wskazówki. Jeżeli nadal nie działa dzwonimy pod 800500555.</li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLNEdEgWwqucDLS2CJWLZa0iV1-MmADIoYCZIjNAChpOi-WAKsmR-I-hGXaWfCwYfECvH8xV-M2n9r-YGv9YKW6LnUQxHuQfXnep8qtap5Y_m2Ql2w_LNbetet3WuzYaocK_-3ZUTmvlo/s1600/sagem_restart.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLNEdEgWwqucDLS2CJWLZa0iV1-MmADIoYCZIjNAChpOi-WAKsmR-I-hGXaWfCwYfECvH8xV-M2n9r-YGv9YKW6LnUQxHuQfXnep8qtap5Y_m2Ql2w_LNbetet3WuzYaocK_-3ZUTmvlo/s1600/sagem_restart.PNG" height="105" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU4VkTL4HYVdoP7XslTz8QW7Ppf0NsCe11YFB9Us1wjK_0WOY0B3EBWuhYd6knV4zQ7SBtUTGyHtTNUw8W49kS5uRm8BoeRGUjrONkijZQQtuoXbCffvIoJAu-SzqBjSTmW02LAbYn23g/s1600/sagem_status.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU4VkTL4HYVdoP7XslTz8QW7Ppf0NsCe11YFB9Us1wjK_0WOY0B3EBWuhYd6knV4zQ7SBtUTGyHtTNUw8W49kS5uRm8BoeRGUjrONkijZQQtuoXbCffvIoJAu-SzqBjSTmW02LAbYn23g/s1600/sagem_status.png" height="284" width="320" /></a></div>
<div>
<br /></div>
<div>
Powyższa instrukcja powstała do urządzenia z firmware 4.9.4.TPSA_v805E.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiY0-PnvaTpeVZ7qK_sJtGMiEXWUKcqsp1DzLvPC_zN9RDHVUpJRIIiN25SztHBp63rNYEQMVr-ONDWZGWbN3TXfMSAeOHc6IK0R4i8kTxcJdv-yF93TPDd1UejNX6wmdEJk2xmbYrjU0/s1600/sagem_firmware.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiY0-PnvaTpeVZ7qK_sJtGMiEXWUKcqsp1DzLvPC_zN9RDHVUpJRIIiN25SztHBp63rNYEQMVr-ONDWZGWbN3TXfMSAeOHc6IK0R4i8kTxcJdv-yF93TPDd1UejNX6wmdEJk2xmbYrjU0/s1600/sagem_firmware.png" height="122" width="320" /></a></div>
<div>
<br /></div>
huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com8tag:blogger.com,1999:blog-171016756649640819.post-14453438725997232122014-03-05T14:59:00.001-08:002014-03-05T15:03:19.178-08:00VMware ESXi: Virtual machine Version 10 may be a blind alleyEvery wisdom needs time to come..<br />
<br />
This time was no different.<br />
<br />
I set a conversion of old crappy (physical) server to VMware virtual machine onto VMware ESXi Hypervisor 5.5.<br />
<br />
I tooks 12 hours of conversion just to get this message:<br />
"You cannot use the vSphere Client to edit settings of virtual machies of version 10 or higher."<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib9bKtFUQfq5JCHFOFN-dcy-waPax6QcLPP6uAgy2ynhaCGQ00jrH7JeqcWAOsvNF3ObmCkEJ4j5LxTMqIxxgpA4vqOqvCaH4j4xHkVZiOk85IdcgH8SWU_NsDaYx7wasOdGKVYcOSdII/s1600/vm55-main-screen-with-message.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib9bKtFUQfq5JCHFOFN-dcy-waPax6QcLPP6uAgy2ynhaCGQ00jrH7JeqcWAOsvNF3ObmCkEJ4j5LxTMqIxxgpA4vqOqvCaH4j4xHkVZiOk85IdcgH8SWU_NsDaYx7wasOdGKVYcOSdII/s1600/vm55-main-screen-with-message.png" height="476" width="640" /></a></div>
<br />
What went wrong?<br />
<br />
Default destination virtual machine version was 10, which I left unchanged (screen below).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwVDzQIa2rIOpgR_VpTutCERFFAFFl8mMxDhZmex_L2DFWfVw2aFp92VrFIQ-tVrIOLwUZOF9kf50CBUe6IfBzsz_AbC939AaIIH8_AWCRd4MOxeJk10O-O7k_drPlRf3jAjssTuG-ZL0/s1600/vmconverter-vm-version-selector.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwVDzQIa2rIOpgR_VpTutCERFFAFFl8mMxDhZmex_L2DFWfVw2aFp92VrFIQ-tVrIOLwUZOF9kf50CBUe6IfBzsz_AbC939AaIIH8_AWCRd4MOxeJk10O-O7k_drPlRf3jAjssTuG-ZL0/s1600/vmconverter-vm-version-selector.png" height="502" width="640" /></a></div>
<br />
There was no alerts nor suggestions not to choose it while using ESXi 5.5.<br />
<br />
Why? Because VMware ESXi can host Version 10 itself (see: <a href="http://kb.vmware.com/kb/1003746">kb.vmware.com/kb/1003746</a>) but it cannot be managed by free version vSphere Client.<br />
<br />
This is what vSphere Client is trying to say every time you log in.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyjgLnJ1XGVHC9zKQifhiBBDKO2yoX1FRCehPJPZVuWMzyEPIgfGWJgGRmQ4YOovr5a36RUJPFLgeBK6mobpmmzsYI8iaCtzbG2ufz1s7q8r8za-ZjLLE4QDeD9d5_eCwkC2SrZhyYZSQ/s1600/vm55-login-screen.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyjgLnJ1XGVHC9zKQifhiBBDKO2yoX1FRCehPJPZVuWMzyEPIgfGWJgGRmQ4YOovr5a36RUJPFLgeBK6mobpmmzsYI8iaCtzbG2ufz1s7q8r8za-ZjLLE4QDeD9d5_eCwkC2SrZhyYZSQ/s1600/vm55-login-screen.png" /></a></div>
<br />
And vSphere Web Client is not a free product (as ESXi Hypervisor is)..<br />
<br />
Is VMware going to be paid only option?<br />
<br />
As for now you may still go with Version 8. But one day brand new OS will come and Version 8 will be no option anymore..huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com0tag:blogger.com,1999:blog-171016756649640819.post-46596203590751999762014-02-28T17:42:00.000-08:002014-02-28T17:42:52.770-08:00Casting INT, BIGINT, SMALLINT, TINYINT to DECIMAL - a cheatsheet (SQL Server)Type casting.. some are obvious, some are not.. When you're casting to <span style="font-family: Courier New, Courier, monospace;">DECIMAL(<span style="background-color: #9fc5e8;">p</span>,<span style="background-color: #d5a6bd;">s</span>)</span> type, you've got to stop and think what scale you need and what precision is enough.<br />
<div>
<br /></div>
<div>
<h3>
Fast replay</h3>
</div>
<div>
On MSDN: <a href="http://msdn.microsoft.com/en-us/library/ms187746.aspx">http://msdn.microsoft.com/en-us/library/ms187746.aspx</a> (decimal and numeric in T-SQL)</div>
<div>
<br /></div>
<div>
In following example you have to store decimal like this <span style="background-color: #9fc5e8;">98'765.4321</span><span style="background-color: white;">.</span></div>
<div>
<br /></div>
<div>
<span style="background-color: white;">Your </span><span style="background-color: #9fc5e8;">precision is 9</span><span style="background-color: white;">: </span><span style="background-color: #9fc5e8;">98'765.4321</span></div>
<div>
Your <span style="background-color: #d5a6bd;">scale is 4</span>: 98'765.<span style="background-color: #d5a6bd;">4321</span><span style="background-color: white;">.</span></div>
<div>
<br /></div>
<div>
Another approach:</div>
<div>
Take your <span style="background-color: #ea9999;">"max value", which is 5 digits</span>: <span style="background-color: #ea9999;">98'765</span><span style="background-color: white;">.4321.</span></div>
<div>
Add your <span style="background-color: #d5a6bd;">scale, which is 4</span>: 98'765.<span style="background-color: #d5a6bd;">4321</span><span style="background-color: white;">.</span></div>
<div>
<span style="background-color: white;">And your </span><span style="background-color: #9fc5e8;">precision</span><span style="background-color: white;"> is </span><span style="background-color: #ea9999;">5</span><span style="background-color: white;"> + </span><span style="background-color: #d5a6bd;">4</span><span style="background-color: white;"> = </span><span style="background-color: #9fc5e8;">9</span><span style="background-color: white;">.</span></div>
<div>
<span style="background-color: white;"><br /></span></div>
<div>
<span style="background-color: white;">So your destination type is </span><span style="font-family: Courier New, Courier, monospace;"><span style="background-color: white;">DECIMAL(</span><span style="background-color: #9fc5e8;">9</span><span style="background-color: white;">,</span><span style="background-color: #d5a6bd;">4</span><span style="background-color: white;">)</span></span><span style="background-color: white;">.</span></div>
<div>
<span style="background-color: white;"><br /></span></div>
<div>
<span style="background-color: white;">In case of negative number, like </span><span style="background-color: #f9cb9c;">-</span><span style="background-color: #9fc5e8;">98'765.4321</span><span style="background-color: white;"> DON'T count the </span><span style="background-color: #f9cb9c;">sign</span><span style="background-color: white;">. </span><span style="background-color: #9fc5e8;">Precision is still 9</span><span style="background-color: white;">.</span></div>
<div>
<span style="background-color: white;"><br /></span>
<br />
<h3>
<span style="background-color: white;">Perfect precision</span></h3>
</div>
<div>
<span style="background-color: white;">Now, what is safe precision for casting <span style="font-family: Courier New, Courier, monospace;">BIGINT</span> to <span style="font-family: Courier New, Courier, monospace;">DECIMAL</span>?</span></div>
<div>
<span style="background-color: white;"><br /></span></div>
<div>
<span style="background-color: white;">Back to MSDN: <a href="http://msdn.microsoft.com/en-US/library/ms187745.aspx">http://msdn.microsoft.com/en-US/library/ms187745.aspx</a> (int, bigint, smallint and tiny int in T-SQL).</span></div>
<div>
<span style="background-color: white;"><br /></span></div>
<div>
<span style="background-color: white;"><span style="font-family: Courier New, Courier, monospace;">BIGINT</span> is 8-Bytes data type.</span></div>
<div>
<span style="font-family: inherit;"><span style="background-color: white;">Its range is </span>-2^63 (-9'223'372'036'854'775'808) to 2^63-1 (9'223'372'036'854'775'807).</span></div>
<div>
<span style="background-color: white;">Now, count digits above..</span></div>
<div>
<span style="background-color: white;">Or..</span></div>
<div>
<span style="background-color: white;">Better ask WolframAlpha.. <a href="http://www.wolframalpha.com/input/?i=2%5e63">http://www.wolframalpha.com/input/?i=2%5e63</a></span></div>
<div>
<br /></div>
<div>
So.. 2^63 is ~9.22 x 10^18 which is ~0,922 x 10<span style="background-color: #9fc5e8;">^19</span>. So required <span style="background-color: #9fc5e8;">precision is 19</span>. As <span style="font-family: Courier New, Courier, monospace;">BIGINT</span> cannot have digits after coma <span style="background-color: #d5a6bd;">scale is 0</span>. Finally, required type is <span style="font-family: Courier New, Courier, monospace;">DECIMAL(<span style="background-color: #9fc5e8;">19</span>,<span style="background-color: #d5a6bd;">0</span>)</span>.</div>
<div>
<br /></div>
<div>
<h3>
Fast check</h3>
</div>
<div>
<span style="font-family: Courier New, Courier, monospace;">DECLARE @dec19 DECIMAL(19,0)</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">SET @dec19 = -9223372036854775808 <span style="color: #38761d;">-- OK</span></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">SET @dec19 = 9223372036854775807 <span style="color: #38761d;">-- OK</span></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">DECLARE @dec18 DECIMAL(<span style="background-color: #cc0000;"><span style="color: white;">18</span></span>,0)</span></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace;">SET @dec18 = -9223372036854775808 <span style="color: #38761d;">-- Error: Arithmetic overflow error converting numeric to data type numeric.</span></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">SET @dec18 = 9223372036854775807 <span style="color: #38761d;">-- Error: Arithmetic overflow error converting numeric to data type numeric.</span></span></div>
</div>
<div>
<br /></div>
<div>
Which means <span style="font-family: Courier New, Courier, monospace;">DECIMAL(<span style="background-color: #6fa8dc;">19</span>,<span style="background-color: #d5a6bd;">0</span>)</span> is perfect for casting <span style="font-family: Courier New, Courier, monospace;">BIGINT</span> and <span style="font-family: Courier New, Courier, monospace;">DECIMAL(<span style="background-color: #cc0000;"><span style="color: white;">18</span></span>,<span style="background-color: #d5a6bd;">0</span>)</span> is too short.</div>
<div>
<br />
<h3>
Divisibility</h3>
</div>
<div>
Did I say "perfect"?</div>
<div>
Let's try to divide <span style="font-family: Courier New, Courier, monospace;">DECIMAL(<span style="background-color: #9fc5e8;">19</span>,<span style="background-color: #d5a6bd;">0</span>)</span> variable by 1000 and store it as <span style="font-family: Courier New, Courier, monospace;">DECIMAL(<span style="background-color: #9fc5e8;">19</span>,<span style="background-color: #b6d7a8;">3</span>)</span>..</div>
<div>
(<span style="background-color: #d5a6bd;">scale </span><span style="background-color: #b6d7a8;">changed</span>, <span style="background-color: #9fc5e8;">precision is still the same</span>)</div>
<div>
<br /></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace;">DECLARE @dec190 DECIMAL(19,0)</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">DECLARE @dec193 DECIMAL(19,<span style="background-color: #b6d7a8;">3</span>)</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">SET @dec190 = 9223372036854775807 <span style="color: #38761d;">-- BIGINT max value</span></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">SET @dec193 = @dec190 / 1000</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">SELECT @dec190, @dec193</span></div>
</div>
<div>
<br /></div>
<div>
Works! Results are: 9223372036854775807 and 9223372036854775.<span style="background-color: #b6d7a8;">807</span>.</div>
<div>
<br /></div>
<div>
Let's have another try.. Divide <span style="font-family: Courier New, Courier, monospace;">BIGINT </span>variable by 1000 and store it as <span style="font-family: Courier New, Courier, monospace;">DECIMAL(19,3)</span>..</div>
<div>
<br /></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace;">DECLARE @big BIGINT</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">DECLARE @dec193 DECIMAL(19,3)</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">SET @big = 9223372036854775807 <span style="color: #38761d;">-- BIGINT max value</span></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">SET @dec193 = @big / 1000</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">SELECT @big, @dec193</span></div>
</div>
<div>
<br /></div>
<div>
Is it good? No. Results are: 9223372036854775807 and 9223372036854775.<span style="background-color: #cc0000; color: white;">000</span>. We've lost some data.</div>
<div>
<br /></div>
<div>
So how to make it possible?</div>
<div>
<br /></div>
<div>
Like this?</div>
<div>
<span style="font-family: Courier New, Courier, monospace;">SET @dec193 = CAST(@big AS DECIMAL(19,3)) / 1000</span></div>
<div>
No. Arithmetic overflow error converting bigint to data type numeric.</div>
<div>
<br /></div>
<div>
Like this?</div>
<div>
<span style="font-family: Courier New, Courier, monospace;">SET @dec193 = CAST(@big / 1000 AS DECIMAL(19,3))</span></div>
<div>
No. Data after coma still lost.</div>
<div>
<br /></div>
<div>
We need to extend scale (and precision) of source variable to prepare it for a division.</div>
<div>
We're about to divide by 1000, which is 10<span style="background-color: #b6d7a8;">^3</span>. So our goal is to cast source <span style="font-family: Courier New, Courier, monospace;">BIGINT</span> variable to <span style="font-family: Courier New, Courier, monospace;">DECIMAL(<span style="background-color: #9fc5e8;">19</span><span style="background-color: #b6d7a8;">+3</span>,<span style="background-color: #d5a6bd;">0</span><span style="background-color: #b6d7a8;">+3</span>)</span>.. let's call WolframAlpha in here.. (joke!) ..which is <span style="font-family: Courier New, Courier, monospace;">DECIMAL(<span style="background-color: #9fc5e8;">22</span>,<span style="background-color: #b6d7a8;">3</span>)</span>.</div>
<div>
<br /></div>
<div>
We've got the winner:</div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace;">DECLARE @big BIGINT</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">DECLARE @dec193 DECIMAL(19,3)</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">SET @big = 9223372036854775807 <span style="color: #38761d;">-- BIGINT max value</span></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">SET @dec193 = <span style="background-color: #b6d7a8;">CAST(@big AS DECIMAL(22,3))</span> / 1000</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">SELECT @big, @dec193</span></div>
</div>
<div>
<br /></div>
<div>
or (less spectacular)..</div>
<div>
<br /></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace;">DECLARE @big BIGINT</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">DECLARE @dec190 DECIMAL(19,0)</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">DECLARE @dec193 DECIMAL(19,3)</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">SET @big = 9223372036854775807 <span style="color: #38761d;">-- BIGINT max value</span></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">SET @dec190 = @big</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">SET @dec193 = @dec190 / 1000</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">SELECT @big, @dec193</span></div>
</div>
<div>
<br /></div>
<div>
..because it worked earlier in article.</div>
<div>
<br />
<h3>
Cheatsheet</h3>
</div>
<div>
And now cheatsheet is coming..</div>
<br />
<table>
<tbody>
<tr>
<td>i<b>nt type</b></td>
<td><b>max value</b></td>
<td><b>max value - scietific notation</b></td>
<td><b>cast to decimal type</b></td>
<td><b>cast to decimal type - divisible by 1000</b></td>
</tr>
<tr>
<td><span style="font-family: Courier New, Courier, monospace;">BIGINT</span></td>
<td>2^63-1</td>
<td>~0.922 x 10^19</td>
<td><span style="font-family: Courier New, Courier, monospace;">DECIMAL(19,0)</span></td>
<td><span style="font-family: Courier New, Courier, monospace;">DECIMAL(22,3)</span></td>
</tr>
<tr>
<td><span style="font-family: Courier New, Courier, monospace;">INT</span></td>
<td>2^31-1</td>
<td>~0.215 x 10^10</td>
<td><span style="font-family: Courier New, Courier, monospace;">DECIMAL(10,0)</span></td>
<td><span style="font-family: Courier New, Courier, monospace;">DECIMAL(13,3)</span></td>
</tr>
<tr>
<td><span style="font-family: Courier New, Courier, monospace;">SMALLINT</span></td>
<td>2^15-1</td>
<td>32767</td>
<td><span style="font-family: Courier New, Courier, monospace;">DECIMAL(5,0)</span></td>
<td><span style="font-family: Courier New, Courier, monospace;">DECIMAL(8,3)</span></td>
</tr>
<tr>
<td><span style="font-family: Courier New, Courier, monospace;">TINYINT</span></td>
<td>2^8-1</td>
<td>255</td>
<td><span style="font-family: Courier New, Courier, monospace;">DECIMAL(3,0)</span></td>
<td><span style="font-family: Courier New, Courier, monospace;">DECIMAL(6,3)</span></td>
</tr>
</tbody></table>
<br />
<div>
To be sure..<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">DECLARE @dec190 DECIMAL(19,0) = 9223372036854775807</span><br />
<span style="font-family: Courier New, Courier, monospace;">DECLARE @dec223 DECIMAL(22,3) = 9223372036854775807.123</span><br />
<span style="font-family: Courier New, Courier, monospace;">DECLARE @dec100 DECIMAL(10,0) = 2147483647</span><br />
<span style="font-family: Courier New, Courier, monospace;">DECLARE @dec133 DECIMAL(13,3) = 2147483647.123</span><br />
<span style="font-family: Courier New, Courier, monospace;">DECLARE @dec50 DECIMAL(5,0) = 32767</span><br />
<span style="font-family: Courier New, Courier, monospace;">DECLARE @dec83 DECIMAL(8,3) = 32767.123</span><br />
<span style="font-family: Courier New, Courier, monospace;">DECLARE @dec30 DECIMAL(3,0) = 255</span><br />
<span style="font-family: Courier New, Courier, monospace;">DECLARE @dec63 DECIMAL(6,3) = 255.123</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">SELECT @dec190, @dec223, @dec100, @dec133, @dec50, @dec83, @dec30, @dec63</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: inherit;">No errors.</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">That's all folks for today.</span></div>
huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com0tag:blogger.com,1999:blog-171016756649640819.post-81302168727818943312013-10-18T14:53:00.000-07:002013-10-18T14:53:20.866-07:00Access to (full) shell of Symantec Messaging Gateway (aka Brightmail)Symantec Messaging Gateway (aka Brightmail) is anti-spam and anti-virus software for internet mail. It's distributed as VMware appliance (or installation disc for dedicated machines).<br />
<br />
It's Linux based system but its shell is limited to some maintenance commands specific to product. There are also some limited number of Linux commands available - like <i>ifconfig, route, ping, telnet.</i><br />
<i><br /></i>
But when it's not enough, when you need access some additional logs, there is a <i>support</i> user with access to full Linux shell.<br />
<br />
Here is a receipt how to access this account.<br />
<br />
<br />
<ol>
<li>Open a console (on pictures Virtual Machine Console is launched under VMware vShpere Client).</li>
<li>Login as <i>admin</i> with your admin password.</li>
<li>Run <i>set-support</i> command and set temporary password for <i>support</i> user (temporary but product asks for complex password).</li>
<li>Logout (as admin).</li>
<li>Login as <i>support</i> with temporary password.</li>
<li>Enjoy your freedom.</li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaBxxIKI3TrY7IX2Q5Qj3FjtLOB2R0mXtrhVmaCXv6Hnyz-Y2NWffqfBfwJ5U-rf3TYiHM1ZCenG7Qrj-sAaRCfQWpD1ShYNHD9KIlldPKRlo6ZkCRXzAWvZ8nuakah_eu12SvSs4PMnM/s1600/CropperCapture_2013-10-18-22-53-06-2530000_%5B1%5D_HUBSON-PC.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaBxxIKI3TrY7IX2Q5Qj3FjtLOB2R0mXtrhVmaCXv6Hnyz-Y2NWffqfBfwJ5U-rf3TYiHM1ZCenG7Qrj-sAaRCfQWpD1ShYNHD9KIlldPKRlo6ZkCRXzAWvZ8nuakah_eu12SvSs4PMnM/s320/CropperCapture_2013-10-18-22-53-06-2530000_%5B1%5D_HUBSON-PC.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMJmV25P8ye4XrPwHXboqT75tVZCA0BumFGSqR0t373P8nSBHRyEruicnu5JBZHaAYDz5PxhguyoYF7SHSiD7Zc520uzeydQQgW0ZpfrmXu5oXcAXgr2m2T1STJHRQjD2Cji7orIB3IwU/s1600/CropperCapture_2013-10-18-22-54-00-5670000_%5B1%5D_HUBSON-PC.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMJmV25P8ye4XrPwHXboqT75tVZCA0BumFGSqR0t373P8nSBHRyEruicnu5JBZHaAYDz5PxhguyoYF7SHSiD7Zc520uzeydQQgW0ZpfrmXu5oXcAXgr2m2T1STJHRQjD2Cji7orIB3IwU/s320/CropperCapture_2013-10-18-22-54-00-5670000_%5B1%5D_HUBSON-PC.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdnHi-1L_WVFKR-dRqHJcgb5o5OmY4xYShhHRe-l4ewqmY74s1O8QCkAjkTYg9JHHi5GASUdBOEpY3DqE_Yek_H9mSlrtx4Y7O9Hhj7YkM-5UGud8_Nf5KNYIyGDhZaYG1IVkZB1d9sM0/s1600/CropperCapture_2013-10-18-22-54-19-5090000_%5B1%5D_HUBSON-PC.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdnHi-1L_WVFKR-dRqHJcgb5o5OmY4xYShhHRe-l4ewqmY74s1O8QCkAjkTYg9JHHi5GASUdBOEpY3DqE_Yek_H9mSlrtx4Y7O9Hhj7YkM-5UGud8_Nf5KNYIyGDhZaYG1IVkZB1d9sM0/s320/CropperCapture_2013-10-18-22-54-19-5090000_%5B1%5D_HUBSON-PC.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimb2us34pZd75nFfe-vAbqwNzp7B9xB9ZiJMqX-gB7aSSvgc-jrd_-Lmhyphenhyphen39Ho2PRqFdovKfyKm2M-UgMkiVRCPQcGiGqIH1Ny56VOb_l_14HPpFoGMI6VY8pszguprTfrTyVVdlSvXMk/s1600/CropperCapture_2013-10-18-22-54-45-9080000_%5B1%5D_HUBSON-PC.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimb2us34pZd75nFfe-vAbqwNzp7B9xB9ZiJMqX-gB7aSSvgc-jrd_-Lmhyphenhyphen39Ho2PRqFdovKfyKm2M-UgMkiVRCPQcGiGqIH1Ny56VOb_l_14HPpFoGMI6VY8pszguprTfrTyVVdlSvXMk/s320/CropperCapture_2013-10-18-22-54-45-9080000_%5B1%5D_HUBSON-PC.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0VXlQ9sJHemk9nc_sC7vMDUrErcGpe7Lgrp0au08rhEHoAi9ggWu2NcsMjfVrC_OtE7lFVNCHfoQVGaZp_-Bftp7-3hTm-wU4CNh4Ccw5Hn2tFu0DB049mFu8tpTR_YKpEs_jd5UeQjQ/s1600/CropperCapture_2013-10-18-22-55-15-9680000_%5B1%5D_HUBSON-PC.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0VXlQ9sJHemk9nc_sC7vMDUrErcGpe7Lgrp0au08rhEHoAi9ggWu2NcsMjfVrC_OtE7lFVNCHfoQVGaZp_-Bftp7-3hTm-wU4CNh4Ccw5Hn2tFu0DB049mFu8tpTR_YKpEs_jd5UeQjQ/s320/CropperCapture_2013-10-18-22-55-15-9680000_%5B1%5D_HUBSON-PC.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3qGU_jZztUAHwhZfG30_VaruEEbsm2ELx1G-yt7aRQGkm9jm0Bh5-IZS3ulTc_eF804afT1Yj-zO8wvLdXXZh7xzNXXblFu4R51yia2SppLHmusrtjo8DT0hhKNR3BhN7J8ENClKKuCM/s1600/CropperCapture_2013-10-18-22-55-39-5900000_%5B1%5D_HUBSON-PC.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3qGU_jZztUAHwhZfG30_VaruEEbsm2ELx1G-yt7aRQGkm9jm0Bh5-IZS3ulTc_eF804afT1Yj-zO8wvLdXXZh7xzNXXblFu4R51yia2SppLHmusrtjo8DT0hhKNR3BhN7J8ENClKKuCM/s320/CropperCapture_2013-10-18-22-55-39-5900000_%5B1%5D_HUBSON-PC.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaiIEe-1Ecd-Dpi6YSyXudLejqko8SWBUUf1SwBg5JGTab4rexiSmV8IsWCOE6BHWjblL2JAvHxHlfxAksI_yo44UZRe31W8zGl02KmmfMZ-xod7GTeNC3AnSgZXtzPvcVIDnSbvbTNbQ/s1600/CropperCapture_2013-10-18-22-56-02-9980000_%5B1%5D_HUBSON-PC.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaiIEe-1Ecd-Dpi6YSyXudLejqko8SWBUUf1SwBg5JGTab4rexiSmV8IsWCOE6BHWjblL2JAvHxHlfxAksI_yo44UZRe31W8zGl02KmmfMZ-xod7GTeNC3AnSgZXtzPvcVIDnSbvbTNbQ/s320/CropperCapture_2013-10-18-22-56-02-9980000_%5B1%5D_HUBSON-PC.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc4IztbNfu7VpyyjEZZioSSe8wo0xPK6_coKNDa0dPnxPYEWUDQe4lZRmFlpkbEZTTv_z3cQ3l6_GEyq1Co3RfI9kEr3_ykM3KNGA1GB26bILoDdoU78HjV06gN8-DfYc1b6_64uZliag/s1600/CropperCapture_2013-10-18-22-57-49-4720000_%5B1%5D_HUBSON-PC.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc4IztbNfu7VpyyjEZZioSSe8wo0xPK6_coKNDa0dPnxPYEWUDQe4lZRmFlpkbEZTTv_z3cQ3l6_GEyq1Co3RfI9kEr3_ykM3KNGA1GB26bILoDdoU78HjV06gN8-DfYc1b6_64uZliag/s320/CropperCapture_2013-10-18-22-57-49-4720000_%5B1%5D_HUBSON-PC.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm0PpWMzT6ku0gif_oRgaZYxYBKccsXh81fiEKNWqxLKhgAhCqskEYF8J1G2rNTowUJQzQ33wDZbYM3pV8dmfX6-T80wwFFWQ-agQR4bDg6iBhzxhVlulphyphenhyphenLYYW2DuhqLC6tq8hABqZ4/s1600/CropperCapture_2013-10-18-22-58-31-7870000_%5B1%5D_HUBSON-PC.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm0PpWMzT6ku0gif_oRgaZYxYBKccsXh81fiEKNWqxLKhgAhCqskEYF8J1G2rNTowUJQzQ33wDZbYM3pV8dmfX6-T80wwFFWQ-agQR4bDg6iBhzxhVlulphyphenhyphenLYYW2DuhqLC6tq8hABqZ4/s320/CropperCapture_2013-10-18-22-58-31-7870000_%5B1%5D_HUBSON-PC.png" width="320" /></a></div>
<div>
<br /></div>
huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com0tag:blogger.com,1999:blog-171016756649640819.post-32140963844768869722013-09-17T06:27:00.004-07:002013-09-17T06:30:11.296-07:00Restore HP system image to hardware RAID volume (LSI MegaRAID SAS 9271-4i)<h3>
When there are no native OEM Windows installation discs included..</h3>
This is the story how I succeeded with restoring HP system image to RAID Controller. HP workstation comes only with "their" system image (and restore software) on DVDs and there is no way to restore it to RAID volume directly as there is no RAID controller driver included.<br />
<br />
This is full list of hardware used in this case:<br />
<br />
<ul>
<li>HP Z420 Workstation</li>
<li>LSI MegaRAID SAS 9271-4i 6Gb/s PCIe 3.0 (native LSI, not branded by HP)</li>
<li>2x Intel 530 240GB SATA SSD disks</li>
<li>Multi-lane SAS (SFF-8087) to 4x SATA cable</li>
<li>HP restore discs with Windows 7 Pro 64-bit</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaPFs0froKsPSmXyD4e5p1tmHsEdQz0yAm3v2HTmfx5SMYOEMRTOt-HTK7YtsaKwz2E-skYAifETRDhYa5Ierq1X1aNqUIKZf18VNyBh2hanPSQ0FJwvoa7mhNQf8nO85tAKvDF_D5irA/s1600/HP_Z420_large.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="274" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaPFs0froKsPSmXyD4e5p1tmHsEdQz0yAm3v2HTmfx5SMYOEMRTOt-HTK7YtsaKwz2E-skYAifETRDhYa5Ierq1X1aNqUIKZf18VNyBh2hanPSQ0FJwvoa7mhNQf8nO85tAKvDF_D5irA/s320/HP_Z420_large.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpQAZMKX_s9wncJ4nE78o4b8pr9mQDzu-qtjC-DgSZNhdSqk3r6Y87ZuzXk0YI0oNrBb2ye9sUEEE0yY2AJ4dqNnhgaGWsSvQRSdNSTkVrDtbdEcNPIKNYnyjph8NoXce1FQHiKOSYdgk/s1600/9271-4i_image_large.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpQAZMKX_s9wncJ4nE78o4b8pr9mQDzu-qtjC-DgSZNhdSqk3r6Y87ZuzXk0YI0oNrBb2ye9sUEEE0yY2AJ4dqNnhgaGWsSvQRSdNSTkVrDtbdEcNPIKNYnyjph8NoXce1FQHiKOSYdgk/s320/9271-4i_image_large.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR6K2gu_zUG4SW1gprBABndojbZ30qYwZaNBHin7wMN256dl-KpsOE7R6D22qy2J2PDbqUi4SLIkyIeyxaPJTGmX-O3hZ4ohXspGtPVOoLycuGqar3EuStUfVaQ7OA5YYuGuw5QtfEAAo/s1600/1340628-a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR6K2gu_zUG4SW1gprBABndojbZ30qYwZaNBHin7wMN256dl-KpsOE7R6D22qy2J2PDbqUi4SLIkyIeyxaPJTGmX-O3hZ4ohXspGtPVOoLycuGqar3EuStUfVaQ7OA5YYuGuw5QtfEAAo/s320/1340628-a.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaHIetOZZrDYVIYGbxzm-bdJ3L60S1_OH3lSmLFWpZNZi6pUTFJXdux60ysNBpb-a9L40H4wqVCWKOv6socQhV37Sq2GuRKVL1WXEhrcNnDZxECcq3xLirpYcMshbuCUUov_ihBBP1Lm0/s1600/intel_530_series_240gb_ssd_contentfullwidth.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaHIetOZZrDYVIYGbxzm-bdJ3L60S1_OH3lSmLFWpZNZi6pUTFJXdux60ysNBpb-a9L40H4wqVCWKOv6socQhV37Sq2GuRKVL1WXEhrcNnDZxECcq3xLirpYcMshbuCUUov_ihBBP1Lm0/s320/intel_530_series_240gb_ssd_contentfullwidth.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUmGyplGRw1GM2a1ZiCABwS2gwkC2vBcurGNuY6PHJK64LqDTPaSXbQoH59byJjHqpQKRpi9o5ra4WeE72G-2c4p-ZACOux-qXS68c7_uK5s9FQw3UGcaZt5G7Aco_HuJsOBZAIyPNCXY/s1600/intel_530_series_240gb_ssd_contentfullwidth.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUmGyplGRw1GM2a1ZiCABwS2gwkC2vBcurGNuY6PHJK64LqDTPaSXbQoH59byJjHqpQKRpi9o5ra4WeE72G-2c4p-ZACOux-qXS68c7_uK5s9FQw3UGcaZt5G7Aco_HuJsOBZAIyPNCXY/s320/intel_530_series_240gb_ssd_contentfullwidth.jpg" width="320" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<br />
At first I've just tried to connect disks into RAID controller, create RAID1 volume (this is called "virtual disk" in LSI) and to restore system from HP DVD. Failure. PC rebooted after splash screen.<br />
<br />
After some hours..<br />
<h3>
Finally, complete solution</h3>
<br />
<ol>
<li>Plug first SSD into SATA (at mobo).</li>
<li>Restore system from HP restore discs into that SSD.</li>
<li>Download and install LSI controller driver (from LSI site).</li>
<li>Plug second SSD to RAID controller (I've used P2 connector on multi-lane cable; they were labelled P1..P4)</li>
<li>Under RAID controller BIOS: Create RAID0 volume using second SSD disk.</li>
<li>Under RAID controller BIOS: Set RAID0 volume as bootable one.</li>
<li>Clone first SSD (connected to SATA at mobo) into second SSD (connected to RAID controller).</li>
<li>Unplug first SSD and try to boot from RAID0 volume.</li>
<li>Reconnect first SSD to RAID controller (I've used P1 connector this time).</li>
<li>Change RAID level from RAID0 to RAID1 adding first SSD to the pool. (LSI need some time to regenerate RAID but it happens in background - you can even reboot).</li>
</ol>
<h3>
A word about good software</h3>
<div>
Cloning was done with Macrium Software FREE Edition (v5.2.6377). It snapshots system partition so you may clone system disk to empty one. Intel gives free edition of Acronis (called as Intel Data Migration Tool), but it does not want to clone into Intel SSD connected under RAID controller (support may help you as branded Acronis in known to have some unlock codes).</div>
huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com0tag:blogger.com,1999:blog-171016756649640819.post-52852789136644363802013-07-08T04:09:00.000-07:002013-07-08T04:09:01.823-07:00Normalize WEEKDAY behaviour [T-SQL]In T-SQL, if you want to get know if it's Friday already, you have to query like this..<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">SELECT <span style="background-color: #93c47d;">DATEPART</span>(<span style="background-color: #ffd966;">WEEKDAY</span>, GETDAY())</span><br />
<br />
And SQL Server answers with 5. Thanks GOD it's friday! But it's not..<br />
<br />
Number given by <span style="background-color: #93c47d;"><span style="font-family: Courier New, Courier, monospace;">DATEPART</span></span> is dependent to SQL connection setting called <span style="background-color: #f6b26b; font-family: Courier New, Courier, monospace;">@@DATEFIRST</span>.<br />
And default <span style="background-color: #f6b26b; font-family: Courier New, Courier, monospace;">@@DATEFIRST</span> is 7, meaning that Sunday is no. 1, Monday is no. 2... and so on..<br />
So Friday is no. 6 in fact, not 5..<br />
<br />
Check <span style="background-color: #f6b26b;"><span style="font-family: Courier New, Courier, monospace;">DATEFIRST</span></span> by <span style="background-color: #f6b26b; font-family: Courier New, Courier, monospace;">SELECT @@DATEFIRST</span>.<br />
<br />
User can trigger this setting by <span style="background-color: #f6b26b; font-family: Courier New, Courier, monospace;">SET DATEFIRST</span>. For example <span style="background-color: #f6b26b; font-family: Courier New, Courier, monospace;">SET DATEFIRST 1</span>, and now Monday is no. 1 and Friday is no. 5.<br />
<br />
Ok..<br />
<br />
So, <span style="font-family: Courier New, Courier, monospace;"><span style="background-color: #f6b26b;">DATEFIRST</span> </span>is related to SQL connection and everyone can have different settings. So how to write functions dependent on <span style="background-color: #ffd966; font-family: Courier New, Courier, monospace;">WEEKDAY</span>? Can we just <span style="background-color: #f6b26b; font-family: Courier New, Courier, monospace;">SET DATEFIRST</span> in function body on ourselves? No, we cannot.<br />
<br />
But we can normalize number returned by doing following trick:<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">SELECT (<span style="background-color: #f6b26b;">@@DATEFIRST</span> + <span style="background-color: #93c47d;">DATEPART</span>(<span style="background-color: #ffd966;">WEEKDAY</span>, GETDATE()) - 2) % 7 + 1</span><br />
<br />
Now Monday is no. 1 no matter what <span style="font-family: Courier New, Courier, monospace;"><span style="background-color: #f6b26b;">DATEFIRST</span> </span>is set to!<br />
And Friday.. Thanks T-SQL it's 5th, again!huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com0tag:blogger.com,1999:blog-171016756649640819.post-18738778265271800742013-06-28T03:41:00.000-07:002013-06-28T03:42:17.004-07:00Implement GOD MODE for blocking triggers with CONTEXT_INFO [MS SQL]Sometime you have to implement blocking trigger (for <span style="font-family: Courier New, Courier, monospace;">DELETE</span>, <span style="font-family: Courier New, Courier, monospace;">INSERT </span>or <span style="font-family: Courier New, Courier, monospace;">UPDATE</span>) saving you and your users from changing some important data in database. Blocking trigger - I mean - doing a <span style="font-family: Courier New, Courier, monospace;">ROLLBACK </span>when some rules are broken.<br />
<div>
<br /></div>
<div>
But also sometimes you have to <span style="font-family: Courier New, Courier, monospace;">DISABLE TRIGGER</span> for some maitenance tasks when you have to fix some data.</div>
<div>
<br /></div>
<div>
But disabling trigger has global effect. At this time no user is protected by entering wrong data into DB.</div>
<div>
<br /></div>
<div>
You may implement some exceptions into blocking trigger.</div>
<div>
<br /></div>
<div>
First (obvious) idea is to make an exception for user logged into SQL Server:</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">IF SUSER_SNAME() IN ('superuser1', 'DOMAIN\superuser2') RETURN</span></div>
<div>
<br /></div>
<div>
And <span style="font-family: Courier New, Courier, monospace;">RETURN</span> escapes from blocking trigger at its beginning.</div>
<div>
<br /></div>
<div>
But..</div>
<div>
If you are "superuser1" you are not protected by trigger at all. And you want to do maintenance only ad-hoc.</div>
<div>
<br /></div>
<div>
Let me introduce <span style="font-family: Courier New, Courier, monospace;">CONTEXT_INFO</span> solution.</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">CONTEXT_INFO</span> is a "key" set to current SQL connection - so it's ad-hoc setting. It gets <span style="font-family: Courier New, Courier, monospace;">VARBINARY(128)</span> as value.</div>
<div>
<a href="http://msdn.microsoft.com/en-us/library/ms180125.aspx">Read more about CONTEXT INFO at MSDN</a>.</div>
<div>
<br /></div>
<div>
Simplest example (from MSDN) is</div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace;">SET CONTEXT_INFO 0x1256698456</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">GO</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">SELECT CONTEXT_INFO()</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">GO</span></div>
</div>
<div>
<br /></div>
<div>
But who's gonna to remember 0x1256698456 as his very special "key"?</div>
<div>
<br /></div>
<div>
My way - use varchar "key" this way:</div>
<div>
<br /></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace;">DECLARE <span style="background-color: yellow;">@my_god_mode</span> VARBINARY(128) = CAST('<span style="background-color: lime;">MY_GOD_MODE</span>' AS VARBINARY(128))</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><span style="background-color: orange;">SET CONTEXT_INFO</span> <span style="background-color: yellow;">@my_god_mode</span></span></div>
</div>
<div>
<br /></div>
<div>
If you put (above) into your maintenance script and (following) into blocking trigger- you have a complete solution:</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><span style="background-color: orange;">IF CONTEXT_INFO()</span> = CAST('<span style="background-color: lime;">MY_GOD_MODE</span>' AS VARBINARY(128)) RETURN</span></div>
<div>
<br /></div>
<div>
or in more secret way.. :p</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><span style="background-color: orange;">IF CONTEXT_INFO()</span> = <span style="background-color: lime;">0x4D595F474F445F4D4F4445</span> RETURN</span></div>
<div>
<br /></div>
<div>
Last tip - conversions both ways to play:</div>
<div>
<br /></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace;">SELECT CAST('<span style="background-color: lime;">MY_GOD_MODE</span>' AS VARBINARY(128))</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">SELECT CAST(<span style="background-color: lime;">0x4D595F474F445F4D4F4445</span> AS VARCHAR)</span></div>
</div>
<div>
<br /></div>
<div>
Have a nice god modding, guys! :)</div>
huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com0tag:blogger.com,1999:blog-171016756649640819.post-89815019095438198212013-05-26T12:06:00.000-07:002013-05-26T12:06:43.399-07:00Running ASDM 5.0 for Cisco PIX 515E under Linux/UbuntuCisco ASDM (Adaptive Security Device Manager) is graphical user interface which can be found in Cisco PIX firewalls familiy. ASDM 5.0 is Java application.<br />
<br />
Oracle Java (or "Sun Java" in IT prehistory) is not a part of Ubuntu distribution and out-of-the-box installation of Firefox lacks of Java plug-in also.<br />
<br />
Additionaly, ASDM 5.0 has compatibility issues with newer JRE editions. Security exceptions are thrown onto Java Console and application refuses to open.<br />
<br />
If you have to work with older devices you may find some issues with running their management software. It's not always possible or cost effective to update the firmware (IOS and ASDM) to resolve issues that way.<br />
<br />
Here's a complete receipt to install older Java, install ASDM and run it up on Ubuntu system. I guess the receipt is not so distribution specific - so you may try it on other Linux distributions too. Some steps are also common for Windows environment - I'll cover Windows installation on next post.<br />
<h2>
Environment details</h2>
<div>
<ul>
<li>Cisco PIX 515E firewall</li>
<ul>
<li>PIX Version 7.0(4)</li>
<li>ASDM Version 5.0(4)</li>
</ul>
<li>Ubuntu 13.04 (AMD64)</li>
</ul>
<h2>
Let's do it</h2>
</div>
<h4>
Prepare working directory</h4>
<div>
Make a workspace. Let's say - create folder named "pix" under home directory.</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">mkdir ~/pix</span></div>
<div>
<br /></div>
<div>
..so you can access it by:</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">cd ~/pix</span></div>
<div>
<br /></div>
<div>
(I know it's obvious, sorry.)</div>
<div>
<br /></div>
<h4>
Get ASDM</h4>
<div>
Here is - how to get ASDM in "windows" way. Not sure if there is "linux" way (If you know it - leave a comment).</div>
<div>
<br /></div>
<div>
You may get ASDM installation by loging into PIX page. Assuming your PIX is under <span style="font-family: Courier New, Courier, monospace;">192.168.1.254</span> open URL <span style="font-family: Courier New, Courier, monospace;">https://192.168.1.254</span>. Then log into with admin password.</div>
<div>
<br /></div>
<div>
You should see a screen like that (in fact this is Windows screenshot).</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYaH_eovV6Du8Eovbdeu2l3beEwXSiT0blbywCPHiABdg5ZbfMyFgpC9bALchCKkCPfk0DBeTOKYHquBZdr2Nz2iuPXvHZdgSfIYhxejo8yNxL_5iTqglew1R6yV5AP_1ECeRkusydIJU/s1600/Zrzut+ekranu+z+2013-05-26+00:50:11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYaH_eovV6Du8Eovbdeu2l3beEwXSiT0blbywCPHiABdg5ZbfMyFgpC9bALchCKkCPfk0DBeTOKYHquBZdr2Nz2iuPXvHZdgSfIYhxejo8yNxL_5iTqglew1R6yV5AP_1ECeRkusydIJU/s1600/Zrzut+ekranu+z+2013-05-26+00:50:11.png" /></a></div>
<div>
<br /></div>
<div>
Click on "Download ASDM Launcher.." to get MSI file. MSI is of course MS Windows installation package but inside there is a Java application.</div>
<div>
<br /></div>
<div>
If you have got a problem with downloading MSI file (because this is in fact Windows example or your browser lacks of Java plug-in) you may download MSI file using windows machine and then transfer it onto linux machne OR use a "wget". Assuming your PIX is accessible under <span style="font-family: Courier New, Courier, monospace;">192.168.1.254</span> and your admin account is "admin".</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">cd ~/pix</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">wget --no-check --user=admin --ask-password https://192.168.1.254/admin/asdm50-install.msi</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<h4>
<span style="font-family: inherit;">Get Java Runtime</span></h4>
<div>
You should proceed to Oracle site (not "java.com"). As it was described at the very beginning ADSM has compatibility issues and cannot work with Java Runtime 1.7. Also Java 1.6 is not perfect.</div>
<div>
<br /></div>
<div>
I found those Java JRE editions to work with ASDM 5.0(4) properly:</div>
<div>
<ul>
<li>Java Runtime Environment 5.0 Update 22 (the latest 5.0 update)</li>
<ul>
<li><a href="http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase5-419410.html#jre-1.5.0_22-oth-JPR">http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase5-419410.html#jre-1.5.0_22-oth-JPR</a></li>
</ul>
<li>Java Runtime Environment 6.0 Update 7 (remember lucky number)</li>
<ul>
<li><a href="http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html#jre-6u7-oth-JPR">http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html#jre-6u7-oth-JPR</a></li>
</ul>
</ul>
<div>
With JRE 6.0 Update 10 ASDM starts but refuses to load configuration from PIX. With higher updates main window does not appear after login dialog.</div>
<div>
</div>
<div>
I recommend to download ".bin" linux edition. This is self-extracting binnary file which installs into current working directory and does not make any modification to the system. Why this one? First, Oracle does not publish ".deb" packets (only ".rpm"). Second, I guess you don't want to integrate old Java with system.</div>
<div>
<br /></div>
<div>
Please, download <span style="font-family: Courier New, Courier, monospace;">jre-1_5_0_22-linux-amd64.bin </span><span style="font-family: inherit;">(assuming you've got 64-bit system).</span></div>
<div>
<span style="font-family: inherit;"><br /></span></div>
<h4>
Get 7zip</h4>
<div>
We'll need to extract MSI package. It's possible with 7zip. If you have got no 7zip installed, do it so with following command:</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">sudo apt-get install p7zip-full</span></div>
<div>
<br /></div>
</div>
<h4>
Checkpoint</h4>
<div>
At this point you should have working directory called <span style="font-family: Courier New, Courier, monospace;">~/pix</span> with files inside:</div>
<div>
<ul>
<li><span style="font-family: 'Courier New', Courier, monospace;">asdm50-install.msi</span></li>
<li><span style="font-family: 'Courier New', Courier, monospace;">jre-1_5_0_22-linux-amd64.bin</span></li>
</ul>
</div>
<h4>
Extract ASDM MSI package</h4>
<div>
<span style="font-family: Courier New, Courier, monospace;">cd ~/pix</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">7z x -oasdm asdm50-install.msi *.jar</span></div>
<div>
<br /></div>
<div>
<span style="font-family: inherit;">This will extract JAR files from MSI package into </span><span style="font-family: Courier New, Courier, monospace;">asdm</span><span style="font-family: inherit;"> output subfolder.</span></div>
<div>
<span style="font-family: inherit;"><br /></span></div>
<h4>
<span style="font-family: inherit;">Extract / install JRE</span></h4>
<div>
At first bin file needs to get execute flag. Then you may run it. Accept the license and Java will extract to subfolder of working directory.</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">cd ~/pix</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">chmod a+x jre-1_5_0_22-linux-amd64.bin</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">./jre-1_5_0_22-linux-amd64.bin</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
Tip: Press "q" to skip to the end of license. Type "yes" to accept.</div>
<div>
<br /></div>
<h3>
Time to run ASDM</h3>
<h4>
How NOT to do it</h4>
<div>
Java <span style="font-family: Courier New, Courier, monospace;">-jar </span><span style="font-family: inherit;">switch won't work. You'll get "</span>Failed to load Main-Class manifest attribute" error.</div>
<div>
<br /></div>
<h4>
Fastest way</h4>
<div>
You need to export <span style="font-family: Courier New, Courier, monospace;">CLASSPATH</span> and then run java pointing a main class of ASDM.</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">cd ~/pix/asdm</span></div>
<div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace;">export
CLASSPATH=`pwd`/asdm-launcher.jar:`pwd`/jploader.jar</span></div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" style="margin-bottom: 0cm;">
You may check your CLASSPATH by:</div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace;">set | grep CLASSPATH=</span></div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" style="margin-bottom: 0cm;">
Run Java pointing a main class of ASDM</div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace;">cd ~/pix/jre1.5.0_22/bin</span></div>
<div class="western" style="margin-bottom: 0cm;">
</div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace;">./java
com.cisco.pdm.launcher.Launcher &</span></div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" style="margin-bottom: 0cm;">
Congratulations! You've got Cisco PIX ASDM working on Ubuntu.</div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWCHkpGCGYsYNP9Kpxrb8lcU8JW1DxLExqitK59kmpLp_HGJg7UggmD-12t5hknIeyyIdz1db9JXgkfX2mfI2wTO9XMIC-BH44sLmNYjbfAdA8q11DosBS_qs8n6-w1jOArE4fQ4gnBF0/s1600/Zrzut+ekranu+z+2013-05-26+00:52:53.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWCHkpGCGYsYNP9Kpxrb8lcU8JW1DxLExqitK59kmpLp_HGJg7UggmD-12t5hknIeyyIdz1db9JXgkfX2mfI2wTO9XMIC-BH44sLmNYjbfAdA8q11DosBS_qs8n6-w1jOArE4fQ4gnBF0/s1600/Zrzut+ekranu+z+2013-05-26+00:52:53.png" /></a></div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<h4>
Script way</h4>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" style="margin-bottom: 0cm;">
Create <span style="font-family: Courier New, Courier, monospace;">run-asdm.sh</span> file..</div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace;">#!/bin/sh</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace;">export CLASSPATH=$HOME/pix/asdm/asdm_launcher.jar:$HOME/pix/asdm/jploader.jar</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace;">~/pix/jre1.5.0_22/bin/java -classpath $CLASSPATH com.cisco.pdm.launcher.Launcher &</span></div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" style="margin-bottom: 0cm;">
Set execute flag on script..</div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace;">cd ~/pix</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace;">chmod a+x run-asdm.sh</span></div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" style="margin-bottom: 0cm;">
Run it..</div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace;">cd ~/pix</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace;">./run-asdm.sh</span></div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" style="margin-bottom: 0cm;">
Open Champagne! ;)</div>
</div>
huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com0tag:blogger.com,1999:blog-171016756649640819.post-28363641863954085792013-05-06T06:20:00.001-07:002013-05-06T06:24:30.517-07:00BACKUP SERVICE MASTER KEY with date in file nameA service master key is created when SQL Server instance is run for the first time. And it's regeneratred every time you change service account or its password. You should protect it with backup.<br />
<br />
Syntax for BACKUP SERVICE MASTER KEY is described here:<br />
<a href="http://msdn.microsoft.com/en-us/library/ms190337.aspx">http://msdn.microsoft.com/en-us/library/ms190337.aspx</a><br />
<br />
Important notice is <b>it does not allow to overwrite previous file</b>. So you have to delete it before executing statement or use unique file names for every day backup.<br />
<br />
This is my simple script to have BACKUP SERVICE MASTER KEY done with date in file name (so it's unique per day). It's compatible with SQL Server 2008 and above (older releases does not allow to set value while declaring variable).<br />
<br />
Feel free to use it!<br />
<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">DECLARE @tsql NVARCHAR(512)</span><br />
<span style="font-family: Courier New, Courier, monospace;">DECLARE @holder NVARCHAR(16) = '<span style="background-color: lime;">{DATE}</span>'</span><br />
<span style="font-family: Courier New, Courier, monospace;">DECLARE <span style="background-color: orange;">@path_to_file</span> NVARCHAR(256) = '<i>D:\sqlbackup\keys\service_master_key_</i><span style="background-color: lime;">{DATE}</span><i>.bak</i>'</span><br />
<span style="font-family: Courier New, Courier, monospace;">DECLARE <span style="background-color: orange;">@password</span> NVARCHAR(16) = '<i>mysecretpassword</i>'</span><br />
<span style="font-family: Courier New, Courier, monospace;">DECLARE @current_day_string NCHAR(8) = CONVERT(NCHAR(8),GETDATE(),112)</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">SET @path_to_file = REPLACE(@path_to_file, @holder, @current_day_string)</span><br />
<span style="font-family: Courier New, Courier, monospace;">SET @tsql = 'BACKUP SERVICE MASTER KEY TO FILE = '''+<span style="background-color: orange;">@path_to_file</span>+''' ENCRYPTION BY PASSWORD = '''+<span style="background-color: orange;">@password</span>+''''</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">EXECUTE sp_executesql @tsql</span>huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com0tag:blogger.com,1999:blog-171016756649640819.post-45305831509794017912013-05-06T05:12:00.001-07:002013-05-06T05:16:53.444-07:00"Could not obtain information about Windows NT group/user 'DOMAIN\user', error code 0x5" in SQL Agent<h2>
Problem:</h2>
You login into SQL Server instance using Windows Auth. You're sysadmin. You've created job in SQL Agent - you're the job owner - but you get an error every time you try to run it. You've noticed that changing owner to SQL login with SQL Server auth is workaround.<br />
<br />
<h2>
Details:</h2>
Job owner is SQL login with Windows authentication, created for windows domain user. This login is sysadmin (or has enough priviledges to run the job).<br />
<br />
You get error:<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">Unable to determine if the owner of job SYSTEM has server access (reason: Could not obtain information about Windows NT group/user 'DOMAIN\user', error code 0x5. [SQLSTATE 42000] (Error 15404)).</span><br />
<br />
<h2>
Solution:</h2>
It seems something blocks SQL Server to query Active Directory controller for DOMAIN\user details.<br />
<br />
Determine windows user who runs SQL Server instance - if you don't know it (you should!).<br />
<br />
<ol>
<li>Run Sql Server Configuration Manager.</li>
<li>Display SQL Server Services section.</li>
<li>Highlight "SQL Server (Your Instance)" and read user name from "Log On As" column.</li>
</ol>
<div>
Open Active Directory Users And Computers app, find this user, open Properties.</div>
<div>
<br /></div>
<div>
I guess that "Password never expires" was not checked. Just check it and apply. Re-run your job.</div>
<br />huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com0tag:blogger.com,1999:blog-171016756649640819.post-21531634627690557672013-04-17T14:59:00.001-07:002013-04-17T14:59:30.036-07:00Speed up paper forms processing with CODE39 barcodes and Symbol LS2208 barcode scanner<br />
It's not a discovery that barcodes make life easier. Barcodes can speed up any process that needs to have some data read from paper or package - and this is done by human. But did you know that introducing barcodes in your project could be very easy?<br />
<br />
<h3>
Scenario</h3>
Imagine following scenario. There is a process which includes printing a paper document. Then paper document comes from hands to hands. And finally comes to an operator who needs to trigger some job in computer system related to that paper form. For example: the operator needs to open window, look up for data related to paper, complete form, save it.<br />
<br />
Looking up for data could be time consuming and could be a place for human mistakes. This is the place where barcodes come in.<br />
<br />
<h3>
Where to start?</h3>
Barcodes are quite wide subject - type of codes, standards, generating, control codes, rights to use. This is not article about it. If you're totally new to barcodes, you should get know CODE39 for a beginning - the simplest one. This type of code is a very good point to start as it's very simple to understand, very simple to generate without 3rd-party libraries, recognized by every barcode reader and there are no restrictions to use it. For comparision: EAN13 that could be found on Coca Cola can it's much more complicated story.<br />
<br />
All you need to get started with CODE39 is:<br />
<br />
<ul>
<li>download CODE39 fonts (ask uncle Google for free ones)</li>
<li>get know CODE39 syntax which is very simple (please, read forward)</li>
</ul>
<br />
<h3>
Code39 syntax and generating barcodes</h3>
Generally you can code into CODE39 short alphanumeric strings. Every digit or letter has its representation in exactly one bar code (one font). First and last char in code must be asterisk (*) which means start and stop.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWdvPqJRwbyr8Gq2zdE2LSRDb2xFfqv7SaQzUF1EdB5vGIJJwwLx_HXRMm8QfYjvns1q_LhzY3PWY9Afk9nNEbtIaXMow2NE8EG4fjU0DLN6z9Mpi6LI3oxLLEjr3-Bx3szJoFQuzNCVs/s1600/code39_132456789.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="83" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWdvPqJRwbyr8Gq2zdE2LSRDb2xFfqv7SaQzUF1EdB5vGIJJwwLx_HXRMm8QfYjvns1q_LhzY3PWY9Afk9nNEbtIaXMow2NE8EG4fjU0DLN6z9Mpi6LI3oxLLEjr3-Bx3szJoFQuzNCVs/s320/code39_132456789.png" width="320" /></a></div>
<br />
<br />
So if you want to have <span style="font-family: Courier New, Courier, monospace;">123456789</span> coded into CODE39, just add asterisks to get <span style="font-family: Courier New, Courier, monospace;">*123456789*</span> and change font to CODE39 font. You may try it with WordPad or Microsoft Word. Now imagine <span style="font-family: Courier New, Courier, monospace;">123456789</span> is for example document ID or some primary key and you want to add it to Crystal Report form. It simple as to change a font (from Times New Roman to Code39). Ok, deploying fonts into set of computers is another story but you may build an MSI package a deploy it with Group Policy in Windows Server.<br />
<br />
Good source to get know CODE39 better is Wikipedia article: <a href="http://en.wikipedia.org/wiki/Code_39">http://en.wikipedia.org/wiki/Code_39</a><br />
<br />
Well, well - half of work is done. We have got barcodes with ID-s printed on paper forms. Now it time to read it and to trigger some action.<br />
<br />
<h3>
Scanning barcodes</h3>
Let me introduce Symbol LS2208. Symbol LS2208 is simple laser barcode reader. It's ready to work just after unboxing. It is very popular and it costs ca. 100 USD.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixYX8_O7EChUUyTOd7KB3P83thM6E0errcTRNXEQlNCv_4-vZiBZgK5Z5ELOHSiFB2XXxVwUckYOQYxNs9REl8L1MJz-ggzVLoPg3rTdtmqgIJ2zDxhNRYgykovd8NbtPMqMYUnsOog9E/s1600/B2B_Product_LS2208_LG_US-EN.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixYX8_O7EChUUyTOd7KB3P83thM6E0errcTRNXEQlNCv_4-vZiBZgK5Z5ELOHSiFB2XXxVwUckYOQYxNs9REl8L1MJz-ggzVLoPg3rTdtmqgIJ2zDxhNRYgykovd8NbtPMqMYUnsOog9E/s320/B2B_Product_LS2208_LG_US-EN.jpg" width="320" /></a></div>
<br />
<br />
Symbol comes as RS232 or USB connected devices. In USB version is great plug and play device as it does not require any drivers. It acts as a second keyboard. This also mean you don't need any SDK nor to recompile your software solution to have it worked with Symbol.<br />
<br />
First exercise: print some CODE39 codes from WordPad or Microsoft Word (as described earlier) onto the paper (laser reader cannot read from display). Plug Symbol into USB. Then open Notepad and scan your codes into it.<br />
<br />
You will find that barcodes read your <span style="font-family: Courier New, Courier, monospace;">123456789</span> easily in both directions (I mean you don't worry that someone scan your code upside down). You also find that asterisks (*) are omitted, so you won't need to parse them out. You will also notice that every next scan result is written down in the same line without any separation (<span style="font-family: 'Courier New', Courier, monospace;">123456789</span><span style="font-family: 'Courier New', Courier, monospace;">123456789</span><span style="font-family: 'Courier New', Courier, monospace;">123456789)</span>.<br />
<br />
<h3>
Symbol LS2208 configuration</h3>
Now it's time to tune things up. Best about Symbol is that you can reconfigure its behavior and you can also do it very easy. To do so - open printed manual (or print interesting pages to paper) and scan configuration codes with reader. If you fucked everything up - start again from defaults - just find "Set All Defaults" configuration code in manual and scan it.<br />
<br />
Great news about configuring Symbol scanner is that configuration is stored in device flash memory - and not in computer. Once configured it may be plugged into another computer and behaves as expected.<br />
<br />
What may be done with configuration codes? I suggest you to study Symbol manual by yourself to find interesting behaviors for your project. Most basic behaviors are: adding prefix and suffix to read code. For example - you want to have sent ENTER key along with your code to your app (so user don't have to touch keyboard after scanning). No problem!<br />
<br />
With configuration codes you may filter out some unwanted codes. Let's say you have different type of codes on paper form and you don't want your users to scan improper ones.<br />
<br />
Another great feature of Symbol LS2208 is continuous scan. Just place scanner in handler (included in the box) and Symbol starts to light constant red line on the table without need to pull the trigger. Just move your paper form (the barcode section) under the line. Now find in manual set of configuration codes to set some insensitivity to the same code if its scanned twice (when you move your paper back and forth). Do some practice with it to find best time of insensitivity.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR1MWFYpl0UohZ673Jvnxta0hiAAaGrXiADBY9nXAp_WKKhfoNBGQuzFkTzCrxMHMOVHkkut-WwYhVpDEKZl7Z0OCq-ezk5WP9YnopbdnZqP5Tk5rgrRiVvwF9uUAPv91P2HFU65L_TeA/s1600/ls2208instands.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR1MWFYpl0UohZ673Jvnxta0hiAAaGrXiADBY9nXAp_WKKhfoNBGQuzFkTzCrxMHMOVHkkut-WwYhVpDEKZl7Z0OCq-ezk5WP9YnopbdnZqP5Tk5rgrRiVvwF9uUAPv91P2HFU65L_TeA/s1600/ls2208instands.jpg" /></a></div>
<h3>
Additional tips and sample configuration</h3>
In this article I've shown you how to have barcodes printed and read with minimal effort. Last tips: Add CODE39 fonts to your project repository. Prepare scanner configuration as a set of control codes - start with "Set All Defaults", save it as PDF document and also add to your project repository - you will be able to configure second device in seconds.<br />
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeCVAYmdx7J54PJ9Tn_WGWG2ifKqd6jqNOKh6klRSs2HVgvur9kxxXFx9KEYQ2iOpJCMQbgXv6hFSrRz1H4QhDbpFckFid-cvinj2YQUtHdBSK1-jBnxAbQbDdx3kxvujj9J7YP-CokBI/s1600/symbol_my_configuration.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeCVAYmdx7J54PJ9Tn_WGWG2ifKqd6jqNOKh6klRSs2HVgvur9kxxXFx9KEYQ2iOpJCMQbgXv6hFSrRz1H4QhDbpFckFid-cvinj2YQUtHdBSK1-jBnxAbQbDdx3kxvujj9J7YP-CokBI/s640/symbol_my_configuration.PNG" width="243" /></a></div>
<div>
<br /></div>
huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com1tag:blogger.com,1999:blog-171016756649640819.post-55587440699229198422013-03-15T16:43:00.000-07:002013-03-15T16:52:44.284-07:00Zeroconf is your friend (real world examples incl. VMware ESXi and IBM DS3524)Subnet 192.168.1.0/24 is probably the best recognized subnet in the world. Every piece of network hardware - no matter if it's for home use or advanced one for business use - comes with 192.168.1.x as its default IP. We're are very familiar with this subnet.<br />
<br />
But sometimes, especially if there is some problems with network, your PC catches IP from some other subnet - like 169.254.x.y. What's this? Does it always mean problems? No. Let me introduce - 169.254.0.0/16 is your new friend.<br />
<br />
<b>Subnet 169.254.0.0/16</b> is:<br />
<ul>
<li>part of <a href="http://en.wikipedia.org/wiki/Zeroconf">Zeroconf </a>idea,</li>
<li>is used for <span style="font-size: 1em;">IPv4 Link-Local addressing,</span></li>
<li>is not routable,</li>
<li>is reserved by IANA,</li>
<li>is described in document <a href="http://tools.ietf.org/html/rfc3927">RFC 3927</a></li>
</ul>
<div>
The idea is simple and clever. After media is detected, network interfaces set random IP for itself from 169.254.0.0/16 subnet and it's ready to communicate with other devices within the subnet.</div>
<div>
<br /></div>
<div>
In practice, after media is detected (ethernet cable plugged or associated with WIFI access point), OS is broadcasting for new IP from any DHCP/BOOTP server, and if there is no response, after some timeout it sets new IP itself - from 169.254.0.0/16 subnet. Of course there is no broadcasting for new IP if it's set to static or you're using alternative NIC configuration feature of Windows 7 and above which sets static IP defined by your in case there is no DHCP/BOOTP nearby.<br />
<br /></div>
<div>
<h4>
Some interesting part of RFC 3927:</h4>
</div>
<div>
<pre class="newpage" style="font-size: 1em; page-break-before: always;"><span class="h3" style="display: inline; font-size: 1em; font-weight: bold; line-height: 0pt;"><h3 style="display: inline; font-size: 1em; line-height: 0pt;">
<a class="selflink" href="http://tools.ietf.org/html/rfc3927#section-2.1" name="section-2.1" style="color: black; text-decoration: none;">2.1</a>. Link-Local Address Selection</h3>
</span>
When a host wishes to configure an IPv4 Link-Local address, it
selects an address using a pseudo-random number generator with a
uniform distribution in the range from 169.254.1.0 to 169.254.254.255
inclusive.
The IPv4 prefix 169.254/16 is registered with the IANA for this
purpose. The first 256 and last 256 addresses in the 169.254/16
prefix are reserved for future use and MUST NOT be selected by a host
using this dynamic configuration mechanism.
The pseudo-random number generation algorithm MUST be chosen so that
different hosts do not generate the same sequence of numbers. If the
host has access to persistent information that is different for each
host, such as its IEEE 802 MAC address, then the pseudo-random number
generator SHOULD be seeded using a value derived from this
information.</pre>
<pre class="newpage" style="font-size: 1em; page-break-before: always;"></pre>
OK, I could have quite unique IP without DHCP - so what? Even cheapest internet router has got DHCP server built-in. Why would I want to work without DHCP? And I always can set any IP manually if there is no DHCP.<br />
<br />
At this point I want to introduce some real world examples. In both cases there is no place for DHCP - and of course - you can always set IP manually but it's always an additional effort and source of possible problems if you forget to change IP to AUTO after your job is done.<br />
<br />
<h4>
Scenario A: VMware host in co-location centre</h4>
Company has got one 1U server in co-location centre for off-site backup purposes. Centre charges the company for every 1U space and electric power. So for the cost effective installation there is no monitor, there are no additional networking hardware - only server with VMware ESXi on it.<br />
<br />
How to maintenance the machine being at co-location site if there is no display or local network infrastructure (accessible for you)? It's common that 1U servers can have two network interfaces (NIC) in standard. One can be connected with collocation LAN (the way it access Internet) and the second one may be for local access purposes.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha3pkCDNbbgJQSpBsXOg2eSBprHqDrcRgO5KqMvNqS_O3-8N9w86X9cUHLPMIMk6U00Jb36Aq6TfZCwHp5lLH8ZTzNJy_oWsUsbuPXoB5swDs1RHEf8yOuL-GVQvm31ynlqfB-SJqGRv4/s1600/notebook2server.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="189" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha3pkCDNbbgJQSpBsXOg2eSBprHqDrcRgO5KqMvNqS_O3-8N9w86X9cUHLPMIMk6U00Jb36Aq6TfZCwHp5lLH8ZTzNJy_oWsUsbuPXoB5swDs1RHEf8yOuL-GVQvm31ynlqfB-SJqGRv4/s400/notebook2server.png" width="400" /></a></div>
And a pic how ESXI networking was configured:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSaUKCXwObpEZDPLcKnJ1lHiCOeZiIokfC_0gHYJ6GXBdaFxOTotTVxkTuIYu2aWJTiHTPL_iZR7Hljqgd-NNwJmiaH_njliIvvFUmhqns_6jiTSEnDy1siLxOzgIW8_kk9p5AbZiSFZs/s1600/vm_net.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSaUKCXwObpEZDPLcKnJ1lHiCOeZiIokfC_0gHYJ6GXBdaFxOTotTVxkTuIYu2aWJTiHTPL_iZR7Hljqgd-NNwJmiaH_njliIvvFUmhqns_6jiTSEnDy1siLxOzgIW8_kk9p5AbZiSFZs/s1600/vm_net.PNG" /></a></div>
Notice: on <b>vmnic1</b> physical adapter there was management port configured in subnet 169.254.0.0/16. IP number shown (169.254.100.100) is static one (and easy to remember).<br />
<br />
How it works? Just connect notebook with server directly using crossed ethernet cable (or straight if you believe in auto-sensing). Because there is no DHCP - after timeout - OS at notebook will set up its NIC with some IP from 169.254.0.0/16 subnet - the same subnet ESXi is in. And you're ready to connect ESXi with VMware Sphere Client.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBmpIcsK0S1PU5I0dFuPgM5ClW8HDDqZhjDzTsiYgbheXNsaddy_qQDA2OdWnuqAl_Soi_5b31Bej6am5TzO-f-7UPg-_tEShMc99BT94W9uTAepb-S-3B6svpzrIHyz66UD5keEgZtDQ/s1600/vmware_login.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBmpIcsK0S1PU5I0dFuPgM5ClW8HDDqZhjDzTsiYgbheXNsaddy_qQDA2OdWnuqAl_Soi_5b31Bej6am5TzO-f-7UPg-_tEShMc99BT94W9uTAepb-S-3B6svpzrIHyz66UD5keEgZtDQ/s1600/vmware_login.PNG" /></a></div>
<br />
Pros:<br />
<ul>
<li>You can easily access your machine in co-location site with just notebook and ethernet cable.</li>
<li>You don't have to make VMware ESXi to act as DHCP server on ethernet port labeled "for management".</li>
<li>You don't have to do any effort to set IP manually on your notebook - especially when you switch between some LAN segments with and without DHCP</li>
<li>You don't have to remember to set IP to AUTO after work.</li>
</ul>
<div>
Cons:</div>
<div>
<ul>
<li>You have to wait for a timeout - OS waits for response from any DHCP first.</li>
</ul>
<div>
<br /></div>
<h4>
Scenario B: emergency access to IBM DS3524 storage system</h4>
</div>
<div>
This is also real world example. I have named system storage with its model number because this is more vendor specific solution. IBM DS3524 storage system has two redundant controllers (called Controller A and Controller B). Every controller has its cache, keeps configuration and so on - so storage system can continue work on one controller only. Both controllers have two network interfaces (so there are 4 NICs in total).</div>
<div>
<ul>
<li>Controller A Port 1</li>
<li>Controller A Port 2</li>
<li>Controller B Port 1</li>
<li>Controller B Port 2</li>
</ul>
<div>
Manual says that Port 1 and Port 2 must be in separate subnets. So it's great occasion to develop solution like that:</div>
</div>
<div>
<ul>
<li>Controller A Port 1 - IP = 192.168.1.201</li>
<li>Controller A Port 2 - IP = <b>169.254.111.111</b> (easy to remember)</li>
<li>Controller B Port 1 - IP = 192.168.1.202</li>
<li>Controller B Port 2 - IP = <b>169.254.222.222</b> (easy to remember)</li>
</ul>
</div>
<div>
You control DS3524 with software called DS Storage Manager Client. DS Storage Manager has some availability to discover controllers in LAN or define it manually. Using zeroconf idea, in case of emergency, you can plug into DS3524 directly (using crossed ethernet cable or straight if you really believe in auto-sensing) or in-directly using switch (solution may include switch with some VLANs configured). By use of switch you can make connection with both controllers at one time - which is more preferred by IBM software when both controllers are online and in a good mood (healthy state I mean ;). And again: you don't have to configure IP in your notebook manually, so you can access device more quickly. Image scenario where your DHCP server is down because it relays on system storage.</div>
<div>
<br /></div>
<div>
Some pics..</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-ZQkBURpkQ9h80UI-YEUXH6n-chJ23IPzQ3LlSrWZlRsMzYZt1NvtUPOjMxxPslalKnQ1RV_9qcJCgI6IwXJ9pNMI_3RbVV-2-uY96U2jO_7VSI-SgnB_bwcmnDAMLD3nFZH1X6AM724/s1600/notebook2ds.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="312" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-ZQkBURpkQ9h80UI-YEUXH6n-chJ23IPzQ3LlSrWZlRsMzYZt1NvtUPOjMxxPslalKnQ1RV_9qcJCgI6IwXJ9pNMI_3RbVV-2-uY96U2jO_7VSI-SgnB_bwcmnDAMLD3nFZH1X6AM724/s400/notebook2ds.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNIRL3YpQtRgHKBaOG8sZM_infyJS-Gg391e1ExEARf4Q09RToEvhJM6Od4ICvF4U-Kf3VoTnGgK2x_9dpWTlATMUirTAs2hoRWmcv2jlcq4usTI_knA1gl5Q0jD9WuJsYlCvFYJQvf4/s1600/ds_manual_discovery.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPNIRL3YpQtRgHKBaOG8sZM_infyJS-Gg391e1ExEARf4Q09RToEvhJM6Od4ICvF4U-Kf3VoTnGgK2x_9dpWTlATMUirTAs2hoRWmcv2jlcq4usTI_knA1gl5Q0jD9WuJsYlCvFYJQvf4/s1600/ds_manual_discovery.PNG" /></a></div>
<div>
Pros:<br />
<ul>
<li>You can easily access your system storage with just notebook and ethernet cable.</li>
<li>Your access do not relay on DHCP server which could relay on managed system storage.</li>
<li>Your access may not relay on any other networking devices.</li>
<li>You don't have to do any effort to set IP manually on your notebook.</li>
<li>You don't have to remember to set IP to AUTO after work.</li>
</ul>
</div>
<div>
<div>
Cons:</div>
<div>
<ul>
<li>You have to wait for a timeout - OS waits for response from any DHCP first.</li>
</ul>
</div>
</div>
</div>
huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com0tag:blogger.com,1999:blog-171016756649640819.post-28075039723277472102013-03-14T15:37:00.002-07:002013-03-14T15:43:13.530-07:00Hide Results Pane and make some space for your SQL code (SSMS 2012)Space on your screen has its value. This is productive tip for making some more space for your SQL code while building your query. After executing a query under SQL Server Management Studio (SSMS), a result pane appears and takes aprox. half of the screen. You can make it smaller by dragging the separator line down. But better idea is to just hide it.<br />
<br />
You have 3 options:<br />
<ul>
<li>Go to <b>Windows | Hide Results Pane</b></li>
<li>Use <b>CTRL+R</b> shortcut (worth to remember - as it's worth to remember <b>F5</b> shortcut is for <b>Execute</b>)</li>
<li>Use <b>Hide Results Pane</b> button just from toolbar - but.. you have to add it onto toolbar first (and spend some minutes if you don't know where to find it - continue reading..)</li>
</ul>
<div>
My favorite is the third one. So, the number one step after running SSMS in new enviroment is to add Hide Results Pane button onto toolbar. And this is the post how to do it.</div>
<div>
<br /></div>
<div>
Some pics..</div>
<div>
<br /></div>
<div>
You're starting with some new query..</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-Szup9PG8ANhZ5tDV1rWanQMXjB3W4JwdHRP7idM17GIvT2lXxH0EkE7fzJhCTpSeC9qj8LBJybMlDf_pxE3dXZODFiCKwLY4_EbhDGe8U-yraTFO7G8Ss6hbWk-Z2j1vSfxkhrtKxkE/s1600/hr2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="449" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-Szup9PG8ANhZ5tDV1rWanQMXjB3W4JwdHRP7idM17GIvT2lXxH0EkE7fzJhCTpSeC9qj8LBJybMlDf_pxE3dXZODFiCKwLY4_EbhDGe8U-yraTFO7G8Ss6hbWk-Z2j1vSfxkhrtKxkE/s640/hr2.PNG" width="640" /></a></div>
<br />
You're pressing F5 to execute and a half of screen is taken by results. No space for continuing a query..<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1CWDhqj6ARj8SUsCWaqE2JH67lOq0iANavUptsRHTxcvu22LX1nbfKqjOnmTq0IvmyhFadewTuSAMR37c3tpwP9l2ZvwDpV7GC8TCwqijy3Z_XB8VzEMs7IDI6BQGq098myeetsMS898/s1600/hr1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="449" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1CWDhqj6ARj8SUsCWaqE2JH67lOq0iANavUptsRHTxcvu22LX1nbfKqjOnmTq0IvmyhFadewTuSAMR37c3tpwP9l2ZvwDpV7GC8TCwqijy3Z_XB8VzEMs7IDI6BQGq098myeetsMS898/s640/hr1.PNG" width="640" /></a></div>
<br />
You may find <b>Hide Results Pane</b> under <b>Windows</b> menu and get rid of it.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ4BIBXV-PM31L80GAKhK5mu8PYaLGDuW3NqhyyEuQLisdc9pDu5dH8cGZLv6LH8xCvVCqYIXjG7ozwCPYbGO9EXjjm84bdyR2_VEHqb5bOHkZrWpyAy3sXMGRuShn3ZMWnO0O7JGESvc/s1600/hr0.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="450" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ4BIBXV-PM31L80GAKhK5mu8PYaLGDuW3NqhyyEuQLisdc9pDu5dH8cGZLv6LH8xCvVCqYIXjG7ozwCPYbGO9EXjjm84bdyR2_VEHqb5bOHkZrWpyAy3sXMGRuShn3ZMWnO0O7JGESvc/s640/hr0.png" width="640" /></a></div>
<br />
<br />
If you want to have <b>Hide Results Pane</b> button easy accessible you have to start with clicking left mouse button on a small down arrow at right side of choosen toolbar. Click <b>Customize </b>at the end.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilqBe_nHF1VYARPvDe9LFeR0GMZ4rRQev0NWBk2ND-Vd1pGnnQPakPCeQRC8hFhHlfN0KUE2-ALHBYaPLPJTnoJzRxL1hEJ9IshoDok6qfUJkwCw087t_y7fTxUX0ZF_B_2gLeBsXHNmE/s1600/hr3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="347" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilqBe_nHF1VYARPvDe9LFeR0GMZ4rRQev0NWBk2ND-Vd1pGnnQPakPCeQRC8hFhHlfN0KUE2-ALHBYaPLPJTnoJzRxL1hEJ9IshoDok6qfUJkwCw087t_y7fTxUX0ZF_B_2gLeBsXHNmE/s640/hr3.png" width="640" /></a></div>
<br />
On the <b>Commands</b> tab click <b>Add Command</b> button.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWX4yLBFZ9y0uMT41TqPffrBjO_FQBsLuwjfgyPHIQ6ZSrTgqVqaxCYSCWm_nwLfLpclwuXTX2fOpFThinVM_6vwuaiiTUcS-aUJ4Gg9YE6WSAGAxnjw6e7iTeBjPyiIUFRjtz_N1iMSk/s1600/hr4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="449" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWX4yLBFZ9y0uMT41TqPffrBjO_FQBsLuwjfgyPHIQ6ZSrTgqVqaxCYSCWm_nwLfLpclwuXTX2fOpFThinVM_6vwuaiiTUcS-aUJ4Gg9YE6WSAGAxnjw6e7iTeBjPyiIUFRjtz_N1iMSk/s640/hr4.png" width="640" /></a></div>
<br />
Next, select <b>Windows </b>in <b>Category</b> list (almost at the end) and then select <b>Show Results Pane</b> in <b>Commands </b>list (also almost at the end). Yes - it's <b>Show Results Pane</b> - do not look for <b>Hide Results Pane</b>.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcbmUxBQ39BDYbjUiFDtPC2ie8RS0WkQ7fGlNHCSE_o1kE9_mKt_Y0yfAJMrq6pvQfxCyiKrKgzXPVFlYIjTeqqJi92Dnz2VBd8VUDLI12ypCFTyAvySedbG6lKF0ipLuVujgTqraCtkc/s1600/hr5.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="449" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcbmUxBQ39BDYbjUiFDtPC2ie8RS0WkQ7fGlNHCSE_o1kE9_mKt_Y0yfAJMrq6pvQfxCyiKrKgzXPVFlYIjTeqqJi92Dnz2VBd8VUDLI12ypCFTyAvySedbG6lKF0ipLuVujgTqraCtkc/s640/hr5.PNG" width="640" /></a></div>
<br />
New command was added at the begining of choosen toolbar. It's good idea to move it to the end with <b>Move Down </b>button. <i>Tip: use auto-fire on your joystick ;)</i><br />
<i><br /></i>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5i5JWf_gnAiI9tSIM9bT0NpjYNeHlCIh0ibd5cL1S2HoZlsPRVGAhW3sbVoeAa8w_XwhAe8qW2ciBwuUaZ_SYRcsFVokBTsQaTLTRc8m-pVljclv2INL99uF1PJSEbeKURN6X0c2mlgw/s1600/hr7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="449" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5i5JWf_gnAiI9tSIM9bT0NpjYNeHlCIh0ibd5cL1S2HoZlsPRVGAhW3sbVoeAa8w_XwhAe8qW2ciBwuUaZ_SYRcsFVokBTsQaTLTRc8m-pVljclv2INL99uF1PJSEbeKURN6X0c2mlgw/s640/hr7.png" width="640" /></a></div>
<i><br /></i>
Ready! Congratulations! Now you can hide and show again results pane fast with only one click.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0MM5D4kU2-wp7xY2qncNTkchqv8FJaWqdUCVQ-yveHrwnhwPDwCgZLmGPWFz_vy3F1PDfjUNAt9OqvgtdQB16kYohSK7bad61g7c_NOHsOEqoTV_JJ-YxgcopHRJkc1Yyiafgs_ylKXk/s1600/hr8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="450" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0MM5D4kU2-wp7xY2qncNTkchqv8FJaWqdUCVQ-yveHrwnhwPDwCgZLmGPWFz_vy3F1PDfjUNAt9OqvgtdQB16kYohSK7bad61g7c_NOHsOEqoTV_JJ-YxgcopHRJkc1Yyiafgs_ylKXk/s640/hr8.png" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaEX9JVuBsF67EVec6-gfHHJOSJjH1nunz5oC5FCERympH3Ujk3V97KFpnNoQP6W8CRicTenBHtIbOA2epzLAk6Qy_h7OGqIY_dxMPOmTYlIQvMUY33AwnegmOWNCAixe26taUOUdYsOA/s1600/hr9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="450" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaEX9JVuBsF67EVec6-gfHHJOSJjH1nunz5oC5FCERympH3Ujk3V97KFpnNoQP6W8CRicTenBHtIbOA2epzLAk6Qy_h7OGqIY_dxMPOmTYlIQvMUY33AwnegmOWNCAixe26taUOUdYsOA/s640/hr9.png" width="640" /></a></div>
<br />huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com0tag:blogger.com,1999:blog-171016756649640819.post-46550743944247517782013-02-26T06:50:00.000-08:002013-02-26T06:50:40.002-08:00Installing VMware Tools on Debian 6.0I found that installing VMware Tools on pure Debian 6.0 installation generates some troubles.<br />
<br />
After starting VMware Tools installation you may get error: path to gcc is not valid - even you've got gcc installed already.<br />
<br />
After some tries - here is complete task list to install VMware tools.<br />
<br />
Stuff used in this installation:<br />
<br />
<ul>
<li>Pure Debian 6.0.6 AMD64 installation (from image debian-6.0.6-amd64-netinst.iso)</li>
<li>VMware ESXi 5.0.0 Build 469512 (free license)</li>
<li>VMware Tools 8.6.0 Build 425874 (included in ESXi installation)</li>
</ul>
<br />
Preparations:<br />
<br />
<ol>
<li><span style="font-family: Courier New, Courier, monospace;">apt-get update</span></li>
<li><span style="font-family: Courier New, Courier, monospace;">apt-get install linux-headers-`uname -r` make</span></li>
</ol>
<br />
VMware Tools installation:<br />
<br />
Begin with inserting installation CD<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmn5NPMldoCelZkF-sxgShiRDoNARXBCA_gfOWKb5smSSsnlzdXdpgUrkTOguj7L_yPheuLOIsldAqm-Pqxh-NVzq-JjKvrRLrTzwcvJYU8dQKRqqIaMaytePb9XSB7RHus_4YK6joBag/s1600/vmtools.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="248" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmn5NPMldoCelZkF-sxgShiRDoNARXBCA_gfOWKb5smSSsnlzdXdpgUrkTOguj7L_yPheuLOIsldAqm-Pqxh-NVzq-JjKvrRLrTzwcvJYU8dQKRqqIaMaytePb9XSB7RHus_4YK6joBag/s640/vmtools.png" width="640" /></a></div>
<br />
Then..<br />
<br />
<ol>
<li><span style="font-family: Courier New, Courier, monospace;">mount /media/cdrom</span></li>
<li><span style="font-family: Courier New, Courier, monospace;">cd /tmp</span></li>
<li><span style="font-family: Courier New, Courier, monospace;">tar -zxf /media/cdrom/VMwareTools-8.6.0-425873.tar.gz</span></li>
<li><span style="font-family: Courier New, Courier, monospace;">cd /tmp/vmware-tools-distrib</span></li>
<li><span style="font-family: Courier New, Courier, monospace;">./vmware-install.pl</span></li>
<li>Response with defaults by pressing [ENTER] to all question</li>
</ol>
<br />
Status of VMware Tools in vSphere Client will update to "Running" just after installation. No reboot required (or any service starting by you manually)!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhyrvPtCBz9dCg4D7AAiY6SHlsuKo70Gq_kyAh9ZI0zKKx5-Dyjcgu-lckC7EBZpAUJpBvqu5dDPlNSbsdScOmqz0PMoK5y5lQON8XMGsRwXw_ftyuxdbRjJLCvCq2nU3zsBuD-P9NJRQ/s1600/vmtools_works.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhyrvPtCBz9dCg4D7AAiY6SHlsuKo70Gq_kyAh9ZI0zKKx5-Dyjcgu-lckC7EBZpAUJpBvqu5dDPlNSbsdScOmqz0PMoK5y5lQON8XMGsRwXw_ftyuxdbRjJLCvCq2nU3zsBuD-P9NJRQ/s320/vmtools_works.png" width="320" /></a></div>
<br />
<br />huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com0tag:blogger.com,1999:blog-171016756649640819.post-63488267864520527162013-02-22T05:28:00.001-08:002013-02-22T05:28:53.079-08:00Watch your behaviours while restoring DB under SSMS!Today, I was just one step from making a mess.<br />
I have both of Microsoft SQL Server Management Studio installed - 2008 R2 and 2012.<br />
<br />
Notice this major difference on DB restoring dialog.<br />
<br />
Old one:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg_IG1U21QKhJDrLxF9RsEpIqnk-XiYjwJ6t93IsyaTE9IomqTpWEBsWMGx_eSPuPQY57ithY-Wpr-okAnHn-a9YmY_l1VZYjVEa1ng6-r9bx2oaCG925wSPRHdOVJ6ZSt25de0wrlt3U/s1600/ssms2008r2_2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="528" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg_IG1U21QKhJDrLxF9RsEpIqnk-XiYjwJ6t93IsyaTE9IomqTpWEBsWMGx_eSPuPQY57ithY-Wpr-okAnHn-a9YmY_l1VZYjVEa1ng6-r9bx2oaCG925wSPRHdOVJ6ZSt25de0wrlt3U/s640/ssms2008r2_2.PNG" width="640" /></a></div>
<br />
New one:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5yg1g3m_Oun4YKokaCnyO9eHJw9Z9b0tEt6sl5XRzrbXyX0i1fNkWQ1kRiAF_r69wZjBlM0tvAyctsoC1nghSQ9JC8J6rxK092EibrcwPPstHyjmSnmX2aQMXhQzT7SH5Sq4TwHecMYI/s1600/ssms2012_1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="556" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5yg1g3m_Oun4YKokaCnyO9eHJw9Z9b0tEt6sl5XRzrbXyX0i1fNkWQ1kRiAF_r69wZjBlM0tvAyctsoC1nghSQ9JC8J6rxK092EibrcwPPstHyjmSnmX2aQMXhQzT7SH5Sq4TwHecMYI/s640/ssms2012_1.PNG" width="640" /></a></div>
<br />
Source and destination fields are switched. If you're acting to fast you may loose your source DB restoring "destination" DB into it.huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com0tag:blogger.com,1999:blog-171016756649640819.post-6293766952648584242013-01-30T13:43:00.001-08:002013-01-30T13:47:07.794-08:00Windows 8 - new & missing - personal summaryProbably all about Windows 8 was already written. This article is my personal summary of features new in Windows 8, but also missing in Windows 8 (comparing to Windows 7).<br />
<br />
<h3>
What's missing (in custom order)</h3>
<br />
<ul>
<li>Menu Start (of course). Shortly - I miss it. But not as much to have 3rd party one.</li>
<li>Aero glassy windows. New plain windows are not bad, even nice, but I liked glassy ones.</li>
<li>Flip 3D. It was very practical way to find some open windows deep on the bottom at the end of business day.</li>
<li>Recovering files using Previous versions tab. Yes, we people do not need to recovery files - what a stupid MS idea. Hopefully in last years some cloud drives services appeared with recovering options. But still - you may have some (especially large files) out of cloud folder.</li>
<li>Shutdown button - yes, there is shutdown button in fact - somewhere ;)</li>
<li>XP mode. Free virtualization enviroment (with legal Windows XP) had its value. Too long.</li>
<li>Windows Media Center and DVD codec. Now you have to pay more for features which was in standard. For a while you may had free Windows Media Center license - but it was time limited offer.</li>
<li>Desktop gadgets - a big idea of tiltes in menu screen killed them - but it's not the same, titles are useless as they are only in menu screen and not on the desktop where you spend 99% of time.</li>
</ul>
<h3>
What's new (in custom order)</h3>
<div>
<ul>
<li>Tablet mode - another world, messy, stupid applets..</li>
<li>Internet Explorer in tablet mode - OK, sometimes I use it, while eating dinner, and only one hand it's free - but it's like browsing Internet sitting in a cage.</li>
<li>Ribbon in file explorer - useful sometimes..</li>
<li>Upper folder icon in file explorer - big missing feature in Windows 7 - there was ALT+upper arrow shortcut in fact.</li>
<li>Stacking file copy windows with bandwith graph - nice - but still - is "better files copying" a number-one-feature in new version of Windows? - hey, we have XXI century! </li>
<li>Welcome screen/lock screen with wallpaper, clock and weather cast - nice.</li>
<li>WIN+X shortcut with admin tools - useful, especially when you cannot go into (not existing) menu and click right on "computer".</li>
<li>Marketplace - echo, echo, echo.. oh! there is something in store.. expensive and useless..</li>
<li>"Intelligent" scaling of remote desktop screen - the one feature I really like and it's really usefull in my admin tasks.</li>
<li>New bootloader - it assumes that you'll choose Windows 8 - what's true in most cases - so it does not wait for your decision and loads Windows 8 in "background" - so it save some seconds on booting time - and loose them if you choose another system (need to shutdown Windows 8 and reboot).</li>
<li>Some "return to factory setting" tools. I have no experience with it. I do not trust.</li>
<li>Extended and colorful Task Manager. I like this new one but I don't use it to often to tell it's "must have" feature.</li>
<li>Mounting ISO as virtual drive. It's really nice to have it without 3rd party software. But also I'm used to double-click on ISO to have it burned on media - so I still make this mistake playing with ISO files.</li>
<li>Panorama wallpapers/themes (spanned on multiple monitors) - nice.</li>
<li>Hyper-V. Nice, but still - XP mode is missing.</li>
<li>PDF reader (tablet mode) - in theory you don't have to install Adobe Reader. But in practice - I hate an MS idea to open files (while in destop mode) in tablet apps.</li>
<li>Image browser (table mode) - as above - bad idea to have it as default JPG reader. Some additional clicks needed to have JPGs opened in old desktop picture app.</li>
</ul>
<h3>
</h3>
<h3>
Summary</h3>
</div>
<div>
Windows 8 - is a very cheap downgrade from Windows 7. New features would be a reason to upgrade, but you loose as many Windows 7 important features, and you'll need to face a messy hybrid tablet-desktop world.</div>
<div>
<br /></div>
<div>
I'm waiting for Windows 9 - hope it won't be the first Windows without windows (desktop mode).</div>
huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com0tag:blogger.com,1999:blog-171016756649640819.post-44955707278130397472012-12-07T06:28:00.000-08:002012-12-07T06:28:04.987-08:00End of a day with T-SQL<br />
How to get begin/end of a day with T-SQL?<br /><br /><ol>
<li><span style="font-family: 'Courier New', Courier, monospace;">SELECT </span><span style="background-color: #ffe599; font-family: 'Courier New', Courier, monospace;">GETDATE()</span><span style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"> -- current date and time [2012-12-07 15:04:34.680]</span></li>
<li><span style="font-family: 'Courier New', Courier, monospace;">SELECT </span><span style="background-color: #b6d7a8; font-family: 'Courier New', Courier, monospace;">CAST(</span><span style="background-color: #ffe599; font-family: 'Courier New', Courier, monospace;">GETDATE()</span><span style="background-color: #b6d7a8; font-family: 'Courier New', Courier, monospace;"> AS DATE)</span><span style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"> -- cropped to date part only [2012-12-07]</span></li>
<li><span style="font-family: 'Courier New', Courier, monospace;">SELECT </span><span style="background-color: #a2c4c9; font-family: 'Courier New', Courier, monospace;">CAST(</span><span style="background-color: #b6d7a8; font-family: 'Courier New', Courier, monospace;">CAST(</span><span style="background-color: #ffe599; font-family: 'Courier New', Courier, monospace;">GETDATE()</span><span style="background-color: #b6d7a8; font-family: 'Courier New', Courier, monospace;"> AS DATE)</span><span style="background-color: #a2c4c9; font-family: 'Courier New', Courier, monospace;"> AS DATETIME)</span><span style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"> -- back do DATETIME - begin of a day [2012-12-07 00:00:00.000]</span></li>
<li><span style="font-family: 'Courier New', Courier, monospace;">SELECT </span><span style="background-color: #9fc5e8; font-family: 'Courier New', Courier, monospace;">DATEADD(day,+1,</span><span style="background-color: #a2c4c9; font-family: 'Courier New', Courier, monospace;">CAST(</span><span style="background-color: #b6d7a8; font-family: 'Courier New', Courier, monospace;">CAST(</span><span style="background-color: #ffe599; font-family: 'Courier New', Courier, monospace;">GETDATE()</span><span style="background-color: #b6d7a8; font-family: 'Courier New', Courier, monospace;"> AS DATE)</span><span style="background-color: #a2c4c9; font-family: 'Courier New', Courier, monospace;"> AS DATETIME)</span><span style="background-color: #9fc5e8; font-family: 'Courier New', Courier, monospace;">)</span><span style="font-family: 'Courier New', Courier, monospace;"> </span><span style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;">-- begin of a next day [2012-12-08 00:00:00.000]</span></li>
<li><span style="font-family: 'Courier New', Courier, monospace;">SELECT </span><span style="background-color: #b4a7d6; font-family: 'Courier New', Courier, monospace;">DATEADD(ms,-3,</span><span style="background-color: #9fc5e8; font-family: 'Courier New', Courier, monospace;">DATEADD(day,+1,</span><span style="background-color: #a2c4c9; font-family: 'Courier New', Courier, monospace;">CAST(</span><span style="background-color: #b6d7a8; font-family: 'Courier New', Courier, monospace;">CAST(</span><span style="background-color: #ffe599; font-family: 'Courier New', Courier, monospace;">GETDATE()</span><span style="background-color: #b6d7a8; font-family: 'Courier New', Courier, monospace;"> AS DATE)</span><span style="background-color: #a2c4c9; font-family: 'Courier New', Courier, monospace;"> AS DATETIME)</span><span style="background-color: #9fc5e8; font-family: 'Courier New', Courier, monospace;">)</span><span style="background-color: #b4a7d6; font-family: 'Courier New', Courier, monospace;">)</span><span style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"> -- end of a day [2012-12-07 23:59:59.997] -- Accurancy of DATETIME is rounded to increments of .000, .003, or .007 seconds</span></li>
</ol>
<div>
<br />Solution above works with SQL Server 2008 and above as DATE datatype was introduced then.</div>
<div>
<br /></div>
<div>
<br /></div>
huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com0tag:blogger.com,1999:blog-171016756649640819.post-34872469660149329202012-11-27T13:03:00.000-08:002012-11-27T13:03:00.724-08:00Check your internet domain with intoDNS.com<a href="http://intodns.com/">IntoDNS.com</a> is my favorite on-line tool for checking internet domain configuration integrity. It also checks if domain passes some good practices. It's very clear in reading and gives rich descriptions of diagnosed problems.<br />
<br />
I suggest you to use <a href="http://intodns.com/">intoDNS.com</a> after any internet domain reconfiguration (especially if you edit your zone files with <a href="http://en.wikipedia.org/wiki/Vi">vi</a> ;)<br />
<br />
<div style="text-align: center;">
Go to <a href="http://intodns.com/">http://intodns.com</a></div>
<br />
Tip: Assume your domain is contoso.com (I know it's not yours :)<br />
You can query your domain with HTTP GET query like:<br />
<br />
<div style="text-align: center;">
<a href="http://intodns.com/contoso.com">http://intodns.com/contoso.com</a></div>
<div style="text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3uWEIXaiHMTm8eAfVquK73cyJQg4U2YWw8emfWcWi5My7mA1zZg8INXw54oLFPNXVeHRSPARmKsx_nmMJQ8D7EpIEtesjuQlOU6SYBKkT8RS3R0jDiR1YJMP3sACr4t4-em5LbPnr8HU/s1600/intodns_contoso.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="319" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3uWEIXaiHMTm8eAfVquK73cyJQg4U2YWw8emfWcWi5My7mA1zZg8INXw54oLFPNXVeHRSPARmKsx_nmMJQ8D7EpIEtesjuQlOU6SYBKkT8RS3R0jDiR1YJMP3sACr4t4-em5LbPnr8HU/s320/intodns_contoso.PNG" width="320" /></a></div>
<div style="text-align: center;">
<br /></div>
huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com0tag:blogger.com,1999:blog-171016756649640819.post-63017915619687543592012-11-23T03:27:00.000-08:002015-03-22T13:16:25.411-07:00Does trigger has a schema? (Microsoft SQL Server)<br />
I was wondering if triggers have (or belongs to) schemas.<br />
<br />
According to MSDN syntax for CREATE TRIGGER is:<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">CREATE TRIGGER <span style="background-color: orange;">[ schema_name . ]</span>trigger_name </span><br />
<span style="font-family: Courier New, Courier, monospace;">ON { table | view } </span><br />
<span style="font-family: Courier New, Courier, monospace;">[ WITH <dml_trigger_option> [ ,...n ] ]</span><br />
<span style="font-family: Courier New, Courier, monospace;">{ FOR | AFTER | INSTEAD OF } </span><br />
<span style="font-family: Courier New, Courier, monospace;">{ [ INSERT ] [ , ] [ UPDATE ] [ , ] [ DELETE ] } </span><br />
<span style="font-family: Courier New, Courier, monospace;">[ NOT FOR REPLICATION ] </span><br />
<span style="font-family: Courier New, Courier, monospace;">AS { sql_statement [ ; ] [ ,...n ] | EXTERNAL NAME <method specifier [ ; ] > }</span><br />
<br />
But when you expand triggers node under table node in SQL Server Management Studio (SSMS) trigger schema is not shown. Also if you query <span style="font-family: Courier New, Courier, monospace;">sys.triggers</span> view there is no <span style="font-family: Courier New, Courier, monospace;">schema_id</span> column. But when you query for your trigger name <span style="font-family: Courier New, Courier, monospace;">sys.objects</span> views there IS <span style="font-family: Courier New, Courier, monospace;">schema_id</span> column. So where is the truth?<br />
<br />
So in my lab I made a simple test. I tried to add to one table two triggers with the same name but different schemas, and it occures that:<br />
<br />
<span style="color: red; font-family: Courier New, Courier, monospace;">Msg 2103, Level 15, State 1, Procedure MyNewTrigger, Line 14 Cannot create trigger 'schema2.MyNewTrigger' because its schema is different from the schema of the target table or view.</span><br />
<br />
Conclusion: Trigger has a schema but it has to be the same schema as schema of the table. So it's some way safe to avoid giving schema names together with trigger name in scripts.huhu78http://www.blogger.com/profile/03452088153871464471noreply@blogger.com0