More

Can't recreate missing address locators

Can't recreate missing address locators


My organization uses several address locators stored in SDE. The server license was recently updated, and shortly after, some of these locators simply disappeared -- they are no longer visible or accessible to ArcCatalog, Python, etc., and the underlying SQL Server shows no corresponding tables. However, trying to create a new locator with the same name fails with the message that it "already exists." Has anyone experienced a similar issue or have some other suggestions to either delete or restore these missing locators?


There are several underlying related tables in SDE that have a chance of not being updated properly if the table delete happened nontraditionally. The most likely cause of this issue is that the table name is persisting in the table registry even though the table has been deleted from SDE.

First, run a SELECT * on [database].[schema].[SDE_table_registry]. There is a good chance you will see your address locator names in that table. If so, you can follow this procedure:

  1. If archiving is enabled, disable archiving
  2. If versioning is enabled on the table, unregister as versioned

run this SDE command to delete the table from the registry (substituting in your table information):

sdetable -o unregister -t av.world -u av -p mo -i 7654

If this does not work for you an alternative workaround is to create a dummy table of the same name using SQL:

CREATE TABLE [NAMEOFLOCATOR_LOX] ( objectid INTEGER NOT NULL )

Address locators in SDE follow the convention [name of locator]_LOX. After you create the table, delete it from ArcCatalog. ArcCatalog will know to remove the requisite table and column registries from the back end, freeing up the name for you to use again.


Once things get this upset, I personally would mount each of the raw partitions as a read-only file system (eg, mount -r /dev/sda1 /mnt ), dump the contents to tape / external drive / wherever you have space, recreate the arrays from scratch, and restore the data.

Given that /dev/md0 is mounted on / , I'd say it's quite alive and well. If no such device file exists, take a look at dmesg to determine why. Perhaps look at your udev configuration as well.

It isn't immediately clear what you are trying to accomplish by directing mdadm to instantiate a RAID1 array with only one device when that array is already created and mounted (likely it was created by the kernel's RAID autodetect). It is no surprise at all that it won't allow you to do this.

If /dev/md1 doesn't exist, you could probably create that using mdadm (assumedly out of /dev/sda5 and something else).

You should avoid manipulating the root partition with mdadm at runtime. If it isn't kernel autodetection that is creating it, it should be an initrd, and that is where mdadm should be doing its thing if required.


2 Answers 2

Check to make sure the directory rights allow you to delete the mdf file and the the login has drop schema/table privileges directory rights are a common issue with mdf files due the high security placed on these files due to their potentially sensitive nature

I can see this is an older post - hopefully this can help someone in the same predicament.

Using code first, the first time the application runs it builds the db no problems - it knows it doesn't exist because it hasn't previously built it. Code first also takes a hash value of the models used and stores that in the new database - check for a table called EdmMetadata - thats where the hash value is stored. It uses the hash value to subsequently check if the model has changed from build to build, so it knows whether to drop the database and rebuild.

The second time through after you've deleted the database, it looks for the missing database to compare the model hash value, and can't find it because the database is now missing.

My workaround is to add a meaningless field (remembering to delete it after development) to one of the models to force the rebuild, without deleting the database. Alternatively, you could just modify the db hash value to force the rebuild.

This works with the code first application databases - not so sure with the membership database.


2 Answers 2

That happened to me a while ago. Just do this as root: (This is CentOS 6)

1) Get the MAC Address of the desired device: ip link show <device_name> (Thanks to @Mike Pennington for pointing out this command).

2) nano /etc/sysconfig/network-scripts/ifcfg-eth0 (if it doesn't exist, it doesn't matter, continue because nano will let you create the file)

5) ifdown <device_name> (e.g. ifdown eth3)

6) ifup <device_name> (e.g. ifup eth3)

7) Check that an IP Address has been assigned to your device by issuing the command ip addr

Now you should have everything working. In any case run the command lspci in order to look all the devices and the ethernet should appear correctly.

If you want, run the command system-config-network to setup the new device, but if you do this go a check the file /etc/sysconfig/network-scripts/ifcfg-eth0 again and see that the format is correct, something like this:

If you have any errors post them here and we'll check.

Check the interface files in /etc/sysconfig/network-scripts/ . The files, ifcfg-eth0 and ifcfg-eth1 would correspond to those interfaces. It sounds like Network Manager is setup to manage those interfaces instead of the normal subsystem. Check the contents of those files and modify the line "NM_CONTROLLED" to say no instead of yes . Restart the networking system or reboot following the change.

Update - The devices aren't in place, so you can re-add them using the system-config-network utility. Just create devices for the interfaces you need (presumably eth0 and eth1). You can also just create the files needed and populate them with the content from above, correcting the DEVICE name and removing the HWADDR field, then restarting the network service.


You could reinstall resolvconf to restore the default configuration:

Another idea would be remove "resolvconf" and then install:

If resolvconf -u shows the WARNING that /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf then just backup that resolv.conf and make the symbolic link:

nameserver 192.168.x.x (check your ifconfig output for the correct address)

Have you emptied your trash, if not, you can restore from trash.

The accepted answer did not work for me. After reinstalling resolvconf , the system would completely wipe my resolv.conf file after each reboot.

To fix this, I had to reinstall the network-manager and libnss-resolve packages in addition to resolvconf .

Manually add a nameserver to resolve.conf (this is so you can fetch packages from the Ubuntu repos):

Reinstall the network-manager , libnss-resolve , and resolvconf packages:


/var contains variable data files. This includes spool directories and files, administrative and logging data, and transient and temporary files.

Note that "transient and temporary" files are just one of the things it contains. It also contains "spool directories and files" and "administrative and logging data". You deleted critical "administrative data".

It goes on to explain why /var exists:

/var is specified here in order to make it possible to mount /usr read-only. Everything that once went into /usr that is written to during system operation (as opposed to installation and software maintenance) must be in /var .

That's the key thing about /var : the data in it changes, unlike /usr (which only changes when you add/remove/update software).

Further sections explain the various subdirectories of /var for example, /var/lib (where the files you deleted used to live) holds "state information pertaining to an application or the system", defined as "data that programs modify while they run, and that pertains to one specific host."

You really shouldn't delete files without knowing what the specific file is for. With the files you deleted, unless you have a backup of these files, I think the only thing left to do is take a backup of /home , /etc etc. and reinstall. Until you do so, you'll be unable to use dpkg (and APT, etc.). Other than that, the system should continue to function.

You can't "recreate" /var/lib/dpkg/status in the sense of just running a command and the file magically appears. No. You need to use a backup of the file, and learn never going around deleting things of the /var/lib directory:

This would give you the package status of the day before. Start praying it didn't broke something else.

Files located in /var are very much system-critical. For example, /var/mail or /var/spool/mail contains the users' email you would no more delete that than you would light a fire in your neighbor's mailbox. It's only files in certain subdirectories of /var that contain files that are more or less transitory: log files in /var/log , caches that can usually be recreated in /var/cache , temporary files (which you should not delete while they're in use!) in /var/tmp .

Data in /var/lib can be quite critical. For example, MySQL is usually configured to store its databases in /var/lib/mysql by default: if you erase that, you wipe your databases. Dpkg puts its own databases under /var/lib as well /var/lib/dpkg/status is one.

/var/lib/dpkg/status contains information about installed packages. If you've erased that, you should restore it from a backup. If your backup isn't fully up-to-date, check the logs of recent package manipulations under /var/log/apt and in /var/log/dpkg.log . You'll need to create that file before dpkg will work.

/var/lib/dpkg/available is built from data downloaded from the Internet. apt-get update should rebuild it.

/var/lib/dpkg/info contains files that ship with Debian packages. You can restore these files simply by reinstalling the packages. Of course, you will need a list of installed packages for that. If you've restored /var/lib/dpkg/status , then you can extract the list of packages from there.

If you've lost /var/lib/dpkg/status , then you may be able to recreate it by creating an empty file, then running apt-get install --reinstall on the list of packages. One place where the list of packages is also saved is /var/lib/apt/extended_states , at least if you've only ever used APT to install packages (as opposed to dpkg directly) — use that file instead of /var/lib/dpkg/status int the command above. If you've deleted that too, you can rebuild an approximate list of packages with $(cd /usr/share/doc && ls) , because most packages create an entry in /usr/share/doc . There are probably a few exceptions.

Do not ask for any assistance about package management on this system. Recovering from the deletion of system-critical files is not an exact science. If you can't restore from backups, you should install a new, clean system as soon as possible.


Recover/Recreate completely missing Mailbox Database

We're in the process of upgrading our servers from Exchange 2010 to Exchange 2013. During the installation of Exchange 2013 some things went wrong as why it could not be fully installed. It stopped at step 7 of 15 or so. After reinstalling the server and doing a disaster recovery, Exchange 2013 installed successfully (well, 'successfully' till now).

As we configured the new Exchange installation, we discovered that the Mailbox Database was unmounted. We discovered the Mailbox Database files weren't created: there are no transaction logs nor is there an .edb file at the path the database should be stored. I guess this is due to the failed installation which we recovered using Disaster Recovery.

Is there a way to somehow re-create this database, recover it or just completely remove Exchange 2013 from the server and AD so we can just start over again and do it right this time (uninstalling is impossible at the moment cause it thinks there are still mailboxes (Migration Mailbox, that is) being stored in the missing database, which we can't delete cause then it errors out saying the database can't be mounted)?


5 Answers 5

There might be a utility, but I don't know what it is. You can just create a file at /etc/sysconfig/network-scripts/ifcfg-eth0 with contents similar to:

I use the command: system-config-network-tui

Creating the file by hand is a good answer too, but this will get the MAC address for you.

This may not be valuable anymore to the asker but for someone else, if you have the gui running you can go to System > Preferences > Network Connections and a window will open. Now if you see a device listed there then click on it and just make some edit and save and the file will appear. If no device is listed (will be rare and only if you aren't getting internet connectivity) then you can simply click add and name it eth0 or whatever you like and click save. No need to edit anything, it'll automatically do it all for you.

PS: the file ifcfg-"NAME" is the name you give it in the network connections window when you created it.

I added a new Virtual Network card, whose ifcfg-eth2 file was not generated after a re-boot.

I navigated the the network-scripts directory and ran the commands in the below sequence.

There is a utility called sysconf-network or something like that to allow you to manager the network connections. That is a command line utility.

Here is a link to the FAQ about their /etc/sysconfig system.


A Five-Step Plan to Feed the World

When we think about threats to the environment, we tend to picture cars and smokestacks, not dinner. But the truth is, our need for food poses one of the biggest dangers to the planet.

Agriculture is among the greatest contributors to global warming, emitting more greenhouse gases than all our cars, trucks, trains, and airplanes combined—largely from methane released by cattle and rice farms, nitrous oxide from fertilized fields, and carbon dioxide from the cutting of rain forests to grow crops or raise livestock. Farming is the thirstiest user of our precious water supplies and a major polluter, as runoff from fertilizers and manure disrupts fragile lakes, rivers, and coastal ecosystems across the globe. Agriculture also accelerates the loss of biodiversity. As we’ve cleared areas of grassland and forest for farms, we’ve lost crucial habitat, making agriculture a major driver of wildlife extinction.

The environmental challenges posed by agriculture are huge, and they’ll only become more pressing as we try to meet the growing need for food worldwide. We’ll likely have two billion more mouths to feed by mid-century—more than nine billion people. But sheer population growth isn’t the only reason we’ll need more food. The spread of prosperity across the world, especially in China and India, is driving an increased demand for meat, eggs, and dairy, boosting pressure to grow more corn and soybeans to feed more cattle, pigs, and chickens. If these trends continue, the double whammy of population growth and richer diets will require us to roughly double the amount of crops we grow by 2050.

Unfortunately the debate over how to address the global food challenge has become polarized, pitting conventional agriculture and global commerce against local food systems and organic farms. The arguments can be fierce, and like our politics, we seem to be getting more divided rather than finding common ground. Those who favor conventional agriculture talk about how modern mechanization, irrigation, fertilizers, and improved genetics can increase yields to help meet demand. And they’re right. Meanwhile proponents of local and organic farms counter that the world’s small farmers could increase yields plenty𠅊nd help themselves out of poverty𠅋y adopting techniques that improve fertility without synthetic fertilizers and pesticides. They’re right too.

But it needn’t be an either-or proposition. Both approaches offer badly needed solutions neither one alone gets us there. We would be wise to explore all of the good ideas, whether from organic and local farms or high-tech and conventional farms, and blend the best of both.

I was fortunate to lead a team of scientists who confronted this simple question: How can the world double the availability of food while simultaneously cutting the environmental harm caused by agriculture? After analyzing reams of data on agriculture and the environment, we proposed five steps that could solve the world’s food dilemma.

Step One: Freeze Agriculture’s Footprint

For most of history, whenever we’ve needed to produce more food, we’ve simply cut down forests or plowed grasslands to make more farms. We’ve already cleared an area roughly the size of South America to grow crops. To raise livestock, we’ve taken over even more land, an area roughly the size of Africa. Agriculture’s footprint has caused the loss of whole ecosystems around the globe, including the prairies of North America and the Atlantic forest of Brazil, and tropical forests continue to be cleared at alarming rates. But we can no longer afford to increase food production through agricultural expansion. Trading tropical forest for farmland is one of the most destructive things we do to the environment, and it is rarely done to benefit the 850 million people in the world who are still hungry. Most of the land cleared for agriculture in the tropics does not contribute much to the world’s food security but is instead used to produce cattle, soybeans for livestock, timber, and palm oil. Avoiding further deforestation must be a top priority.

Step Two: Grow More on Farms We’ve Got

Starting in the 1960s, the green revolution increased yields in Asia and Latin America using better crop varieties and more fertilizer, irrigation, and machines𠅋ut with major environmental costs. The world can now turn its attention to increasing yields on less productive farmlands𠅎specially in Africa, Latin America, and eastern Europe—where there are “yield gaps” between current production levels and those possible with improved farming practices. Using high-tech, precision farming systems, as well as approaches borrowed from organic farming, we could boost yields in these places several times over.


I've noticed some confusion lately on how to restore one's Ledger Monero wallet. I have therefore written this guide.

In case you have also lost (access to) your Ledger device, you first have to restore the 24 word Ledger mnemonic seed in another Ledger device.

Restoring / recreating a Ledger Monero wallet is fortunately fairly trivial thereafter.

  • Basically you ought to follow this guide with one minor tweak to recreate / restore the Ledger Monero wallet. That is, the Restore a wallet from device option has to be selected (in step 8). This allows you to set a Restore height that is in advance of the first transaction to your Ledger Monero wallet. A detailed explanation about the Restore height parameter can be found here. For convenience, I've added a table with restore heights to the appendix.

Note: Use this work around if you cannot access the Restore height box:

There is a fix for the time being: You can access the restore height window by selecting the wallet location and pressing tab once.