You get an occupational license by petitioning the county in which you reside. You fill out an application or petition and file that at the County Clerk's office. You then ask for a setting and if DPS or the County Attorney does not have an objection an occupational license should be issued to you. You need to know if you the local judge has special requirements. Some judges require you to take an alcohol class, some require SR22 insurance, and some judges require that an interlock device be installed, other judges may have requirements that are not listed here. Some judges mix and match these requirements according to how many DWI's you have or have had. You should hire a lawyer who is familiar with these procedures in your area and allow them to worry about meeting the local requirements. Good luck.
Getting an ODL is something you should hire an attorney to complete on your behalf. It is not simple and may require skilled and trained advocacy to secure. You may petition the county court for an ODL in the county in which you reside or the county where your case is pending. There will be a filing fee. You also need to show proof you have obtained SR22 insurance and proof of employment. Each court is different, but many require a letter from your employer stating times you typically drive. You are limited to driving no more than 12 hours in a 24 hour period. Most ODLs have specific times listed in them like 7am to 7pm, etc.
You need to have a lawyer handle this matter for you. Where you petition depends on the reason for the suspension. The petition is detailed and has specific requirements that must be included, and some judges are reluctant to grant such licenses.