Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 i know i know, this shouldn't be done but...

Author  Topic 

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-11-17 : 06:20:11
okay before you curse me or something, this is just a question and any type of criticisms are welcome, but most specially workarounds.

we have a problem with our production server, the keyboard and mouse (shared) stopped responding for this particular server but works with the other servers plus the remote access program doesn't work coz it's closed (whoever in techsupport did that, he's not bound to come out now). so the problem is, how do we run the tape backups and maintain the database size if worse became worst.

plan a: perform network backups and save that to a tape
- if something really happens, then we restart the server
plan b: launch the remote access program via sql job
plan c: restart the server (according to techsupport, abnormal shutdown)

both plans work but plan a is causing so much traffic that i had to explore plan b. plan b worked if the exe is invoked directly. but the problem is the only way to do this remotely is via sql job.

ok, so the job was able to start the exe file which calls the remote access exe file. problem is, though the remote program worked and is running (task manager), i can't see it on the taskbar.

can someone help me out? is there a workaround coz i don't want to just press the power button. if we shutdown, we need to shutdown properly.

--------------------
keeping it simple...

Andraax
Aged Yak Warrior

790 Posts

Posted - 2004-11-17 : 06:46:19
Depending on what user is used to launch the SQL Server service, you can do all sorts of nice stuff using xp_cmdshell.

For example:

exec xp_cmdshell 'shutdown /L'

will shutdown the server closing all applications and services in a normal mode.

You can also shut down services using:

exec xp_cmdshell 'net stop <servicename>'

However, if your user doesn't have the right permissions, it won't work.
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-11-17 : 06:50:55
quote:
Originally posted by Andraax

Depending on what user is used to launch the SQL Server service, you can do all sorts of nice stuff using xp_cmdshell.

For example:

exec xp_cmdshell 'shutdown /L'

will shutdown the server closing all applications and services in a normal mode.

You can also shut down services using:

exec xp_cmdshell 'net stop <servicename>'

However, if your user doesn't have the right permissions, it won't work.



hmmm... so basically you're telling me, if i set :exec xp_cmdshell 'shutdown /L', as a job, this will work? hmm.. don't have a spare server here. but i'll try this.

how about the exe files not being "fully loaded"? do you have any idea?

--------------------
keeping it simple...
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-11-17 : 06:54:46
quote:
Originally posted by Andraax

Depending on what user is used to launch the SQL Server service, you can do all sorts of nice stuff using xp_cmdshell.

For example:

exec xp_cmdshell 'shutdown /L'

will shutdown the server closing all applications and services in a normal mode.

You can also shut down services using:

exec xp_cmdshell 'net stop <servicename>'

However, if your user doesn't have the right permissions, it won't work.



didn't work...

--------------------
keeping it simple...
Go to Top of Page

Andraax
Aged Yak Warrior

790 Posts

Posted - 2004-11-17 : 06:55:16
Nope, I have no idea why the remote control program doesn't show up. What program is it by the way?

The 'shutdown /L' thing will work if you run it as a job, if the windows user account starting the SQL Server Agent service has local administrator priviliges. If you run it straight from the QA, it will use the windows user account starting the SQL Server service. So, if your server is "secured" by using some other account to start the services, then they might not work. But it's worth a try I think.

/Andraax
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-11-17 : 06:55:53
quote:
Originally posted by jen

[quote]Originally posted by Andraax

Depending on what user is used to launch the SQL Server service, you can do all sorts of nice stuff using xp_cmdshell.

For example:

exec xp_cmdshell 'shutdown /L'

will shutdown the server closing all applications and services in a normal mode.

You can also shut down services using:

exec xp_cmdshell 'net stop <servicename>'

However, if your user doesn't have the right permissions, it won't work.



didn't work... nothing happened...

--i forgot i have a server right beside me. lol

--------------------
keeping it simple...
Go to Top of Page

Andraax
Aged Yak Warrior

790 Posts

Posted - 2004-11-17 : 06:56:17
Can't you just connect to the servers "services" screen from computer management and close the SQL Server services, and then cold boot the server?
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-11-17 : 06:58:56
quote:
Originally posted by Andraax

Can't you just connect to the servers "services" screen from computer management and close the SQL Server services, and then cold boot the server?



the problem is, i can't connect to the console remotely, which is the reason, i posted this query.

--------------------
keeping it simple...
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-11-17 : 07:01:08
quote:
Originally posted by Andraax

Nope, I have no idea why the remote control program doesn't show up. What program is it by the way?

The 'shutdown /L' thing will work if you run it as a job, if the windows user account starting the SQL Server Agent service has local administrator priviliges. If you run it straight from the QA, it will use the windows user account starting the SQL Server service. So, if your server is "secured" by using some other account to start the services, then they might not work. But it's worth a try I think.

/Andraax



sorry but nothing happened, i created the job coz i wanted to run it in the context of the server.

--------------------
keeping it simple...
Go to Top of Page

Andraax
Aged Yak Warrior

790 Posts

Posted - 2004-11-17 : 07:03:38
I understand that... :)

But if you can get on a computer which has full network access to the server (ie no firewalls), and you can use a high privilege account (domain admin), you should be able to remote manage the server from the normal computer management screen (administrative tools/computer management). That works for me. It won't work if you have closed down some ports (like UDP 137/138) or if you have closed down the server service on the server.
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-11-17 : 07:07:59
quote:
Originally posted by Andraax

I understand that... :)

But if you can get on a computer which has full network access to the server (ie no firewalls), and you can use a high privilege account (domain admin), you should be able to remote manage the server from the normal computer management screen (administrative tools/computer management). That works for me. It won't work if you have closed down some ports (like UDP 137/138) or if you have closed down the server service on the server.



i've tried remote desktop connection (win2k3) still no such luck. we have a very tough firewall coupled with sql security. hah! this serves me right for hardening the server security!




--------------------
keeping it simple...
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-11-17 : 07:14:32
ok guys and gals, just post your ideas, i need to go into a meeting and give techsupport a good smack for what happened. This teaches me one thing, i should leave a loophole for myself, just in case something like this happens again.

--------------------
keeping it simple...
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2004-11-17 : 08:53:21
You are not reading carefully what Andraax is suggesting ! not a remote desktop connection, but opening up your Administrative Tools folder on a PC using a domain admin user account, and then opening "Computer Management" and then choosing "connect to another computer". then enter the name of the PC running the SQL service on the network. you can then browse that computer's resources and services and all that. this is NOT the same as a terminal services connection -- there is no desktop or anything. once you do this, you can administer many options remotely on the PC, including starting and stopping services.

does this make sense?

- Jeff
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2004-11-17 : 09:02:25
Have you got IIS on the server too? IIRC there is an IISRESTART which can shut the machine down - that might work from xp_cmdshell

Kristen
Go to Top of Page

Arnold Fribble
Yak-finder General

1961 Posts

Posted - 2004-11-17 : 10:58:16
Another idea: use the psshutdown command in the pstools suite by SysInternals:
http://www.sysinternals.com/ntw2k/freeware/psshutdown.shtml
Go to Top of Page

MuadDBA

628 Posts

Posted - 2004-11-17 : 12:56:39
Just hit the damn power button. SQL Server can handle sudden power outages pretty well. If you really want to ry to eb safe beforehand, use QA to conect and type SHUTDOWN WITH NOWAIT and that should stop the SQL Services before you pull the plug.
Go to Top of Page

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2004-11-17 : 14:24:03
He may be crazy but I agree with Joe, after all it works for my Network Admins ;)




steve

To alcohol ! The cause of - and solution to - all of life's problems
Go to Top of Page

Andraax
Aged Yak Warrior

790 Posts

Posted - 2004-11-17 : 15:28:14
Sure, powering down is not problem, most of the time. But I have experienced databases not being able to load after power outage.

You should at least backup before doing it if possible, if going for the power button solution.
Go to Top of Page

MuadDBA

628 Posts

Posted - 2004-11-17 : 15:45:15
Those were sissy databases!!! (just kiddin!)

I agree, do the backup of course.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2004-11-17 : 15:58:50
"He may be crazy but I agree with Joe, after all it works for my Network Admins"

Stop exagerating, they only do that when they know they have no backuyps ...

Kristen
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-11-17 : 21:09:21
quote:
Originally posted by jsmith8858

You are not reading carefully what Andraax is suggesting ! not a remote desktop connection, but opening up your Administrative Tools folder on a PC using a domain admin user account, and then opening "Computer Management" and then choosing "connect to another computer". then enter the name of the PC running the SQL service on the network. you can then browse that computer's resources and services and all that. this is NOT the same as a terminal services connection -- there is no desktop or anything. once you do this, you can administer many options remotely on the PC, including starting and stopping services.

does this make sense?

- Jeff



sorry for the late reply, yes, we already tried this but still no response, unable to connect. this is the remote access i was talking about before

--------------------
keeping it simple...
Go to Top of Page
    Next Page

- Advertisement -