#oracle data pump tutorial
Explore tagged Tumblr posts
ocptechnology · 4 years ago
Text
Export Backup Automation in Oracle On Linux
Export Backup Automation in Oracle On Linux #oracle #oracledba #oracledatabase
Hello, friends in this article we are going to learn how to schedule database export backup automatically. Yes, it is possible to export backup automation with a crontab scheduler. How to schedule Export Backup Using shell scripting, we can schedule the export backup as per our convenient time. Using the following steps we can schedule expdp backup. Step 1: Create Backup Location First, we…
Tumblr media
View On WordPress
0 notes
evanvanness · 5 years ago
Text
Annotations for the latest Week in Eth News
I tweeted this week:
Tumblr media
Feels like an accurate reflection of the broader week in the Ethereum ecosystem.  Just take a look at the most clicked:
Tumblr media
“Yield farming” is the idea of figuring out how to leverage up to get the most yield, where part of the yield is usually a native token for the platform/protocol.  (Please do so very cautiously...if you get leveraged up, you’re juicing returns but taking large risk of losses).
With Compound, this meant various “trades,” which changed through the week.  First people were lending (and resupplying) Tether, because that had the highest rates.  Then the trade switched to BAT because some whale figured out (the advantages of scale!) that it wouldn’t be hard to drive BAT rates up even higher than Tether (USDT) and all the sudden an insane amount of BAT moved to Compound.  I kid you not: at the moment there is about $250m USD worth of BAT in Compound - though only 6% of supply as it gets circulated through a few times
Tumblr media
Leveraged up?  Be careful!  If BAT price doubles, how many people would get liquidated?  
Hint: it’s those of you who are over 50% on the borrow limit you can see from your account page on the Compound UI.  Looking at exchanges, the order books are rather thin - how much would it cost a liquidator to drive all the BAT price up 2x compared to how much it could make liquidating?  Or what if Brave announces a big partnership?  Crypto is an adversarial environment (ahem, look at all those YouTubers with huge followings trying to sell you on the latest pump of some worthless token)
These order books are thinner than normal because....so much BAT got sucked into Compound from the exchange’s order books.  So the price is now easier to push higher.
Meanwhile, Balancer started its “liquidity mining” (same thing as yield farming) before Compound, but just released its token today.   And now it’s trading at $15 last I looked, or 1.5 billion USD fully diluted market cap.  
Signs of a bull market?  Feels like it to me.
These aren’t the only liquidity mining opportunities - and you’ll see a bunch more people do it now that this is what is bringing in users.
Back to Compound, it got listed on Coinbase Pro today and the price actually fell, as all the people who had “farmed” it got liquid, plus presumably some others as well.  However, it eventually held (at time of writing) at about $280. (that’s a 2.8b USD fully diluted valuation). It had been at $380 and looking at the orderbook when it opened, it appeared that the first trade (for a tiny amount) happened at $440.  We’ll see what happens when Coinbase opens it to retail.
The DeFi narrative is strong.  Seems clear that there is some demand for folks wanting to own a bit of what might be the next big financial platforms.
-------
The final thing I always call out in my intro is high-level things I suggest Eth holders might read:
Matter Labs’ ZK Sync rollup is live – tiny transaction fees, withdrawals to Eth mainnet in 15 mins, 300 transactions per second (with 2000 tps coming)
Reddit announces scaling competition to move Reddit’s community points to mainnet
It seems the mysterious and massive transaction fees were from a hacked korean ponzi called GoodCycle. Various miners have handled differently: Ethermine (already paid out). Sparkpool (said it would pay out but then victim identified, unclear to me if yet resolved). f2pool (said they’d return to new address)
ETH disrupting SWIFT: why fintech VCs are missing DeFi
As always, reverse order: 
Looking at ETH as a distruptor for SWIFT is a pretty interesting lens.  I’ve always rolled my eyes a little at “fintech” because it seems like playing fast with regulations and then if you get a certain scale hiring lawyers and lobbyists to hopefully make your issues go away.   This article argues that the real innovation is further down in the financial “stack” - Ethereum taking the place of antiquated SWIFT.
Personally I don’t think the massive mistake/hack transaction fees are a big deal, but it seems to be something that the crypto clickbait jumps on.  It’s not a danger to any normal user.  Just check the transaction fee before sending.
Reddit wants to put its Community Points on Eth mainnet, likely through a rollup or sidechain.   Very neat - it does feel like their deadline is just a little ambitious for rollups which might make them use a sidechain, which would be a bit of a shame if they can get better trust assumptions from a rollup by waiting an extra month or two.
And speaking of rollups, ZkSync is live.  Fast, cheap transfers with the data onchain and the execution offchain.  Woot!
Eth1
Trinity v0.1.0-alpha.36 (Python client) – BeamSync improvements, metrics tracking (influxDB/Grafana), partial eth/65 support
Updated Eth on ARM images. Geth fast syncs a full node in 40 hours on 8GB Raspberry Pi4
Miners began bumping up the gas limit (12m now), which sparked some polemics about the tradeoff between state growth versus user fees. Higher gas limit resulted in safelow gas fees in the teens for the first time in weeks.
Speaking of yield farming ruling the week, the gas prices are back to 30 gwei despite the fact that that throughput went up 20%.  My strong suspicion is that this has a lot to do with yield farming.
For the record, the max transactions per second of Ethereum right now is about 44 transactions per second.  It’s an easy calc to do (12m divided by 13.1 block time divided by 21000 gas per simple eth transfer). 
Of course that doesn’t include rollups, who put their data onchain to the point where they are arguably layer 1.5.
Personally I think we should make this gas limit increase “temporary” when gas prices go back down.  
Eth2
Prysmatic (Go) client update – stable Onyx testnet, 80% validators community run, RAM usage optimizations
Nimbus (Nim) client update – up to spec, 10-50x processing speedup, splitting node and validator clients
SigmaPrime’s update on their Eth2 fuzzer – found some Prysmatic bugs, fuzzing Lodestar (Javascript client), Lighthouse ENR crate bug, dockerizing the fuzzer so the community can run it
Jonny Rhea’s Packetology posts (one and two) on identifying validators
Attack nets – a testnet specifically for attacks
When Sigma Prime’s fuzzer is dockerized, does “are you fuzzing any eth2 clients” become the cool new question that Eth folks ask each other, instead of “are you running any testnets?”
There’s not much more to say otherwise.  This is the final slog to getting the eth2 chain launched.  The final tinkering, the testnets, thinking about validator privacy and cost of attack, an attack net for white hats.
Layer2
Matter Labs’ ZK Sync rollup is live – tiny transaction fees, withdrawals to Eth mainnet in 15 mins, 300 transactions per second (with 2000 tps coming)
Minimally viable rollback in Validium/Volition
The flipside to high gas prices is layer2.  It’s hard to get people to excited about layer2 when you can get onchain transactions done in a couple minutes at 1 gwei.  At 30 gwei, people get more excited about layer2, and stuff is working.
Network effects are real: layer2 also becomes much better to use the more people who are using it.  So there is a silver lining to higher gas prices, because it provides the incentive to push people to superior alternatives.  Obviously a really fast and cheap ETH/token transfer rollup is increasingly more valuable the more people are using it.
Crypto
a GKR inside a snark to speed up SNARK proving 200x
Attacking the Diogenes setup ceremony for Eth2’s VDF
Isogenies VDFs: delay encryption
Kate polynomial commitments explainer from Dankrad Feist
Reputable List Curation from Decentralized Voting Crites, Maller, Meiklejohn and Mercer paper for construction of private TCR voting
Debut of the “crypto” section.  It seemed like it was getting lost in the general.
Placement (compared to other sections) was rather random.  Categorization can be somewhat arbitrary, that’s something the newsletter will hopefully constantly evolve.
This newsletter is made possible thanks to Matcha by 0x!
Tumblr media
0x is excited to sponsor Week in Ethereum News and invite readers to try out our new DEX!
Sign up here to get early access to Matcha, your new home for fast, secure token trading.
Stuff for developers
Waffle v3 with ethers v5 support
WalletConnect v1 release, now with mobile linking
ethers-rs, a port of ethers to Rust
Solidity v0.6.10. error codes and bugfix for externally calling a function that returns variables with calldata location.
Inheritance in Solidity v0.6
Sorting without comparison in Solidity
Create dynamic NFTs using oracles
Deploying with libraries on Remix IDE
Wyre’s WalletPasses allow push notifications for dapps
Bunch of neat stuff in here. I’ve said it before, ethers is increasingly the thing that people use, even while most of the eth tutorials are still using web3js.
Code security
OpenZeppelin found a bug that affected 61 Argent wallets
Bancor bug: public method allowed anyone to drain user balances. Amusingly, the white hat draining got frontrun
DeFiSaver exchange vulnerability. They white hat drained it and also got frontrun.
Database of audit reports
Check out this newsletter’s weekly job listings below the general section
A special security section to break up the “stuff for devs” since it was a little big.
The whole “white hat drainers” get frontrun theme was...well, I used the word amusing in the newsletter, but I don’t think that’s quite the right word.
Ecosystem
Reddit announces scaling competition to move Reddit’s community points to mainnet
It seems the mysterious and massive transaction fees were from a hacked korean ponzi called GoodCycle. Various miners have handled differently: Ethermine (already paid out). Sparkpool (said it would pay out but then victim identified, unclear to me if yet resolved). f2pool (said they’d return to new address)
By default, Geth will no longer accept transaction fees over 1 eth
3box on demystifying the many facets of digital identity
The death (and web3 rebirth?) of privacy
Ethereum Foundation invests in Unicef’s CryptoFund startups
Unicef’s press release didn’t mention the Ethereum Foundation (and barely mentioned Ethereum! strange) but in fact EF did provide the capital.  Very strange that Unicef barely mentioned Ethereum.
And yes, I still love a good privacy essay.  I’m not a privacy nut, but I do think people should have the right to at least know when our every online action action is being surveiled.  
Enterprise
WEF, IADB and Colombian government project to reduce corruption in procurement
EY launches crypto tax reporting app
EY continues to push things for enterprise, and dealing with taxes is presumably just one more hurdle that they’re knocking down.  Of course many enterprises also still refuse to own crypto (even on a centralized exchange), so I remain curious as to whether 
the anti-corruption procurement project in Colombia suffers a similar problem: to be actually used, the Colombian government requires secret bids.  So they either have to change the law to try it, or they have to integrate...something like EY’s Nightfall  
DAOs and Standards
EIP2733: Transaction package
Anonymous voting using MACI and BrightID
Arguably the anonymous voting using MACI could’ve been in the crypto section, but it felt slightly more applicable here.
Application layer
$COMP was distributed and liquidity mining (“yield farming”) blew up. Compound passed Maker for #1 on DeFiPulse, and $COMP has had a fully diluted market cap over $3.5 billion
Uniswap v2 passes v1 in liquidity
Streamr’s data unions framework is live for anyone to create their own
5m KNC burned milestone
Yield farming on steroids from Synthetix, Ren, and Curve
A yield farming for normies (and the risks!) tweetstorms from Tony Sheng
this artwork is always on sale, v2 with 100% per year tax instead of 5%
My weekly what fraction of applayer section is DeFi: 5/7.
I was somewhat surprised Uniswap v2 took over this quickly. I suppose that’s a data point for “the power of frontends.”
Tokens/Business/Regulation
ETH disrupting SWIFT: why fintech VCs are missing DeFi
Nick Tomaino on the economics of Eth2
Personal token vote on Alex Masmej’s life decisons
Liechtenstein company tokenizes 1.1m USD collectable Ferrari
Opyn: hedging with calls
It does seem like the economics of Eth2 are still vastly underrated by “crypto” at large.  In my view that largely reflects the skepticism that Eth2 ever launches, as Silicon Valley went very skeptical on ETH 2 years ago when they pivoted away from FFG.  
New tokens from protocols valued in the billions and tokenized Ferraris.  It’s starting to feel like the true beginnings of a bull market.
No general section this week; I was surprised as you, but lately the general section had been dominated by cryptography and that got its own section.  
That’s it for the annotations!
Please RT this on Twitter if you enjoyed it:
  https://twitter.com/evan_van_ness/status/1275551414350237702
Job Listings
Synthetix: Deep Solidity engineer, 2+ years exp & US/EU friendly timezone
Chainlink: Product Manager for Blockchain Integrations and Lead Test Engineer
0x is hiring full-stack, back-end, front-end engineers + 1 data scientist
Celer Network: Android developer
Trail of Bits is looking for masters of low-level security. Apply here.
Want your job listing here? $250 per line (~75 character limit including spaces), payable in ETH/DAI/USDC to evan.ethereum.eth. Questions? thecryptonewspodcast -at-gmail
Housekeeping
Follow me on Twitter @evan_van_ness to get the annotated edition of this newsletter on Monday or Tuesday. Plus I tweet most of what makes it into the newsletter.
Did you get forwarded this newsletter?  Sign up to receive it weekly
Permalink: https://weekinethereumnews.com/week-in-ethereum-news-june-21-2020/
Dates of Note
Upcoming dates of note (new/changes in bold):
June 24 – EIP1559 call
June 25 – Eth2 call
June 26 – Core devs call
June 29 – Swarm first public event
July 3 – Gitcoin matching grants ends (here’s my grant)
July 6-Aug 6 – HackFS Filecoin/IPFS and Ethereum hackathon
July 20 – Fork the World MetaCartel hackathon
Aug 2 – ENS grace period begins to end
Oct 2-Oct 30 – EthOnline hackathon
0 notes
globalmediacampaign · 5 years ago
Text
Java with K8S using MySQL MDS
pre { background: lightgrey; font-size: 14px; border: 2px solid grey; padding: 14px; } Oracle Cloud Infrastructure (OCI) is the Oracle Cloud Platform where the tutorial leverages 3 services – namely the MySQL Database Service (MDS), Kubernetes Container (K8s) under Developer Services and Compute VM services. This article is written to provide the steps to provision MDS, K8s and Compute VM services.   It also provides the steps to create a docker image from Image:java:latest as tar for local node image repository import (loading).   2 Java Client sources are used with the tutorial. Helloworld.java – it is a simple hello world output java source HelloDB.java – it is multi-threaded java application with Runnable Thread to pump Data into MySQL Database Service.   It uses the Connect/J (MySQL JDBC Driver) to connect to MySQL MDS. MySQL Shell is the client tool to administrate and watch the data in MySQL Database Service(MDS).   Pre-requisites :  Compartment  Virtual Cloud Network – VCN Internet Gateway and Default Routing Public subnet – the Public Network for the COMPUTE VM so that externally we can access to the VM (to be used in Compute subnet) Private subnet – All services (MDS, K8s) are running within the subnet Security Rule defined to allow Private Subnet and Public Subnet to communicate with regards to the port 3306 / 33060.   MySQL Shell running on Public Subnet with  Compute VM is able to connect to MDS on Private Subnet.  COMPUTE – SSH private and public key pair   Part I : MySQL Database Service – DB System Choosing from the OCI Menu : MySQL (DB Systems) Click “Create MySQL DB Systems”  Fill in the DB Systems details Choose compartment, VCN/Network settings and do not forget to specify credentials. The rest of the information is easy, just follow the wizard. Click “Create” to provision MySQL DB Systems You will be able to see the DB System in the 'Creating' status.       Part II Developer Service – Kubernetes Clusters Choosing from the OCI Menu : Developer Services (Kubernetes Clusters)      Click “Create Cluster” and choose “Custom Create”   Specify the name and Compartment and Choose K8s version (in this tutorial, v1.16.8 is chosen), and Click “Next”   Specify Network settings and choose the VCN and public subnet, and click “Next”   Specify the node pool settings – Name, version, Image, Shape (for tutorial purpose, choose the smallest VM Shape for the tutorial, 1 as number of nodes, choose the Availability Domain and private subnet from the VCN, and specify the SSH public key, and click “Next” Finally, review the settings and click “Create Cluster” to provision the cluster     Part III Compute Service The Cloud Compute VM is used to access the MySQL Database Service and the Kubernetes Clusters.   Choose OCI Menu – Compute (Instances) and Click “Create Instance”     Specify the VM details – Name, Compartment and choose Image, Select Availability Domain and Choose VM Shape   Specify the Network Settings – Compartment, VCN, and choose the  public subnet and choose “ASSIGN a PUBLIC IP ADDRESS”   Specify the boot volume detail and the SSH Public key details, and click “Create”   When the Compute VM is provisioned, it is assigned with public IP address     Part IV : Configure Compute VM The VM is created with default username as  ‘opc’ and it is authenticated based on key authentication setting from previous section. With the SSH private/public key  pair (e.g. private key file as id_rsa.txt), login to the public IP address of the Compute VM via ‘ssh’.   If putty is used, the .ppk format for the private key is used.  ssh -i ./id_rsa.txt opc@[public ip of the COMPUTE] Installing OCI – CLI : Refer to the Installation Materials  https://docs.cloud.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm?tocpath=Developer%20Tools%20%7CCommand%20Line%20Interface%20(CLI)%20%7C_____1 # bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)" Configure OCI - To have the CLI setup walk you through the first-time setup process, oci setup config Specify the Tenancy’s OCID and User’s OCID – Refer to your User Profile about User’s OCID and Tenancy’s OCID. Choose the Regions and Availability Domain And specify the “Y” to generate the  API Signing RSA key pair.  The key pair files is generated as $HOME/.oci/.pem and $HOME/.oci/_public.pem Define the API key with the given key Select API Keys on the left menu Add Public Key (drop the file or paste the content from the _public.pem) Install Docker-engine  sudo yum install docker-engine sudo systemctl enable --now docker Install kubectl and kubeadm – it is configured to access the Kubernetes Clusters sudo yum install kubectl kubeadm mkdir -p $HOME/.kube oci ce cluster create-kubeconfig --cluster-id  --file $HOME/.kube/config --region --token-version 2.0.0 export KUBECONFIG=$HOME/.kube/config Installing mysql shell from MySQL Community repository Referring to the URL : https://dev.mysql.com/downloads/repo/yum/ and choose the rpm with the corresponding Linux Version (for example with Oracle Linux 7) sudo yum install https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm sudo yum install mysql-shell   Once the installation has been completed, you can try simple commands for Accessing Docker : sudo docker image list sudo docker ps -a   Accessing Kubernetes : kubectl get nodes kubectl get pods --all-namespaces   Accessing MySQL Database Services using MySQL Shell : Using MySQL Shell to login to MDS with SQL interface mysqlsh --uri @ --sql MySQL Shell> create database if not exists test; To quit / exit of the mysql shell : MySQL Shell> q     Part V – Simple Java Hello world in OCI K8s Building Docker Image for Java Application - helloworld Simple Java “helloworld” application Creating folders :     mkdir -p helloworld helloworld/src helloworld/image   Java Source : helloworld/HelloWorld.java public class HelloWorld{ public static void main(String[] args){ System.out.println("Hello World!!!"); } } Creating Dockerfile ( filename : helloworld/Dockerfile ) : The Docker file refers to the “image” from ‘java:latest’.   It creates the structure bin and src under the working directory /root/java. The image contains the java source HelloWorld.java which prints the ‘hello world’ string on screen.  It builds the image to compile the source and puts the class file to /root/java/bin. The ENTRYPOINT is to start the execution with “classpath” pointing to “bin” to execute HelloWorld.class. Dockerfile : FROM java:latest COPY src /root/java/src WORKDIR /root/java RUN mkdir bin RUN javac -d bin src/HelloWorld.java ENTRYPOINT ["java", "-cp", "bin", "HelloWorld"]   Building the Docker Image for “helloworld” The image name is “my-java-helloworld” as example : cd helloworld; sudo docker build -t my-java-helloworld .   Export Docker Image as Tar cd helloworld; sudo docker save my-java-helloworld > image/helloworld.tar   Import Docker Image to Local Docker Repository on node Although the docker image can be imported to Docker Registry, this tutorial is simply to load the docker image to the local node repository. Identify the node Private IP Address from the kubectl command kubectl get nodes -o wide NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME 10.0.1.7 Ready node 46h v1.16.8 10.0.1.7 Oracle Linux Server 7.8 4.14.35-1902.304.6.el7uek.x86_64 docker://18.9.8   Copy the tar image to the node using scp and the private key (id_rsa.txt) scp -i id_rsa.txt image/helloworld.tar opc@[node’s internal-ip]:/home/opc   SSH Login to the Private IP using opc and the private key (id_rsa.txt) and load the image to local repository  ssh -i id_rsa.txt opc@[worker node’s private ip] With the Shell command from the K8s Worker node terminal docker image load --input /home/opc/helloworld.tar docker image list Output sample as : [opc@oke-crwgzjvgbrd-nrweyjugy4w-snmxcmvxhda-0 ~]$ docker image list REPOSITORY TAG IMAGE ID CREATED SIZE my-java-helloworld latest e6357e2cfc8d 6 days ago 643MB 742kB   Creating Yaml file for helloworld  (file: helloworld/helloworld.yaml) – This yaml file is to create a pod named as “myhelloworld” based on the image from imported “my-java-helloworld’.  The setting with “imagePullPolicy as Never” is to allow the image to used locally from the local node repository.  The setting “restartPolicy:OnFailure” is to set it as “execute once” instead of a daemon.   apiVersion: v1 kind: Pod metadata: name: myhelloworld spec: containers: - name: myhelloworld image: my-java-helloworld imagePullPolicy: Never restartPolicy: OnFailure   Creating a namespace ‘demo’ and Apply the yaml file kubectl create namespace demo01 kubectl apply -f helloworld.yaml --namespace demo01 kubectl get pods --namespace demo01 kubectl logs myhelloworld --namespace demo01 output sample : [opc@ivanma-demo1 buildJavaImage]$ kubectl create namespace demo01 namespace/demo01 created [opc@ivanma-demo1 buildJavaImage]$ kubectl apply -f helloworld.yaml --namespace demo01 pod/myhelloworld created [opc@ivanma-demo1 buildJavaImage]$ kubectl get pods --namespace demo01 NAME READY STATUS RESTARTS AGE myhelloworld 0/1 Completed 0 4s [opc@ivanma-demo1 buildJavaImage]$ kubectl logs myhelloworld --namespace demo01 Hello World!!!      Part VI : Java DB application with MDS Building Docker Image for Java DB Application - HelloDB Simple Java “HelloDB” application Create folders :       mkdir -p hellodb hellodb/src hellodb/image   Download ConnectorJ for MySQL and copy the tar file to folder “src”          Referring to URL : https://dev.mysql.com/downloads/connector/j/          Choose the “Platform Independent” and download the tar          Or as of ver 8.0.21, the following command to “wget” the file directly   cd /home/opc/hellodb; wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.21.tar.gz tar -xvf mysql-connector-java-8.0.21.tar.gz mv mysql-connector-java-8.0.21/mysql-connector-java-8.0.21.jar src   Java Source : hellodb/HelloDB.java - Download the file from Github Change the following private variables with the MDS IP address details and the corresponding username and password accordingly. private static String database = "test"; private static String baseUrl = "jdbc:mysql://" + "address=(protocol=tcp)(type=master)(host=)(port=3306)/" + database + "?verifyServerCertificate=false&useSSL=true&" + "loadBalanceConnectionGroup=first&loadBalanceEnableJMX=true"; private static String user = ""; private static String password = "";  Creating Dockerfile ( filename : hellodb/Dockerfile ) : The Docker file refers to the “image” from ‘java:latest’.   It creates the structure bin and src under the working directory /root/java. The docker image contains the java source HelloDB.java; it does the following It creates tables test.mytable (f1 int auto_increment not null primary key, f2 varchar(200)) engine=innodb;") Starting 10 threads Each thread executes a batch size of 10 to insert data to test.mytable for 10 iterations. The Dockerfile builds the image to compile the source. The Dockerfile copies the class files to /root/java/bin including the connector-j tar file from the src folder  The ENTRYPOINT is to start the execution with “classpath” pointing to “bin” and the “connect-j tar” to execute HelloDB.class.   Dockerfile : FROM java:latest COPY src /root/java/src WORKDIR /root/java RUN mkdir bin COPY src/mysql-connector-java-8.0.21.jar bin RUN javac -d bin src/HelloDB.java ENTRYPOINT ["java", "-cp", "bin:bin/mysql-connector-java-8.0.21.jar", "HelloDB"]     Building the Docker Image for “my-hellodb” The image name is “my-hellodb” as example : cd /home/opc/hellodb; sudo docker build -t my-hellodb .   Export Docker Image as Tar cd /home/opc/hellodb; sudo docker save my-hellodb > image/hellodb.tar   Import Docker Image to Local Docker Repository on node Although the docker image can be imported to Docker Registry, this tutorial is simply to load the docker image to the local node repository. Identify the node Private IP Address from the kubectl command # kubectl get nodes -o wide NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME 10.0.1.7 Ready node 46h v1.16.8 10.0.1.7 Oracle Linux Server 7.8 4.14.35-1902.304.6.el7uek.x86_64 docker://18.9.8   Copy the tar image to the node using scp and the private key (id_rsa.txt) scp -i id_rsa.txt image/hellodb.tar opc@[node’s internal-ip]:/home/opc   SSH Login to the Private IP using opc and the private key (id_rsa.txt) and load the image to local repository  ssh -i id_rsa.txt opc@[worker node’s private ip] With the Shell command on the K8s worker node's Terminal docker image load --input /home/opc/hellodb.tar docker image list Output sample as : [opc@oke-crwgzjvgbrd-nrweyjugy4w-snmxcmvxhda-0 ~]$ docker image list REPOSITORY TAG IMAGE ID CREATED SIZE my-hellodb latest 53b4b1c08d64 32 minutes ago 648MB my-java-helloworld latest e6357e2cfc8d 6 days ago 643MB   Creating Yaml file for hellodb  (file: hellodb/hellodb.yaml) – This yaml file is to create a pod named as “my-hellodb” based on the image from imported “my-hellodb.  The setting with “imagePullPolicy as Never” is to allow the image to used locally from the local node repository.  The setting “restartPolicy:OnFailure” is to set it as “execute once” instead of a daemon.  apiVersion:v1 kind: Pod metadata: name: my-hellodb spec: containers: - name: my-hellodb image: my-hellodb imagePullPolicy: Never restartPolicy: OnFailure   Creating a namespace ‘demo02’ and Apply the yaml file kubectl create namespace demo02 kubectl apply -f hellodb.yaml --namespace demo02 kubectl get pods --namespace demo02 kubectl logs my-hellodb --namespace demo02 output sample : [opc@ivanma-demo1 hellodb]$ kubectl logs my-hellodb --namespace demo02 Thread ID(0) - Iteration(0/10) Thread ID(1) - Iteration(0/10) Thread ID(2) - Iteration(0/10) Thread ID(3) - Iteration(0/10) Thread ID(4) - Iteration(0/10) Thread ID(5) - Iteration(0/10) Thread ID(6) - Iteration(0/10) Thread ID(7) - Iteration(0/10) Thread ID(8) - Iteration(0/10) Spawned threads : 10 Thread ID(9) - Iteration(0/10) ……. Thread ID(6) - Iteration(9/10) Thread ID(4) - Iteration(9/10) Finished - 57332   Open another Terminal to the Compute VM from your PC ssh -i [id_rsa.txt] opc@[Compute’s public IP] mysqlsh --uri [MDS user]:[MDS password]@[MDS IP] MySQL Shell > watch query select count(*) from test.mytable While the MySQL Shell terminal is showing the count(*), on the separate terminal, re-apply the yaml to see the count(*) changes.  You can see the count(*) growing from 1000 to 2000.   (10 threads inserts 10 iterations x 10 rows in a batch which is 1000 rows) kubectl delete pod my-hellodb --namespace demo02 kubectl apply -f hellodb.yaml --namespace demo02   Finally, Clean up namespace “demo01” and “demo02”. # kubectl delete namespace  demo01 # kubectl delete namespace  demo02      That is the end of this "MDS + Java + K8S" tutorial.       https://blogs.oracle.com/mysql/java-with-k8s-using-mysql-mds
0 notes
davidnick321-blog · 7 years ago
Link
Oracle – Data Exportation with Data Pump Export [expdp] 1. Environment To make this tutorial the following development environment has been used: Hardware: Mac Book Pro 15 “Intel Core i7 2.8 GHz, 16 GB RAM Operating System: Mac OS X Yosemite Virtual machine VirtualBox version 4.3.20: Operating system: Windows 7 Ultimate 32bits 2GB RAM Oracle …
0 notes
ocptechnology · 4 years ago
Text
How To Export Tablespaces Using Expdp Data Pump Utility?
How To Export Tablespaces Using Expdp Data Pump Utility?
Hi, In this article we are going to learn how to export tablespaces using expdp data pump utility practically. What is tablespace? A tablespace is a logical unit of storage that is used by the database to store database objects like tables and PL/SQL codes. We can export tablespaces using the expdp utility which is also called logical backup of the tablespace in the Oracle database. The export…
Tumblr media
View On WordPress
0 notes