Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Shell 

There is a way to refresh database connections on a .bat?

I have Windows Server 2008 R2 Enterpise and Standard Edition and I think im having issues with the database connection.

I found a cmd command to refresh TCP/IP, or the classic /release, /renew connection.

But this commands doesnt fix the problem. My apps still saying that there are oracle connection problems.

Somebody know if there is a command to refresh database connection?

Note: The database is of the company so i dont have the user or password.
(Jun 4, 2017 06:00 AM)Citrusll Wrote:  I have Windows Server 2008 R2 Enterpise and Standard Edition and I think im having issues with the database connection.

I found a cmd command to refresh TCP/IP, or the classic /release, /renew connection.

But this commands doesnt fix the problem. My apps still saying that there are oracle connection problems.

Somebody know if there is a command to refresh database connection?

Note: The database is of the company so i dont have the user or password.

There are a couple problems with this. First...what servers are you working with that you don't have access to the database? Typically, working with server 2008 r2 enterprise means you are being paid for this work. The concerning part of that is you stated that you just 'found a cmd command to refresh TCP/IP'.

We need more information if you want help. That said, this is most likely the wrong section for this question. Just because you found the ipconfig /release command doesn't mean your issue lies with the command prompt. This is most likely a config error in the software installed.
There's no place like ~/
My bad:

We have 4 servers:

3 with Windows Server 2008 R2 Enterpise Edition, 1 with Windows Server 2008 R2 Standard Edition.

This four servers have DSI (dclink) applications installed. This fails on monday due to connection problems with the database.

This servers use the client of JDE (Jde server) that is connected to other one "Securty Server", this allows the connection with the Database.

Database is being down on 23hs on Sunday.
Also JDE servers being down once a week... this is syncrhonized with the Securty Sever that is being down at same time.

This mean that the connection to database it will cause a Stop on DSI services after lot of fails queryng the database.

As a work arround, we are tryng to schedule and synchronize all the JDE and database reboots first... to finally reboot the DSI servers. This will refresh the connection in correct time.

But in case of this option were not able... i would like to know if there are a way to refresh connection when all the maintenances were finished. (before this one stops)

Yes (sorry for my bad english)

Regards,
You could use a script to reset the network connections, but I feel the issues are not with your network connection but rather with your authentication. Without knowing your environment, I don't know the switches in the software you're using so I can't write anything for that. I can give you a script to cycle your network connection but as I said, I doubt it will do anything useful for you.

Code
@echo off
NET FILE 1>NUL 2>NUL
if %errorlevel% == 0 goto elevated

REM build vbs to invoke UAC
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute %0, "", "", "runas", 1 >> "%temp%\getadmin.vbs"
  
ECHO **************************************
ECHO Invoking UAC for Privilege Escalation
ECHO **************************************

"%temp%\getadmin.vbs" >nul
exit /B

:elevated
    del "%temp%\getadmin.vbs" 2>nul    
    CD "%~dp0"

setlocal enabledelayedexpansion
set interface=Local Area Connection

for /f "tokens=1,2 delims=:" %%a in ('netsh interface show interface "%interface%" ^| find "Administrative"') do (
    set status=%%b&set status=!status:~1,7!
    if "!status!"=="Enabled" (
        netsh interface set interface "%interface%" DISABLED& echo Disabling
        timeout 60
        netsh interface set interface "%interface%" ENABLED& echo Enabling
    ) else netsh interface set interface "%interface%" ENABLED& echo Enabling
)
timeout 5 >nul
There's no place like ~/
Yes, i am in the same situation cause i have only access to DSI Servers, there are other teams working on the other parts, CNC, DBA, Patch Team, Windows Team,etc.

But im sure there is a bug with autentifications.
Now there are users logging without using password. This is going to scalate. My chance to see this with the other teams.

Anyway, much appreciated!
Thanks a lot for your help!

If i found something else, i will share it on the page :)


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by ClockismApr 16, 2018 11:03 AM 3 122 Apr 16, 2018 11:03 AM
Last Post: Clockism
[.NET] by AjummaFeb 18, 2018 02:57 AM 1 120 Feb 18, 2018 02:57 AM
Last Post: Vyxn
[Shell] by HackooAug 8, 2017 02:12 AM 0 194 Aug 8, 2017 02:12 AM
Last Post: Hackoo