想要为登录,用户和角色生成脚本。 。 。 。 。 [英] want to generate scripts for login, users and roles . . . . .

查看:64
本文介绍了想要为登录,用户和角色生成脚本。 。 。 。 。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们,



我想为sql server 2005中的数据库中的所有登录,用户和角色生成脚本,我已经在谷歌中查了但是我无法得到确切的信息,请在此建议我..



目的: -

== === === < br $>


必须在其他服务器上创建相同的登录,用户和角色。











谢谢和最好的Regard's,

Thrilok,

DBA。

解决方案



根据您的解释,根据您的解释,您希望将数据从一个数据库迁移到其他数据库。

有几种方法可以做到这一点,下面是一些选项:



选项1 - 右键单击​​要复制的数据库

选择'任务'> '生成脚本'

'选择特定数据库对象'

选中'表'

标记'保存到新查询窗口'

点击'高级'

将'脚本数据类型'设置为'架构和数据'

下一步,下一步

你现在可以在新数据库上运行生成的查询。



选项2

右键单击要复制的数据库

'任务'> '导出数据'

下一步,下一步

选择要将表复制到的数据库

标记'从一个或多个表或视图复制数据'

选择你要复制的表格

完成



选项3:

您可以使用链接服务器。有关详细信息,请访问

http://msdn.microsoft.com/en -IN / library / ms188279.aspx [ ^ ]

Dear Friends,

I want to generate the scripts for all logins, users and roles in a database in sql server 2005, i have checked in google also but i could not get exact information please suggest me on this ..

Purpose:--
== === ===

Have to create the same logins, users and roles in other server.





Thanks & best Regard's,
Thrilok,
DBA.

解决方案

Hi,
As per my understanding according to your explaination, you want to migrate data from one database to other databse.
There are several ways to do this, below are some options:

Option 1 - Right click on the database you want to copy
Choose 'Tasks' > 'Generate scripts'
'Select specific database objects'
Check 'Tables'
Mark 'Save to new query window'
Click 'Advanced'
Set 'Types of data to script' to 'Schema and data'
Next, Next
You can now run the generated query on the new database.

Option 2
Right click on the database you want to copy
'Tasks' > 'Export Data'
Next, Next
Choose the database to copy the tables to
Mark 'Copy data from one or more tables or views'
Choose the tables you want to copy
Finish

Option 3 :
You can use the Linked Server. For more detail please visit
http://msdn.microsoft.com/en-IN/library/ms188279.aspx[^]


这篇关于想要为登录,用户和角色生成脚本。 。 。 。 。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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