如何通过sql developer连接到sql数据库?

时间:2022-06-20 01:44:34

So, I have a .sql file that I have downloaded and was wondering how I connect to it via sql developer which I have also downloaded. Do I need to create a connection with hostname and port etc? can I just connect to a file manually/directly or something?

所以,我有一个.sql文件,我已经下载,并想知道我如何通过sql开发人员连接到它,我也下载了。我是否需要创建与主机名和端口等的连接?我可以手动/直接连接到文件或什么?

Also, can anyone recommend a good database to practice/learn on for a beginner? Should I just download oracle 11g and play around with that?

此外,任何人都可以推荐一个好的数据库来为初学者练习/学习吗?我应该只下载oracle 11g并玩一下吗?

Thanks.

2 个解决方案

#1


0  

You cannot connect to a .sql file because it is not a database. Oracle runs as a server in its own right. If you do not already have access to a server then you will need to get one.

您无法连接到.sql文件,因为它不是数据库。 Oracle本身作为服务器运行。如果您还没有访问服务器,则需要获取服务器。

Fortunately, Oracle publishes a server you can use free of charge that will help get you into the swing of things. Have a look at Oracle Lite

幸运的是,Oracle发布了一个免费使用的服务器,可以帮助您解决问题。看看Oracle Lite

I think you might find it quite a challenge getting yourself set up with a development environment but if you are patient and determined you can get there. Once you have a server to play with you can start to experiment with Sql, which is the language you use to interrogate the database.

我认为你可能会发现自己设置一个开发环境是一个很大的挑战,但如果你有耐心并且有决心,你就可以到达那里。一旦你有一个服务器可以玩,你可以开始尝试使用Sql,这是用来询问数据库的语言。

Best of luck.

祝你好运。

#2


0  

You'll need the SID as well as the ip address and port number (typically 1521) that tns listener is listening on.

您将需要SID以及tns侦听器正在侦听的IP地址和端口号(通常为1521)。

Once you've connected, you'll be able to run your sql file against that database.

连接后,您将能够针对该数据库运行sql文件。

And yes, it would be a good idea to have a good understanding of Oracle before wandering off blindly into the world of database access (.sql files, for example)

是的,在盲目地进入数据库访问世界(例如.sql文件)之前,对Oracle有一个很好的理解是个好主意。

#1


0  

You cannot connect to a .sql file because it is not a database. Oracle runs as a server in its own right. If you do not already have access to a server then you will need to get one.

您无法连接到.sql文件,因为它不是数据库。 Oracle本身作为服务器运行。如果您还没有访问服务器,则需要获取服务器。

Fortunately, Oracle publishes a server you can use free of charge that will help get you into the swing of things. Have a look at Oracle Lite

幸运的是,Oracle发布了一个免费使用的服务器,可以帮助您解决问题。看看Oracle Lite

I think you might find it quite a challenge getting yourself set up with a development environment but if you are patient and determined you can get there. Once you have a server to play with you can start to experiment with Sql, which is the language you use to interrogate the database.

我认为你可能会发现自己设置一个开发环境是一个很大的挑战,但如果你有耐心并且有决心,你就可以到达那里。一旦你有一个服务器可以玩,你可以开始尝试使用Sql,这是用来询问数据库的语言。

Best of luck.

祝你好运。

#2


0  

You'll need the SID as well as the ip address and port number (typically 1521) that tns listener is listening on.

您将需要SID以及tns侦听器正在侦听的IP地址和端口号(通常为1521)。

Once you've connected, you'll be able to run your sql file against that database.

连接后,您将能够针对该数据库运行sql文件。

And yes, it would be a good idea to have a good understanding of Oracle before wandering off blindly into the world of database access (.sql files, for example)

是的,在盲目地进入数据库访问世界(例如.sql文件)之前,对Oracle有一个很好的理解是个好主意。