Access SQL Server Database Through Command Promt (DOS)

SQL SERVER DATABASE


Besides can be accessed through management studio, SQL Server database can also be accessed through command promt to get more fast performance, because displaying Graphical User interface can reduce the performance.


to access the SQL Server database through command promt (DOS) are as follows:

——————————————————————————————

run command promt and go into the directory where the sql server database installed


(Usually stored in the directory > C:\Program Files\Microsoft SQL Server\90\Tools\Binn)

SQL SERVER DATABASE


run SQL server database with the command as follows:

———————————————

sqlcmd.exe –S SERVER_NAME -E

———————————————

with the command above, we’re able to access the SQL server database.

SQL SERVER DATABASE

———————————————

for more options on sqlcmd.exe, type “sqlcmd.exe /?” on command promt

SQL SERVER DATABASE


try to see what databases that exist on the SQL server, use the following query :

———————————————

sp_databases;

[Enter]

go

[Enter]

———————————————

SQL SERVER DATABASE

SQL SERVER DATABASE

to see the tables in the database existing, use the following query:

———————————————

use database_name;

[Enter]

sp_tables

[Enter]

go

[Enter]

———————————————

SQL SERVER DATABASE


to exit from the SQL server database, use the following query:

———————————————

exit

[Enter]

———————————————

SQL SERVER DATABASE


so, other than through management studio, SQL Server database can also be accessed through command promt (DOS) in Windows.

Advertisements

About alamzyah
Name : Alamsyah Nick Name : Alamzyah Place of Birth : Jakarta, 04 June 1983 sex : Male Religion : Moslem Region : Jakarta, Indonesia Specialist : IT, Computer mail : alamzyah@gmail.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: