Travis Tran

Travis Tran

BREAKTHROUGH the limits

Restoring database from .mdf and .ldf files of SQL Server 2008

  1. First Put the .mdf and .ldf file in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\ folder
  2. Then go to sql software , Right-click “Databases” and click the “Attach” option to open the Attach Databases dialog box
  3. Click the “Add” button to open and Locate Database Files From C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\folder
  4. Click the “OK” button. SQL Server Management Studio loads the database from the .MDF file.

Continue reading

Solving SQL Server Connection Problem

Inspect Server Settings

There are three significant aspects that users may neglect, which lead to the failure of the connection to the SQL Server.

Enable TCP/IP Connection

To check whether your server enabled to TCP/IP connections:

Continue reading

Uninstall Oracle DB on Windows completely

Manually

  1. START -> RUN -> Services.msc
  2. Locate all Ora* services & click on STOP
  3. Start -> RUN -> Regedit
  4. Locate HKEY_LOCAL_MACHINE folder in the registry
  5. Open Software folder
  6. Delete the Oracle folder under Software
  7. Open System folder in HKEY_LOCAL_MACHINE
  8. Open CurrentControlSet folder within the System folder
  9. Open Services
  10. Delete all keys related to Oracle. Every key starts with “ORA..”
  11. Close the regedit
  12. Delete ORACLE_HOME folder
  13. Delete the Oracle folder in Program Files
  14. Reboot

Uninstall all Oracle components using the Oracle Universal Installer (OUI).

Continue reading

Grant privilege on all objects in a Schema to a user in Oracle Database

In this example I have given select on all tables in schema test1 to user test2. As well grant all DML privilege on tables and views, and grant execute on procedures, functions and packages in a schema test1 to user test2.

SQL> create user test1 identified by test1;
User created.
SQL> grant connect,resource to test1;
Grant succeeded.
SQL> create user test2 identified by test2;
User created.
SQL> grant connect,resource to test2;
Grant succeeded.
SQL> conn test1/test1
Connected.
SQL> create table test_table1(id number,name varchar2(30));
Table created.
SQL> create table test_table2(id number,name varchar2(30));
Table created.
SQL> show user;
USER is "TEST1"

If you want to grant select privilege:

Continue reading

Oracle database Commands

SSH vào server bằng tài khoản oracle.

Truy cập công cụ sqlplus, đăng nhập quyền sysdba:

sqlplus / as sysdba

Thông thường, có thể lệnh sqlplus có thể sẽ không tồn tại trong session hiện tại, bạn cần thực hiện câu lệnh sau để áp dụng biến môi trường (xem trong bài Install Oracle 11g R2 on CentOS):

Continue reading

Backup MySQL database with mysqldump

Option 1: mysqldump an entire mysql instance

Everything written in one file: table structures, indexes, triggers, stored procedures, users, encrypted passwords. Other mysqldump options can also export different styles of INSERT commands, log file and position coordinates from binary logs, database creation options, partial data (–where option), and so forth.

mysqldump -h... -u... -p... --hex-blob --routines --triggers --all-databases | gzip > MySQLData.sql.gz

Continue reading

Where Do Cross-Platform App Frameworks Stand in 2019?

As iOS and Android become the most used mobile platforms (with Windows and Blackberry’s beating retreat of sorts), cross-platform app frameworks have certainly risen to popularity. With their ability to kill two birds with one stone (in this case iOS and Android) these frameworks have become the new favorite of developers as well as businesses.

Continue reading
X
Welcome to travistran.me
Welcome to TravisBot
wpChatIcon