Home » Infrastructure » Windows » how to take database offline from c#
how to take database offline from c# [message #250195] Mon, 09 July 2007 01:37 Go to next message
abo_mahmoud
Messages: 31
Registered: May 2006
Location: UAE
Member
how to take database offline from c# . . .
Or how take database offline by a stored procedure.
Re: how to take database offline from c# [message #250202 is a reply to message #250195] Mon, 09 July 2007 02:10 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What do you mean offline?
Shutdown it?

Regards
Michel
Re: how to take database offline from c# [message #250243 is a reply to message #250195] Mon, 09 July 2007 04:58 Go to previous messageGo to next message
sanka_yanka
Messages: 184
Registered: October 2005
Location: Kolkata
Senior Member

I think this link will help you.

http://www.codeproject.com/cs/database/oracleservicemanager.asp

Regards
Sanka
Re: how to take database offline from c# [message #250251 is a reply to message #250243] Mon, 09 July 2007 05:43 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Only if what he meant is stopping the service and so shutting down the database (maybe in kill/abort mode).

Regards
Michel
Re: how to take database offline from c# [message #250269 is a reply to message #250195] Mon, 09 July 2007 06:41 Go to previous messageGo to next message
abo_mahmoud
Messages: 31
Registered: May 2006
Location: UAE
Member
I want to shutdown/startup the database from c# .........
how could I.

Re: how to take database offline from c# [message #250309 is a reply to message #250269] Mon, 09 July 2007 10:51 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
abo_mahmoud wrote on Mon, 09 July 2007 05:41
I want to shutdown/startup the database from c# .........
how could I.




it could be possible if you are able to connect to oracle from c# as user SYS.
Re: how to take database offline from c# [message #250315 is a reply to message #250309] Mon, 09 July 2007 10:59 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Or more precisely with the option SYSDBA.
Is this possible in C#?

Regards
Michel
Re: how to take database offline from c# [message #250362 is a reply to message #250315] Mon, 09 July 2007 15:09 Go to previous messageGo to next message
abo_mahmoud
Messages: 31
Registered: May 2006
Location: UAE
Member
Michel Cadot wrote on Mon, 09 July 2007 10:59
Or more precisely with the option SYSDBA.
Is this possible in C#?

Regards
Michel



How could I (Connect as SYSDBA -there is problem in connetino string with privilege-)

and suppose I'm connected as SYSDBA ,how could I shutdown/startup the database through C#.
Re: how to take database offline from c# [message #250364 is a reply to message #250195] Mon, 09 July 2007 15:14 Go to previous messageGo to next message
abo_mahmoud
Messages: 31
Registered: May 2006
Location: UAE
Member
by the I found a way through it I can run sqlplus and pass commands to it ;
it's to create batch file contains :sqlplus system/system@oracle_home start [filename]
where [filename] is the name of the file which I can write sqlplus command within it; but I have a problem with it, did any body try this
Re: how to take database offline from c# [message #250365 is a reply to message #250362] Mon, 09 July 2007 15:15 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Search in your language (I don't know c#) or Oracle interface is there is something like "shutdown".

Regards
Michel
Re: how to take database offline from c# [message #250370 is a reply to message #250195] Mon, 09 July 2007 16:34 Go to previous messageGo to next message
abo_mahmoud
Messages: 31
Registered: May 2006
Location: UAE
Member
I found the solution. . .
first (without considering the programming language) you should create batch file contains :
sqlplus username/password @filename

then create filename(it's better to make its extension .sql)and write whatever command you want (like shutdown , startup or any sqlplus command)

but I read that is I wrote -s after sqlplus in the patch file I wouldn't see SQLPLUS (silent mode), but I still see it. any suggestion?
Re: how to take database offline from c# [message #250371 is a reply to message #250370] Mon, 09 July 2007 16:37 Go to previous message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
Nice to post solution Wink

http://orafaq.com/faqplus.htm#WHAT

[Updated on: Mon, 09 July 2007 16:40]

Report message to a moderator

Previous Topic: CMD window
Next Topic: Silent Oracle Client install
Goto Forum:
  


Current Time: Sun Dec 04 06:19:24 CST 2016

Total time taken to generate the page: 0.13159 seconds