-2

I am learning oracle sql. I downloaded sql command line on my laptop. I have an oracle account. I used connect username/password; to connect to sql first, it failed (I did some searches on google, someone says it might be something wrong with my username or password, because it has special character (e.g. @) in it). Then I tried connect sys/root as sysdba;, it worked.

After connecting to the server, I started putting my sql schemas in and populated them. Everything works fine.

My problem is when I tried to use the data I have already populated the next day they are all gone but the table still remains. How could I store my data when I close the software?

gjjhhh_
  • 169
  • 3
  • 21
  • 2
    Do ***NOT*** create regular tables as `SYS`. Never. Create a regular user first, then use _that_ user for all your normal data. The `SYS` user is only intended for DBA work. Do ***NOT*** use it for anything else. –  Sep 19 '16 at 06:57
  • thank you. I will look for the method to create a regular user online. thanks for the warning. – gjjhhh_ Sep 19 '16 at 07:02

2 Answers2

0

Use the COMMIT statement to end your current transaction and make permanent all changes performed in the transaction. See Oracle Doc

AlexSmet
  • 2,141
  • 1
  • 13
  • 18
0

For anyone who has the same struggle as me:

  1. Don't connect to SQL as dba (connect as a normal user).
  2. This link guides you on how to connect to SQL as a normal user How to create a user in Oracle and grant permissions
Community
  • 1
  • 1
gjjhhh_
  • 169
  • 3
  • 21
  • Here is oracle docs for creating user [oracle](http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_8003.htm#SQLRF01503) – gjjhhh_ Sep 19 '16 at 07:52