我们如何在服务器上执行SQL Server查询 [英] how we can execute sql server query on the server

查看:301
本文介绍了我们如何在服务器上执行SQL Server查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我们如何在服务器上执行sql语句.....现在,我正在本地主机上执行sql语句,但是现在,我想在服务器上执行它.我正在使用sql server2008.任何人都可以指导我,我们如何在服务器上执行它……

Hi,
How we can execute sql statement on the server.....right now i am executing the sql statement on local host, but now, i want to execute it on server. I m using sql server 2008. any one guide me, how we execute it on the server......

推荐答案

只需连接到特定服务器并执行查询.
试试
http://www.youtube.com/watch?v=hT9p_FPt720 [ http://blog.sqlauthority .com/2011/05/19/sql-server-connecting-to-server-using-windows-authentication-by-sqlcmd/ [
Just connect to the particular server and execute the query.
Try
http://www.youtube.com/watch?v=hT9p_FPt720[^]
http://blog.sqlauthority.com/2011/05/19/sql-server-connecting-to-server-using-windows-authentication-by-sqlcmd/[^]


执行任何SQL查询时,都在SQL Server实例上执行它.为了进行开发,您在自己的计算机上使用一个实例-因此,连接字符串的"localhost"部分.

要在生产服务器上执行它,只需更改连接字符串以寻址正确的SQL Server实例.
哦,还要确保您的生产服务器上也有数据库! :laugh:
When you execute any SQL query, you are executing it on a SQL server instance. For development, you are using an instance on your own computer - hence the "localhost" part of the connection string.

To execute it on the production server, you just need to change the connection string to address the correct SQL server instance.
Oh, and make sure you have the database on the production server as well! :laugh:


这篇关于我们如何在服务器上执行SQL Server查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆