The idea is we use store script, we use script stored scripts are stored in the repository but not in the control file repository you have to have a catalog database if you’re going to store scripts in the repository have three in the catalog repository if you don’t have that use operating system scripts it is stored as operating system files which you’re on the shelves will always run them with shells birds I think you always ramen with shell scripts you don’t have to you can run them from say within Oracle using the scheduler in release 12 there’s a schedule ur job which is an hour-long script if so you can have the scheduler kick off the backup that seems a bit odd just this because it implies the database is backing up itself scheduling Armin jobs the change what that’s really about if you are in a big environment dozens of databases you might perhaps use your catalog database to run the scheduler and have the catalog database shall run scripts against the targets.
So you can centralize the organization the launch of your backup jobs and that’s probably why you would start doing bass but in every client, we are working with at the moment we launched the shell script the backups the shell scripts calls like Ron or the window shadow but yes you can do it through the arc through your jugular we’ll see scripts do the three-tier storage strategy to complete that because if you remember from yesterday I showed you the script to automate to migrate that transfer a backup data from the live database to the FRA will now see your scripts will do the third step of going to long-term storage all and some exports at the end if you can it’s nice to have an export but of course, that does very much depend on how big your databases they may well simply not be practical so what have you got if you remember yeah so I’ve been a little distracted today I’ve got you’re ready to travel want to let you all know that I will be exiting the session now and then.
I will not be with you tomorrow because I have a meeting in New York so once say thank you and goodbye thank you, John, and thank you students, and goodbye the best of luck to your environment and keep this in mind if you want us to help plan your migration to our men or any other planning or administration tasks give us a call we’ll be glad to help you on a consulting basis and don’t forget tomorrow Phil at your course evaluations please okay thanks very much time I really appreciate your assistance but I’m afraid the rest of you you’re going to have to put up with me alone I’ll try not to talk too much and try to give you enough time to do exercises of tea breaks okay thanks oh and thank you, John, and thanks to your fans for our thanks to winning talk to you soon okay yeah okay script the sample scripts they’re quite interesting if you install the example CD you’ll find the samples and I install them here and a lot of people will basically work from the sample scripts.
You can look at them they are just sent CD or oracle home flash installed or climb our DBMS demo and all the sample scripts are suffix CV and these are for example online scripts they’re quite old but they’re still good if you look at the no archive mode this would be the closest to what you’re doing for your backups at the moment so if we see what’s in that one, for example, case 1 Rev right this case does it you can use as the basis of developing your own backup they make a huge fuss about it but it’s really very, very simple description part works and here’s what it’s doing configure default in my sights’ disk you see that documenting is all surfing up retention policies not a very good one configuring some parallelism default location for your backups if you’re not using the FRA to their syntax there see all these % variables they’re all documented they are all documented.
I think we put some in our manual previous chapter and the others old and the documentation that there are things they’re fairly obvious for its things that set number piece number percent sees the following stamp although they give you see that you back upset number piece number a 4-byte timestamp I normally use the percent you’ve seen me using that it gives you eight characters of randomness to guarantee unique names, but that’s overriding the default location of for a good move map move I don’t like changing be also backup formats if you do change it and you ever have to restore control path water up you will have to tell our man where the auto backup is because it won’t be able to find this otherwise of course sometimes have to tell our man in your head but certainly if you do change that configure default remember what you did and then we come on to the guts of the scripts and there it is startup force.
You know what that is shot the reports’ startup normal then we don’t shut down a medias and a start-up mount right this is the way the reason they’re done this quite a few DBA’s wills do this is the fastest way to shut down with another basis if you just issue shutdown immediate and they’ve got 200 people logged on it’s going to take 10 minutes to disconnect them all whereas if you say felt up force let’s go into a bought the thing immediately restart It’s and then the shutdown immediate will happen before anybody else has logged on, so this is the quickest way to get a clean shot down or consistent shot down the bosses restart shutdown immediate sell sup Aaron and then there’s an example our backup commands in Klimt level 0 database falsetto and then open and I’m reasonably certain that the query against Vida are my outputs would work after opening but of course you’ll lose it next time we do the shot down all right.
There’s another example different syntax not backed up sense to this interesting is this if the above backup fails well depending on your release you may be able to restart the point of failure so this in effect which picks up somewhere the other one backs off next and then there are some more examples as an incremental cumulative and so on so these sample things and have a look at them it’s all good code it is actually quite a quite old code so nice effect.