Showing posts with label basic. Show all posts
Showing posts with label basic. Show all posts

Wednesday, March 28, 2012

Manage cluster resources via Visual Basic

Hello,
is it possible to manage cluster resources with a script language like
Visual Basic?
I want to update the cluster applications with an automatic
installation process. Therefore I must stop the corresponding cluster
resource (take offline), update the application and restart the
cluster resource (bring online).
Knows anyone a way to do this within a Visual Basic program?
Thanks
Widmann
Yes, it is very possible. Do I know how to do it? Heck no. I am not a
programmer in any sense. Check msdn.microsoft.com or "goggle
site:msdn.microsoft.com" cluster programming. Or something like that using
programmer speak
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering
http://msmvps.com/clustering - Blog
"Friedbert Widmann" <WidiHEL@.gmx.de> wrote in message
news:1acb6845.0411180650.2a2d88e6@.posting.google.c om...
> Hello,
> is it possible to manage cluster resources with a script language like
> Visual Basic?
> I want to update the cluster applications with an automatic
> installation process. Therefore I must stop the corresponding cluster
> resource (take offline), update the application and restart the
> cluster resource (bring online).
> Knows anyone a way to do this within a Visual Basic program?
> Thanks
> Widmann
|||This might be a good place to start:
http://msdn.microsoft.com/library/en...start_page.asp
Regards,
John
"Rodney R. Fournier [MVP]" <rod@.die.spam.die.nw-america.com> wrote in
message news:OWHUHbYzEHA.1196@.TK2MSFTNGP15.phx.gbl...
> Yes, it is very possible. Do I know how to do it? Heck no. I am not a
> programmer in any sense. Check msdn.microsoft.com or "goggle
> site:msdn.microsoft.com" cluster programming. Or something like that using
> programmer speak
> Cheers,
> Rod
> MVP - Windows Server - Clustering
> http://www.nw-america.com - Clustering
> http://msmvps.com/clustering - Blog
> "Friedbert Widmann" <WidiHEL@.gmx.de> wrote in message
> news:1acb6845.0411180650.2a2d88e6@.posting.google.c om...
>
|||The easiest way is to us the command-line tool 'Cluster.exe'. It works very
well from a script. See Windows help for details.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Friedbert Widmann" <WidiHEL@.gmx.de> wrote in message
news:1acb6845.0411180650.2a2d88e6@.posting.google.c om...
> Hello,
> is it possible to manage cluster resources with a script language like
> Visual Basic?
> I want to update the cluster applications with an automatic
> installation process. Therefore I must stop the corresponding cluster
> resource (take offline), update the application and restart the
> cluster resource (bring online).
> Knows anyone a way to do this within a Visual Basic program?
> Thanks
> Widmann
|||use WMI...but carefull
rgds
Sinisa
"Geoff N. Hiten" wrote:

> The easiest way is to us the command-line tool 'Cluster.exe'. It works very
> well from a script. See Windows help for details.
> --
> Geoff N. Hiten
> Microsoft SQL Server MVP
> Senior Database Administrator
> Careerbuilder.com
> I support the Professional Association for SQL Server
> www.sqlpass.org
> "Friedbert Widmann" <WidiHEL@.gmx.de> wrote in message
> news:1acb6845.0411180650.2a2d88e6@.posting.google.c om...
>
>

Wednesday, March 7, 2012

Maintenance Plans is SSE and Studio Management Express

Hi all,

I am using the Express versions of SQL Server and the Management console and can't seem to find anyway to set up basic maintenance plans.

Is this feature not in the Express management studio? I hope I am just missing it and it is not totally missing. I am trying to get my skills back up to speed so I can tackle some DBA jobs again and am working from home at the moment.

Can someone fill in the blanks for me to tell me if this infact is not available in the express management studio or where it is if it infact is available.

Many Thanks.

Steven

Maint Plans are not part of Express and hence not exposed in SSMS-E|||

Where can I find some scripts that allow scheduling of a backup operation?

I intend to schedule it through the Windows scheduler, as SSE has no scheduling agent.

E.

|||Hi edmund1,

Two example calls are below. They each do the same thing so you only need one of them:

osql -U sa -S .\SQLEXPRESS -Q"BACKUP DATABASE NateTest TO DISK = 'C:\NateTest.bak'" -o c:\osql_log.txt -P

osql -U sa -S .\SQLEXPRESS -Q"BACKUP DATABASE NateTest TO DISK = 'C:\NateTest.bak'" -P > c:\osql_log.txt

You can then schedule the batch script to run every so often. Basically the above called are connecting to a local SQL Server Express instance (.\SQLEXPRESS) using the "sa" account and will execute the BACKUP DATABASE command (which you can alter as appropriate). A log file (osql_log.txt) is produced and this will contain the outcome of the call plus any errors that happened etc. I have used the -P switch without a value to indicate that a NULL password is to be used for the account - if you use a SQL Server login that has a password you need to put it in after the -P switch, e.g. -P ******.

Other options for osql that you might use are:

* Windows authentication. In this case, remove the -U and -P switches and just put in a -E switch

* Passing a file that contains a list of commands to execute. In this case, remove the -Q switch and add in the -i switch with the name of the file to execute, e.g.

-i c:\query.qry

Hope that helps a bit but sorry if it doesn't
|||Good example but I strongly recomend using sqlcmd not osql as osql is going away and sqlcmd is richer.|||

Thanks both.

Yes, this helps alot. I will try to script via sqlcmd.

I am also trying to script a signle batch of all databases that have a common naming (for example, they all start with the letters "DB_"). I'll post my solution for others to see.

E.