Store IP adress in database

B

Bugzilla

Guest
Hello everyone,

I have a quick question about Linux databases.

So I have many servers called “TestServer1” – “TestServer99”.

I want to store the server IP adresses in an extra database (“Database1”) with a script.

So question 1: How can I display the IP addresses of
1.1 one specific server (e.g. TestServer12)
1.2 of all servers in the command line?

Question 2: How can I store the IP addresses of these servers automatically in a database (preferably with a script) ?

Any help is appreciated. Thank you. :)
 


I want to store the server IP adresses in an extra database (“Database1”) with a script.

It depends from an used database and an used script language.
You didn't specify neither the first nor the second.
Some databases have support for specialized data types to store IP addresses.
In others you have to prepare data (conversion to int) or can just use character fields.
The final decision depends from your goal (just store or fast seek).

Do you really need a DBMS?
An ordinary DNS server is a special database server which used to store names and of corresponding IP-addresses.
Why do you not use a DNS?
 

Staff online


Top