Setting up RMAN -- Best Practice
On the readings I've done regarding RMAN, I've seen recommendations that RMAN should have a recovery catalog configured, even though that's optional. Further, I've seen recommendations that RMAN's recovery catalog should have its own database.
I've got one machine, that I want to run RMAN on, with the backups residing on that machine and disks. I then plan on archiving the backup files that RMAN produces to another set of cheaper, though less efficient, disks.
What I thought I'd do in configuring an RMAN recovery catalog is create a separate tablespace for it, and store the RMAN schema there instead of creating a separate database on the same machine.
It seems to me that unless you have an environment where you have one RMAN backing up multiple oracle instances, a separate RMAN database isn't justified.
Comments?
=== Al
hi,
What I thought I'd do in configuring an RMAN recovery
catalog is create a separate tablespace for it, and
store the RMAN schema there instead of creating a
separate database on the same machine.
However if you just create a separate tablespace and you need to recover that database you will have major problems. If you are going to use the recovery catalog option then create a separate database ideally on a separate machine.
It seems to me that unless you have an environment
where you have one RMAN backing up multiple oracle
instances, a separate RMAN database isn't justified.if you have just a couple of databases to manage then use RMAN controlfile backup.
regards
Alan
Similar Messages
-
Code Set pattern or best practice?
Hi all,
I have what I would have thought to be a common problem: the best way to model and implement an organization's code sets. I've Googled, and I've forumed - without success.
The problem domain is this: I'm redeveloping an existing application, which currently represents it's vast array of code sets using a seperate table for each set. There are currently 180+ of these tables. Not a very elegant approach at present. The majority of these code sets are what I would class as "simple" - a numeric value associated with a textual description - eg 1 = male, 2 = female, or 1 "drinks excessively", 2 "drinks sometimes" ... etc. Most of these will just be used to associate a value with a combo box selected value.
There are also what I would class as "complex" code sets, which may have 1..n attributes (ie not just a numeric and text value pair). An example of this (not overly complex) is zip code, which has a unique identifier, the zip code itself (which may change - hence the id), a locality description, and a state value.
Is there a "best practice" approach or pattern which outlines the most efficient way of implementing such code sets? I need to consider performance vs the ability to update the code set values, as some of them may change from time to time without notice at the discretion of government departments.
I had considered hard coding, creating classes to represent each one, holding them in xml files, storing in the database etc, but it would seem that making the structure generic enough to cater to varying numbers of attributes and their associated datatypes will be at the cost of performance.
Any suggestions would be greatly appreciated.
Thanks.
Paul C.Hi Saish,
Thanks for your response. Yes, this approach is what
I had considered - I'll be using Hibernate so these
values will be cached etc.
I guess my main concern is reducing the huge number
of very small tables in use. I was thinking about
this some more, and for the simple tables was
thinking of 2 tables: 1 (eg "CODE_SET") to describe
the code set (or ref table etc) in question, the
second to hold the values. This way 80 odd tables
would be reduced to 2. Not sure what's best here -
simpler ER diagram or more performance!Tables...
Enumeration
- EnumerationId
- EnumerationName
- EnumerationAbbreviation
EnumerationValues
- EnumerationId
- ValueIndex
- ValueName
- ValueAbbreviation
The above allows the names to change.
You can add a delete flag if values might be deleted but old records need to be maintianed.
Convention: In the above I specifically name the second table with a plural because it holds a collection of sets (plural) rather than a single set.
In the first table the id is the key. In the second the id and the index are the key. The ids are unique (of course). The enumeration name should be unique in the first table. In the second table the EnumerationId and value name should be unique.
Conversely you might choose to base uniqueness on the abbreviation rather than the name.
The Name vs Abbreviation are used for reporting/display purposes (long name versus short name).
It is likely that for display/report purposes you will have to deal with each of the sets uniquely rather than a group. Ideally (strongly urged) you should create something that autogenerates a java enumeration (specific with 1.5 or general with 1.4) that uses the id values and perhaps the indexes as the values and the names are generated from the abbreviations. This should also generate the database load table for the values. Obviously going forward care must be taken in how this is modified. -
EWM - set up Slotting / best practice guide
Hi EWM-experts,
who is aware of any best practice guide on how to set up and customize slotting for SAP EWM?
I'm just preparing a conference room pilot for EWM. Following SAP's [integration guide|http://help.sap.com/SCENARIOS_BUS2007/helpdata/EN/45/196435011c0064e10000000a1553f7/frameset.htm], the in- and outbound processes work fine now but I cannot find any documentation about how to customize slotting apart from the insufficient information on the EWM [help.sap.com pages|http://help.sap.com/saphelp_scm50/helpdata/en/5f/c69040bca2ef4ae10000000a1550b0/frameset.htm].
Thanks in advance and best regards,
MartinHi Martin,
If you contact me via email (it's on my forum profile) I will put you in touch with one of our EWM consultants. - we can update this thread if they have anything appropriate.
Thanks James -
Hi RMAN guys,
i´m thinking about the BEST strategy to make a full rman backup WITHOUT the catalog.
I would like anybody to comment my experiences:
1. I had a recovery case (but it´s more then 10 months ago, and i´m not remembering anything in detail, sorry) where i lost nearly anything.
In this case i needed the DB-ID for recovery, so i think it´s good know, what db-id you have
=>SELECT dbid,name FROM v$database;
2. RMAN needs the database to be at least in nomount, so you should have a spfile copy outside of your rman backup
=> sql "CREATE PFILE=''c:\bak\init.ora'' FROM spfile";
3. A Checkpoint at the beginning of your Backup is always good
=> sql "Alter system checkpoint";
or would say let´s make a log-switch?
=> sql "alter system switch logfile";
4. If you loose everything INCLUDING all Controlfile Copies, you should know which datafiles/controlfile/redologs you had:
=>
SELECT file_name,tablespace_name FROM dba_data_files;
SELECT member FROM v$logfile;
SELECT name FROM v$controlfile;
Than you could use the dbms_backup_restore.restoreDataFileTo Package-Procedure
5. Make a full backup of the database;
But what special parameters are important?
+ MAXCORRUPT?
+ FORMAT '....' or Default?
+ PLUS ARCHIVELOG DELETE INPUT ?
+???
5a. Make also copy of:
Listener.ora, tnsnames.ora, sqlnet.ora
pwd<sid>.ora
Windows: Registry of Oracle-Tree
UNIX: oratab
+???
6. Validate the backup
7. DELETE OBSOLETE Backups;
8. Send yourself an email with the rman-log
utl_mail ....
9.x -Y.x ???
Any Comments ?
Thanks
Marco1. OK
2. OK: spfile or pfile
3. Ok but not mandatory: Re: alter system checkpoint necessary?
4. OK. Or use the CATALOG command to 'register' them in the control file.
5. All parameters can be important. I will suggest to note the FORMAT ... so that you know where the backups are. With the following script you backup all possible ;-)
RMAN> run {
allocate channel ch1 type disk format '/db/ARON/BACKUP/RMAN/backup_%d_%t_%s_%p_%U.bck';
allocate channel ch2 type disk format '/db/ARON/BACKUP/RMAN/backup_%d_%t_%s_%p_%U.bck';
backup
incremental level 0
database
plus archivelog delete input;
backup current controlfile;
backup spfile;
release channel ch1;
release channel ch2;
}5a. That is always good. Don't forget ORACLE_HOME.
6. Always good.
7. To save space that is good.
Bye, Aron -
Setting up Users - Best Practices
03/28/2007 11:53:42 AM
Reply | Quote | Top | Bottom
Hi there. We are a large organization with a website
consisting of over 40,000 pages. We have multiple users who need
access to various parts of the website. We have discovered
different methods of setting them up in Contribute but wonder if
one method is better than the others.
1. Create a separate new connection for each portion of the
site. This, unfortunately, makes it impossible to share CSS layout
files, images, and library items at the root of the website.
2. Create a single connection to the server and create
mutliple roles - most likely named by the user's name - that limits
directory access. Worried this might create an unwieldly list of
users. This opens up shared assets, though, which will help with
maintaining site standards.
We also tried creating a single connection to the server and
creating new roles - named according to which directory was being
given access to - but quickly discovered that a user can only be
assigned to one role.
Has anyone else run across this?
Thanks.Well, I definitely think that if you're going to maintain any
level of sanity to your web file organization, you'll have to set
up roles according to logical groupings and then assign folks to
those roles. I would not mess with creating a variety of
connections because that could easily turn into an authentication
nightmare. Stick to one encrypted connection.
The nature of your business organization should dictate how
those role groups are created, for example a role for HR, Finance
or Sales with a corresponding folder on the site. But it might be
possible to do the opposite and create roles based on how your
website is organized. For example, you might have a "Sales" section
on your web site that folks from different departments need to have
edit access to, and another section on your site that deals with
"Administration" that may necessitate adding folks from, again,
different departments within the organization. This is a bit
opposite of the normal routine of setting up role groups based on
the groups that already exist in the organization (HR, Finance,
Sales, etc.).
For us, it was fairly easy to create the groups because we're
a school system and the site is organized by school sites.
It would be great if folks could be assigned to multiple
roles, but it could get messy with the "cascading" of permissions
(i.e. permissions in this role but NOT in that role, however the
second role is a sub-group of role one....see what I mean?).
In the end, you may just need to graph out the type of
organization you need in order to meet the needs of the site and/or
organization. Then replicate that in how you set up roles in CPS.
Hope this helps! -
OWB - Set-Up Recommendations/Best Practices
OWB Version 10.2.0.2.0/8
What is the recommended configuration, in terms of projects, locations, control centers and configurations, when you have numerous development and test environments (approx. 25)
The configuration should be flexible enough to allow you to easily branch the code base and also be controlled so that the merging of branches can easily be pushed to all projects in order to keep a consistent view across each project.
Any thoughts on this would be greatly appreciated.I'm sorry I don't have any answers for you but I heartily support your request and hope you get some responses.
I would like to add that I have tried to get my arms around the 10gR2 version in terms of how the different repositories interact with the users/servers/instances/etc. Sort of a Concepts Manual like there is for the database.
It's nice to know the product has all these neat features (they sound neat anyway) but they are relatively useless if we don't know how to best use them in our system architectural designs.
I have tried to wade through the Users Guide but that reads like a Reference not a How To.
I wish you luck for all of us.
Where are the Product Managers when we really need them?
-gary -
New whitepaper: Oracle9iAS Best Practices
Check out the newly published whitepaper on Oracle9iAS Release 2 best practices:
http://otn.oracle.com/products/ias/ohs/collateral/r2/bp-core-v2.PDF
Ashesh Parekh
Oracle9iAS Product ManagementCarl,
There is really no set number or best practice for the number of segments. It is driven by the needs of your organization based upon reporting requirement, collective bargaining agreements, the degree of organizational change occurring within the enterprise, etc. I do believe that "less" segments usually makes more sense from a maintenance and ease of use perspective. Jobs are available across the Business Group, unlike positions, which are subordinate and specific to jobs and organizations...so you'll be maintaining less of them (hopefully).
Regards,
Greg -
Best practices for setting up users on a small office network?
Hello,
I am setting up a small office and am wondering what the best practices/steps are to setup/manage the admin, user logins and sharing privileges for the below setup:
Users: 5 users on new iMacs (x3) and upgraded G4s (x2)
Video Editing Suite: Want to connect a new iMac and a Mac Pro, on an open login (multiple users)
All machines are to be able to connect to the network, peripherals and external hard drive. Also, I would like to setup drop boxes as well to easily share files between the computers (I was thinking of using the external harddrive for this).
Thank you,Hi,
Thanks for your posting.
When you install AD DS in the hub or staging site, disconnect the installed domain controller, and then ship the computer to the remote site, you are disconnecting a viable domain controller from the replication topology.
For more and detail information, please refer to:
Best Practices for Adding Domain Controllers in Remote Sites
http://technet.microsoft.com/en-us/library/cc794962(v=ws.10).aspx
Regards.
Vivian Wang -
Networking "best practice" for setting up a farm
Hi all.
We would like to set an OracleVM farm, and I have a question about "best practice" for
configuring the network. Some background:
- The hardware I have is comprised of machines with 4 gig-eth NICs each.
- The storage will be coming primarily from a backend NAS appliance (Netapp, FWIW).
- We have already allocated a separate VLAN for management.
- We would like to have HA capable VMs using OCFS2 (on top of NFS.)
I'm trying to decide between 2 possible configurations. The first would keep physical separation
between the mgt/storage networks and the DomU networks. The second would just trunk
everything together across all 4 NICs, something like:
Config 1:
- eth0 - management/cluster-interconnect
- eth1 - storage
- eth2/eth3 => bond0 - 8021q trunked, bonded interfaces for DomUs
Config 2:
- eth0/1/2/3 => bond0
Do people have experience or recommendation about the best configuration?
I'm attracted to the first option (perhaps naively) because CI/storage would benefit
from dedicated bandwidth and this configuration might also be more secure.
Regards,
Robert.user1070509 wrote:
Option #4 (802.3ad) looks promising, but I don't know if this can be made to work across
separate switches.It can, if your switches support cross-switch trunking. Essentially, 802.3ad (also known as LACP or EtherChannel on Cisco devices) requires your switch to be properly configured to allow trunking across the interfaces used for the bond. I know that the high-end Cisco and Juniper switches do support LACP across multiple switches. In the Cisco world, this is called MEC (Multichassis EtherChannel).
If you're using low-end commodity-grade gear, you'll probably need to use active/passive bonds if you want to span switches. Alternatively, you could use one of the balance algorithms for some bandwitch increase. You'd have to run your own testing to determine which algorithm is best suited for your workload.
The Linux Foundation's Net:Bonding article has some great information on bonding in general, particularly on the various bonding methods for high availability:
http://www.linuxfoundation.org/en/Net:Bonding -
Could you please share your best practices for setting up a new Windows Server 2012 r2 Hyper-V Virtualized AD DC, that will be running on a new WinSrv 2012 r2 host server. (This
will be for a brand new network setup, new forest, domain, etc.)
Specifically, your best practices regarding:
the sizing of non virtual and virtual volumes/partitions/drives,
the use of sysvol, logs, & data volumes/drives on hosts & guests,
RAID levels for the host and the guest(s),
IDE vs SCSI and drivers both non virtual and virtual and the booting there of,
disk caching settings on both host and guests.
Thanks so much for any information you can share.A bit of non essential additional info:
We are small to midrange school district who, after close to 20 years on Novell networks, have decided to design and create a new Microsoft network and migrate all of our data and services
over to the new infrastructure . We are planning on rolling out 2012 r2 servers with as much Hyper-v virtualization as possible.
During the last few weeks we have been able to find most of the information we need to undergo this project, and most of the information was pretty solid with little ambiguity, except for
information regarding virtualizing the DCs, which as been a bit inconsistent.
Yes, we have read all the documents that most of these posts tend point to, but found some, if not most are still are referring to performing this under Srvr 2008 r2, and haven’t really
seen all that much on Srvr2012 r2.
We have read these and others:
Introduction to Active Directory Domain Services (AD DS) Virtualization (Level 100),
Virtualized Domain Controller Technical Reference (Level 300),
Virtualized Domain Controller Cloning Test Guidance for Application Vendors,
Support for using Hyper-V Replica for virtualized domain controllers.
Again, thanks for any information, best practices, cookie cutter or otherwise that you can share.
Chas. -
Best practices for setting up projects
We recently adopted using Captivate for our WBT modules.
As a former Flash and Director user, I can say it’s
fast and does some great things. Doesn’t play so nice with
others on different occasions, but I’m learning. This forum
has been a great source for search and read on specific topics.
I’m trying to understand best practices for using this
product. We’ve had some problems with file size and
incorporating audio and video into our projects. Fortunately, the
forum has helped a lot with that. What I haven’t found a lot
of information on is good or better ways to set up individual
files, use multiple files and publish projects. We’ve decided
to go the route of putting standalones on our Intranet. My gut says
yuck, but for our situation I have yet to find a better way.
My question for discussion, then is: what are some best
practices for setting up individual files, using multiple files and
publishing projects? Any references or input on this would be
appreciated.Hi,
Here are some of my suggestions:
1) Set up a style guide for all your standard slides. Eg.
Title slide, Index slide, chapter slide, end slide, screen capture,
non-screen capture, quizzes etc. This makes life a lot easier.
2) Create your own buttons and captions. The standard ones
are pretty ordinary, and it's hard to get a slick looking style
happening with the standard captions. They are pretty easy to
create (search for add print button to learn how to create
buttons). There should instructions on how to customise captions
somewhere on this forum. Customising means that you can also use
words, symbols, colours unique to your organisation.
3) Google elearning providers. Most use captivate and will
allow you to open samples or temporarily view selected modules.
This will give you great insight on what not to do and some good
ideas on what works well.
4) Timings: Using the above research, I got others to
complete the sample modules to get a feel for timings. The results
were clear, 10 mins good, 15 mins okay, 20 mins kind of okay, 30
mins bad, bad, bad. It's truly better to have a learner complete
2-3 short modules in 30 mins than one big monster. The other
benefit is that shorter files equal smaller size.
5) Narration: It's best to narrate each slide individually
(particularly for screen capture slides). You are more likely to
get it right on the first take, it's easier to edit and you don't
have to re-record the whole thing if you need to update it in
future. To get a slicker effect, use at least two voices: one male,
one female and use slightly different accents.
6) Screen capture slides: If you are recording filling out
long window based databse pages where the compulsory fields are
marked (eg. with a red asterisk) - you don't need to show how to
fill out every field. It's much easier for the learner (and you) to
show how to fill out the first few fields, then fade the screen
capture out, fade the end of the form in with the instructions on
what to do next. This will reduce your file size. In one of my
forms, this meant the removal of about 18 slides!
7) Auto captions: they are verbose (eg. 'Click on Print
Button' instead of 'Click Print'; 'Select the Print Preview item'
instead of 'Select Print Preview'). You have to edit them.
8) PC training syntax: Buttons and hyperlinks should normally
be 'click'; selections from drop down boxes or file lists are
normally 'select': Captivate sometimes mixes them up. Instructions
should always be written in the correct order: eg. Good: Click
'File', Select 'Print Preview'; Bad: Select 'Print Preview' from
the 'File Menu'. Button names, hyperlinks, selections are normally
written in bold
9) Instruction syntax: should always be written in an active
voice: eg. 'Click Options to open the printer menu' instead of
'When the Options button is clicked on, the printer menu will open'
10) Break all modules into chapters. Frame each chapter with
a chapter slide. It's also a good idea to show the Index page
before each chapter slide with a progress indicator (I use an
animated arrow to flash next to the name of the next chapter), I
use a start button rather a 'next' button for the start of each
chapter. You should always have a module overview with the purpose
of the course and a summary slide which states what was covered and
they have complete the module.
11) Put a transparent click button somewhere on each slide.
Set the properties of the click box to take the learner back to the
start of the current chapter by pressing F2. This allows them to
jump back to the start of their chapter at any time. You can also
do a similar thing on the index pages which jumps them to another
chapter.
12) Recording video capture: best to do it at normal speed
and be concious of where your mouse is. Minimise your clicks. Most
people (until they start working with captivate) are sloppy with
their mouse and you end up with lots of unnecessarily slides that
you have to delete out. The speed will default to how you recorded
it and this will reduce the amount of time you spend on changing
timings.
13) Captions: My rule of thumb is minimum of 4 seconds - and
longer depending on the amount of words. Eg. Click 'Print Preview'
is 4 seconds, a paragraph is longer. If you creating knowledge
based modules, make the timing long (eg. 2-3 minutes) and put in a
next button so that the learner can click when they are ready.
Also, narration means the slides will normally be slightly longer.
14) Be creative: Capitvate is desk bound. There are some
learners that just don't respond no matter how interactive
Captivate can be. Incorporate non-captivate and desk free
activities. Eg. As part of our OHS module, there is an activity
where the learner has to print off the floor plan, and then wander
around the floor marking on th emap key items such as: fire exits;
first aid kit, broom and mop cupboard, stationary cupboard, etc.
Good luck! -
Best practiceS for setting up Macs on Network
Greetings.
We have six Macs on our Windows Server network; three iMacs and three laptops. We have set up all the machines and they are joined to the Active Directory. In the past, we have always created local users on the machines and then "browsed" to the server shares and mounted the them. We've learned things have improved/changed over the years and we're just now realizing we can probably have the machines set up to work better. So, I have a couple of questions for "best practices" when setting up each of the machines.
1. Since we’re in a network environment, should we not set up “local logins/users” and instead have users login using their AD login? It seems having a local account creates some conflicts with the server since upgrading to lion.
2. Should we set the computer to not ask for a “list of users” and instead ask for a username and password for logins?
3. For the user that uses the machine most often, they can still customize their desktop when they use an AD login, correct?
4. Should we set up Mobile User Accounts? What exactly does this do?
Any other advice on how we should best be setting up the clients for our environment to make sure we are following best practices would be great!
Thanks for any help!
JayGreetings.
We have six Macs on our Windows Server network; three iMacs and three laptops. We have set up all the machines and they are joined to the Active Directory. In the past, we have always created local users on the machines and then "browsed" to the server shares and mounted the them. We've learned things have improved/changed over the years and we're just now realizing we can probably have the machines set up to work better. So, I have a couple of questions for "best practices" when setting up each of the machines.
1. Since we’re in a network environment, should we not set up “local logins/users” and instead have users login using their AD login? It seems having a local account creates some conflicts with the server since upgrading to lion.
2. Should we set the computer to not ask for a “list of users” and instead ask for a username and password for logins?
3. For the user that uses the machine most often, they can still customize their desktop when they use an AD login, correct?
4. Should we set up Mobile User Accounts? What exactly does this do?
Any other advice on how we should best be setting up the clients for our environment to make sure we are following best practices would be great!
Thanks for any help!
Jay -
Best Practice setting up NICs for Hyper V 2008 r2
I am looking at some suggestions for best practice for setting up a hyper V 2008 r2 at a remote location with 5 nics, one for managment vlan and other 4 on the data vlan. This server will host 2 virtual machines, one is a DC and the other
is a member local DHCP server. The server is setup now with one nic on the management Vlan and the other nic's set to get there ip from the local dhcp server on on the host. We have the virtual networks setup in Hyper V to
point to each of the nics using the "external connection". The virtual servers 'DHCP and AD" have there own ip set within them. Issues we are seeing, when the site looses external connections for a while they cannot get ip
addresses from the local dhcp server anymore.
1. NIC on management Vlan -- IP Static -- Physical host
2. NIC on the Data network Vlan -- DHCP linked as a connection "external" in Hyper V -- virtual server DHCP
3. NIC on the Data network Vlan -- DHCP linked as a connection "external" in Hyper V -- Virtual server domain controller
4. NIC on the Data network Vlan -- DHCP linked as a connection "external" in Hyper V -- extra
5. NIC on the Data network Vlan -- DHCP linked as a connection "external" in Hyper V -- extra
Thanks in advanceLooks like you may be over complicating things here. More and more of the recommendations from Microsoft at this point would be to create a Logical Switch and then layer on Logical Networks for your management layers, but here is what I would do for
you simple remote office.
Management NIC: Looks good (Teaming would be better, but only if you had 2 different switching to protect against link failures at the switch level. Doesn't seem relevant in this case however.
NIC for Data Network VLAN: I would use one NIC in your case if you can have the ability to Trunk multiple VLANs at the switch level to the NIC. That way you are setting the VLAN on the VMs NIC that you want to access and your
Virtual Switch configuration is very simple. On this virtual switch however, I would uncheck IPv4 and IPv6. There is no need to give this NIC an address as you are just passing traffic through them from the VMs that are marked with VLAN tags. Again,
if you have multiple physical switches in the building teaming could be an option, but probably adds more complexity than is necessary for a small office.
Even if you keep your Virtual Switches linked to separate NICs unchecking IPv4 and IPv6 makes sense.
Disable all the other NICs
Beyond that, check your routing. Can you ping between all hosts when there is not interruption? What DHCP server are they getting there addresses on normally? Where are your name resolution servers (DNS, WINS)?
No silver bullet here, but maybe a step in the right direction.
Rob McShinsky (VirtuallyAware.com)
VirtuallyAware - Experiences in a Virtual World (Microsoft MVP - Virtual Machine) -
What is the best practice for setting up warehouse inventory for oil & gas tank farm
Hi, i want to know the best practice for setting up warehouse inventory for oil & gas tank farm. SAP has these levels for inventory management in warehouse environment: warehouse-aisle-shelf-bin. To me the bin seems to be the central location for inventory. So do i set up each oil tank as a bin location?
Hi,
Please refer below link:
https://help.sap.com/saphelp_sbo900/helpdata/EN/ad/4f233a7b864c7cbe2b57ad09246adb/content.htm
SAP Business One 9.0 Training - Feb 6, 2013 - Warehouse Bins - YouTube
Thanks & Regards,
Nagarajan -
Best practice for setting or detecting screen size?
Hi All,
Trying to determine a best practice for setting or detecting the screen size. For playbook and iOS, I can set them. But for Android, the number of devices is too large so I'd rather detect. My first choice is to use the stage.stageHeight and stage.stageWidth. This works fine if I set my stage properties with standard meta data:
[SWF(height="320", width="480", frameRate="64", backgroundColor="#010101")]
However, if I use the application descriptor file to set the stage dimentions (as suggested by Christian Cantrell here http://www.adobe.com/devnet/flash/articles/authoring_for_multiple_screen_sizes.html)
<initialWindow>
<aspectRatio>landscape</aspectRatio>
<autoOrients>false</autoOrients>
<width>320</width>
<height>480</height>
<fullScreen>true</fullScreen>
</initialWindow>
Then the stage.stageHeight and stage.stageWidth are not the correct numbers when my main class is added to the stage. Sometime after the main class is added to the stage, then those numbers are fine. Is there an event I can wait for to know that the stage.stageHeight and stage.stageWidth are correct?
Thanks in advance!Hi Lee,
Thanks for the quick response! However, for some reason the heightPercent & widthPercent metadata tags are not working as expected for me.
I have a wrapper class that I target for compiling, WagErgApplePhone.as where I've got my metadata
[SWF(heightPercent="100%", widthPercent="100%", frameRate="64", backgroundColor="#010101")]
sets some stage properties
stage.quality=StageQuality.LOW;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
and instantiates my main class
var main:Main = new Main();
addChild(main);
my main class constructor even waits for the stage
public function Main(){
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
in my init function, stage.stageHeight traces out as 375 (expecting 320).
i have a function which is called via a button press event by the user, and stage.stageHeight traces out correctly (320) there. that's what makes me think that if i wait long enough, i can get the correct stageHeight before init/drawing. but i'm not sure what event to listen for, or if there's another trick.
if i use Capabilities.screenResolutionX and Capabilities.screenResolutionY the correct values are provided for mobile, but these values are not useful for the desktop and web version of the app. if there's no other solution, i'll execute different code depending on platform.
again, for reference, my app descriptor:
<initialWindow>
<aspectRatio>landscape</aspectRatio>
<autoOrients>false</autoOrients>
<width>320</width>
<height>480</height>
<content>bin-iOS/WagErgApplePhone.swf</content>
<title>WAG ERG</title>
<fullScreen>true</fullScreen>
<renderMode>cpu</renderMode>
</initialWindow>
looking forward to any other ideas to try out & thanks so much for your thoughts! if you want to really dig in, this is an opensource project at code.google.com/p/wag-erg/
Maybe you are looking for
-
I've got a new iPod touch. How do I transfer songs from my old 'classic' iPod?
So I've got a new iPod touch for Christmas. I want to transfer all the music from my old iPod. I don't store music on my computer, it's just on the iPod. The only solution I can find is to download a program, copy everything from the old one to the c
-
IPhoto won't open despite downloading the iPhoto Library Upgrader. What do I do?
iPhoto stopped opening when I received a notice that I had to download the Library Upgrade in order to access older libraries. I downloaded it, but I continue to get the same message nonetheless. What do I do?
-
Logon script - local copy/cache?
Does Windows keep a local copy of login script that comes from domain group policy? If yes, where is it? I ask because I found that some of my users are running an old version of login script that we revised long time ( a few months) ago.
-
Shape a JPanel based on the components added
Can I shape the JPanel depending on the components added to it? Please refer the code I have posted in http://forums.sun.com/thread.jspa?threadID=5323662&messageID=10386358#10386358 My requirement is that, I need to shape the JPanel(mainPanel) such t
-
How can i implement the communication between processes?
the processes must run in the machine which has small memory,no harddisk and tcp/ip protocol.