Showing posts with label users. Show all posts
Showing posts with label users. Show all posts

Thursday, March 29, 2012

Correct Setup for SQL Server 2005 for web project!

Ive been trying to get some type of Blogpost tutorial Etc on how to set up SQL Server 2005 to serve data to a website

1 How do I setup users?
a) Can I have 3 roles?
1a) Owner of DB can read/write

2a) reader Can Only read from database

3a) Writer. Can only write to database

How would I set this up? How can I call all these from ASP.NET depending on what the user is currently using on the website?

eg:

Just serving pages with content (reader)
Forms (writter)
admin (owner)

I also need to have the SQL keep sessions (Ive already ran aspnet_reqSQL.exe) and created all that im just unsure what type user can access all this

Any tutorials on how to set up a whole WEb application project from DB to VS 2005?

Thanks


Bump

No one knows how to correctly setup SQL Server?

|||

So no one know how to setup SQL Server 2005 efficiently and securely???????

*Sight*

|||

a) Can I have 3 roles?
1a) Owner of DB can read/write

2a) reader Can Only read from database

3a) Writer. Can only write to database

After you have installed sql server,you can create some user accounts and assign them permissions as you like. Open sql server-> select one database and expand-->select "security"--> click "Users" or "Roles"

sql

Tuesday, March 27, 2012

Copying/ Deleting Huge Data from a table

Hi,
I have a problem about "userlogs" table . this table contains some
information about users actions .The table has nearly 800.000.000 record in
it and ~100Gb data , 50GB index.
i have tried to copy some data ( like 1M records) to a temporary database, i
couldnt manage it
This is the query , the table has a index contains only "id"
declare @.start_index int, @.end_index int
set @.start_index = 800000050
set @.end_index = 800000250
insert into userlogsbackup select * from userlogs where id > @.start_index
and id < @.end_index
but the select fails unless specifying "top 10" for example. What else can
i try ?
Thanks in advanceIf the index is not clustered then it can't do a range scan without also
doing bookmark lookups for each row found. So the more rows you will touch
the less the chances of using the index. But in your case the optimizer does
not know how many rows will be affected since it does not know the values of
the two variables. As such it guesses and the guess for a range is quite a
large percentage (can't remember off hand) which will negate the use of an
index s. Do you get the proper plan if you hard code the two values?
You can try creating a stored procedure that has the two values as
parameters. That way the optimizer will use the actual values passed the
first time to create the plan. Does it work with a TOP 250?
Andrew J. Kelly SQL MVP
"Hasan O." <hozavalsiz@.gmail.com> wrote in message
news:esQBHkKgGHA.1264@.TK2MSFTNGP05.phx.gbl...
> Hi,
> I have a problem about "userlogs" table . this table contains some
> information about users actions .The table has nearly 800.000.000 record
> in it and ~100Gb data , 50GB index.
> i have tried to copy some data ( like 1M records) to a temporary database,
> i couldnt manage it
> This is the query , the table has a index contains only "id"
> declare @.start_index int, @.end_index int
> set @.start_index = 800000050
> set @.end_index = 800000250
>
> insert into userlogsbackup select * from userlogs where id >
> @.start_index and id < @.end_index
> but the select fails unless specifying "top 10" for example. What else
> can i try ?
> Thanks in advance
>|||Hi Andrew ,
thanks for your answer.
yes index is not clustered . it doesnt work with top 70 .
I think i am gonna write while loop for selecting , and inserting one by one
like this
while @.start_index and < @.end_index
begin
1
2 insert into userlogsbackup select * from userlogs where id =
@.start_index
3 delete from userlogs where id = @.start_index
4 set @.start_index = @.start_index + 1
5
end
i am also thinking to use "begin transaction and commit transaction" . Can
you tell me if which lines transactions contains
thanks again
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:uaZyrgLgGHA.4940@.TK2MSFTNGP05.phx.gbl...
> If the index is not clustered then it can't do a range scan without also
> doing bookmark lookups for each row found. So the more rows you will touch
> the less the chances of using the index. But in your case the optimizer
> does not know how many rows will be affected since it does not know the
> values of the two variables. As such it guesses and the guess for a range
> is quite a large percentage (can't remember off hand) which will negate
> the use of an index s. Do you get the proper plan if you hard code the
> two values? You can try creating a stored procedure that has the two
> values as parameters. That way the optimizer will use the actual values
> passed the first time to create the plan. Does it work with a TOP 250?
>
> --
> Andrew J. Kelly SQL MVP
>
> "Hasan O." <hozavalsiz@.gmail.com> wrote in message
> news:esQBHkKgGHA.1264@.TK2MSFTNGP05.phx.gbl...
>|||Maybe if you post the actual DDL for the table including all the indexes and
tell us exactly what you are tyring to accomplish we can suggest something
better. Do you want to move any 1 million rows or a specific set? Is this a
one time thing or will it be repeated? Can it be done in off hours?
Andrew J. Kelly SQL MVP
"Hasan O." <hozavalsiz@.gmail.com> wrote in message
news:eJs5eNMgGHA.1264@.TK2MSFTNGP05.phx.gbl...
> Hi Andrew ,
> thanks for your answer.
> yes index is not clustered . it doesnt work with top 70 .
> I think i am gonna write while loop for selecting , and inserting one by
> one like this
> while @.start_index and < @.end_index
> begin
> 1
> 2 insert into userlogsbackup select * from userlogs where id =
> @.start_index
> 3 delete from userlogs where id = @.start_index
> 4 set @.start_index = @.start_index + 1
> 5
> end
> i am also thinking to use "begin transaction and commit transaction" . Can
> you tell me if which lines transactions contains
> thanks again
>
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:uaZyrgLgGHA.4940@.TK2MSFTNGP05.phx.gbl...
>|||>but the select fails unless specifying "top 10" for example.
What is the exact nature of the failure? What error code and message
is returned? Or is it simply taking a long time?
Roy Harvey
Beacon Falls, CT
On Fri, 26 May 2006 12:44:41 +0300, "Hasan O." <hozavalsiz@.gmail.com>
wrote:

>Hi,
>I have a problem about "userlogs" table . this table contains some
>information about users actions .The table has nearly 800.000.000 record in
>it and ~100Gb data , 50GB index.
>i have tried to copy some data ( like 1M records) to a temporary database,
i
>couldnt manage it
>This is the query , the table has a index contains only "id"
>declare @.start_index int, @.end_index int
>set @.start_index = 800000050
>set @.end_index = 800000250
>
>insert into userlogsbackup select * from userlogs where id > @.start_index
>and id < @.end_index
>but the select fails unless specifying "top 10" for example. What else can
>i try ?
>Thanks in advance
>|||"Roy Harvey" <roy_harvey@.snet.net> wrote in message
news:cu3e72d978qc99vfo1mclnqhudtgh31r71@.
4ax.com...
> What is the exact nature of the failure? What error code and message
> is returned? Or is it simply taking a long time?
taking too much time so i cancel the query.
i am using one by one move operation now .
thanks for the answer.

Sunday, March 25, 2012

Copying users to new server

I'm new to SQL server and am installing a new server that I will be copying
from a old server to new. I've restored the databases but am trying to cop
y
over the users and security.
Is there a simple way to copy over the users and security to the new server?> I'm new to SQL server and am installing a new server that I will be
copying
> from a old server to new. I've restored the databases but am trying to
copy
> over the users and security.
> Is there a simple way to copy over the users and security to the new
server?
Yes, script them. In EM, right-click on your database, select All Tasks -
Generate SQL Script; on the Options tab, select
Script database users and database roles and
Script object-level permissions.
Generate the script and execute it in your new db.
BTW, I suppose you have the same logins.
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com|||Dejan
I think although he/she has the same logins moving users to the new server
may cause the problem due to the different SID of the logins.
I'd go with two stored procedures provided by Microsoft to move logins.
"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si> wrote in
message news:eeySs4qLFHA.2988@.TK2MSFTNGP14.phx.gbl...
> copying
> copy
> server?
> Yes, script them. In EM, right-click on your database, select All Tasks -
> Generate SQL Script; on the Options tab, select
> Script database users and database roles and
> Script object-level permissions.
> Generate the script and execute it in your new db.
> BTW, I suppose you have the same logins.
> --
> Dejan Sarka, SQL Server MVP
> Associate Mentor
> www.SolidQualityLearning.com
>|||http://support.microsoft.com/defaul...kb;en-us;246133
"kcsheff" wrote:
[vbcol=seagreen]
> I'm new to SQL server and am installing a new server that I will be copyin
g
> from a old server to new. I've restored the databases but am trying to c
opy
> over the users and security.
> Is there a simple way to copy over the users and security to the new server?[/vbco
l]

Copying users from one database to another

how do i copy all the users, roles, permissions etc from on database to
another database?JT
Not easy task. If you have the same structure of the database the best thing
will be restoring the database with a different name
Otherwise, you will have to generate a script for adding users to be mapped
with the logins
sp_grantdbaccess @.login
sp_addrolemember 'db_owner',@.login
"JT" <col@.newsgroup.nospam> wrote in message
news:ec9iL$pNGHA.2884@.TK2MSFTNGP12.phx.gbl...
> how do i copy all the users, roles, permissions etc from on database to
> another database?

copying users between roles

I would like to copy all users currently from RoleA into RoleB. I know there
must be a nice way to script this. Any ideas?Robert
There is no a "nice" script to move users from one Role to another at least
I am not aware.
You will have to deal with system tables that hold the info about users but
it is not recommended.
"Robert Kinesta" <RobertKinesta@.discussions.microsoft.com> wrote in message
news:66EA482B-0FD9-49A9-B049-6CADCA5B5BD1@.microsoft.com...
>I would like to copy all users currently from RoleA into RoleB. I know
>there
> must be a nice way to script this. Any ideas?|||Hi Robert,
This may help u......a nice script to move all users from roleA to roleB
create table #users (
UserName sysname,
GroupName sysname,
LoginName sysname,
DefDBName sysname,
UserID smallint,
SID smallint
)
insert #users
exec('sp_helpuser')
select identity(int,1,1) as idn, * into #usersInRoleA from #users where
GroupName like 'roleA'
declare @.i as int,
@.maxusers as int,
@.username as sysname
select @.maxusers = max(idn) from #usersInRoleA
set @.i = 1
while (@.i <= @.maxusers)
begin
select @.username = username from #usersInRoleA where idn = @.i
exec sp_addrolemember 'roleB',@.username
exec sp_droprolemember 'roleA',@.username
set @.i = @.i + 1
end
drop table #usersInRoleA
drop table #users
enjoy and keep going...
"Robert Kinesta" wrote:

> I would like to copy all users currently from RoleA into RoleB. I know the
re
> must be a nice way to script this. Any ideas?|||Hi Robert
Maybe something like:
CREATE TABLE #Rolemembers ( DbRole sysname,
MemberName sysname,
MemberSID varbinary(85) )
INSERT INTO #Rolemembers ( DbRole, MemberName, MemberSID )
EXEC sp_helprolemember 'ISDLOAD_ROLE'
DECLARE @.member sysname
DECLARE Member_Cursor CURSOR FOR SELECT MemberName FROM #Rolemembers
OPEN Member_Cursor
FETCH NEXT FROM Member_Cursor INTO @.member
WHILE @.@.FETCH_STATUS = 0
BEGIN
EXEC sp_executesql N'EXEC sp_addrolemember @.rolename= ''ROLEB'' ,
@.membername = @.membernm' ,
N'@.membernm sysname',
@.membernm = @.member
FETCH NEXT FROM Member_Cursor INTO @.member
END
CLOSE Member_Cursor
DEALLOCATE Member_Cursor
DROP TABLE #Rolemembers
John
"Robert Kinesta" wrote:

> I would like to copy all users currently from RoleA into RoleB. I know the
re
> must be a nice way to script this. Any ideas?

Tuesday, March 20, 2012

copying sql server logins and users

Hi All,
I have a user database with 20 users. I have to transfer this database to some other location (location B) with the user and login, so that others would be able to login (assuming i have provided them username and pwd for logging). I can take the backup of the database, which can be restored at location b, in which the users will also be available.
Now my question i
Is there a mechansim to copy sql server logins also, such that, when the database is restored at location b, the users will be able to simply login...
Thanks
GYKThis should help
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q246133&
Ray Higdon MCSE, MCDBA, CCNA
--
"GYK" <anonymous@.discussions.microsoft.com> wrote in message
news:40A125DF-6C22-48DA-9780-DA7A7ED52B5E@.microsoft.com...
> Hi All,
> I have a user database with 20 users. I have to transfer this database to
some other location (location B) with the user and login, so that others
would be able to login (assuming i have provided them username and pwd for
logging). I can take the backup of the database, which can be restored at
location b, in which the users will also be available.
> Now my question is
> Is there a mechansim to copy sql server logins also, such that, when the
database is restored at location b, the users will be able to simply
login...
> Thanks
> GYK

Copying SQL logins to new Domain

Good day!
I have 2 SQL 2000 Servers, in a NT4 domain, that will be staying tehre
for the time being. But I am starting to move users from that domain
to an AD domain. We are doing them bit by bit. I want the Windows
Authentication-based SQL Logins to move over so that I don't have to
re-create the logins.
What is the best way to do this, assuming I want to do them slowly?
Thanks.Have you considered creating Groups on the new domain, give the groups the
relevant SQL permissions and when you're ready to migrate a user simply add
him to the new group.
HTH
Ryan Waight, MCDBA, MCSE
"Bob" <Bob@.nospam.com> wrote in message
news:nkkfqvg1fvjnc0j8lu9l8c2i2trtvvf8jq@.4ax.com...
> Good day!
> I have 2 SQL 2000 Servers, in a NT4 domain, that will be staying tehre
> for the time being. But I am starting to move users from that domain
> to an AD domain. We are doing them bit by bit. I want the Windows
> Authentication-based SQL Logins to move over so that I don't have to
> re-create the logins.
> What is the best way to do this, assuming I want to do them slowly?
> Thanks.
>|||I suppose I could do that. But is there a way to do what I am looking
to do?
On Tue, 4 Nov 2003 16:52:42 -0000, "Ryan Waight"
<Ryan_Waight@.nospam.hotmail.com> wrote:
>Have you considered creating Groups on the new domain, give the groups the
>relevant SQL permissions and when you're ready to migrate a user simply add
>him to the new group.|||Bob wrote:
> Good day!
> I have 2 SQL 2000 Servers, in a NT4 domain, that will be staying tehre
> for the time being. But I am starting to move users from that domain
> to an AD domain. We are doing them bit by bit. I want the Windows
> Authentication-based SQL Logins to move over so that I don't have to
> re-create the logins.
> What is the best way to do this, assuming I want to do them slowly?
you might try running sp_help_revlogin and then editing the script to your
liking.|||Hi Bob,
Thank you for using MSDN Newsgroup! It's my pleasure to assist you with your issue.
From your description, I understand that you would like to transfer the Windows Authentication
Logins and passwords to a new AD domain between the instances of SQL Server. Have I fully
understood you? If there is anything I misunderstood, please feel free to let me know.
I agree with Chxxx that you can create sp_help_revlogin stored procedure on the source
server, which this procedure generates a script that you can run on the destination server to re-
create logins with the original security identification number (SID) and retain the current
passwords.
For how to transfer Logins and Passwords between SQL Server 2000, please refer to the
following step by step articles:
246133 HOW TO: Transfer Logins and Passwords Between Instances of SQL Server
http://support.microsoft.com/?id=246133
240872 HOW TO: Resolve Permission Issues When You Move a Database Between
http://support.microsoft.com/?id=240872
274188 PRB: "Troubleshooting Orphaned Users" Topic in Books Online is Incomplete
http://support.microsoft.com/?id=274188
Bob, does this answer your question? Please apply the suggestion above and let us know if it
helps you resolve your problem. If there is anything more we can assist you with, please feel
free to post it in the group.
Best regards,
Billy Yao
Microsoft Online Partner Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.|||> From your description, I understand that you would like to transfer the
Windows Authentication
> Logins and passwords to a new AD domain between the instances of SQL
Server. Have I fully
> understood you? If there is anything I misunderstood, please feel free to
let me know.
If Bob is interested in the Windows authentication logins, why would he like
to transfer the passwords?
One of the problems with migrating the NT user accounts to AD how to deal
with the following scenario:
1. NT user NTDomain\myUser is migrated to ADDomain\myUser (likely with
SIDHistory)
2. The SID of NTDomain\myUser is different from ADDomain\myUser
3. The system tables sysxlogins and sysusers still store the SID for
NTDomain\myUser
4. If the NTDomain domain is completely disabled, SIDHistory will not be
useful any more
(Note, not being an AD migration expert, I don't know whether you can
migrate NT user accounts to AD without assigning them new SIDs. It's not how
we are migrating user account anyway.)
--
Linchi Shea
linchi_shea@.NOSPAMml.com
"Billy Yao [MSFT]" <v-binyao@.online.microsoft.com> wrote in message
news:7GUTrC0oDHA.2148@.cpmsftngxa06.phx.gbl...
> Hi Bob,
> Thank you for using MSDN Newsgroup! It's my pleasure to assist you with
your issue.
> From your description, I understand that you would like to transfer the
Windows Authentication
> Logins and passwords to a new AD domain between the instances of SQL
Server. Have I fully
> understood you? If there is anything I misunderstood, please feel free to
let me know.
> I agree with Chxxx that you can create sp_help_revlogin stored procedure
on the source
> server, which this procedure generates a script that you can run on the
destination server to re-
> create logins with the original security identification number (SID) and
retain the current
> passwords.
> For how to transfer Logins and Passwords between SQL Server 2000, please
refer to the
> following step by step articles:
> 246133 HOW TO: Transfer Logins and Passwords Between Instances of SQL
Server
> http://support.microsoft.com/?id=246133
> 240872 HOW TO: Resolve Permission Issues When You Move a Database Between
> http://support.microsoft.com/?id=240872
> 274188 PRB: "Troubleshooting Orphaned Users" Topic in Books Online is
Incomplete
> http://support.microsoft.com/?id=274188
>
> Bob, does this answer your question? Please apply the suggestion above and
let us know if it
> helps you resolve your problem. If there is anything more we can assist
you with, please feel
> free to post it in the group.
>
> Best regards,
>
> Billy Yao
> Microsoft Online Partner Support
> ----
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only. Thanks.
>
>|||Hi Bob,
I agree with Linchi's comments and thanks for his reminder.
If you transfer logins to an instance of SQL Server in a different domain than the source
instance of SQL Server, you should edit the script generated by the sp_help_revlogin
procedure, and REPLACE the domain name with the new domain in the sp_grantlogin
statements. Because the integrated logins granted access in the new domain will not have the
same SID as the logins in the original domain, the database users will be orphaned from
these logins.....
This is announced in the "Remarks" of the KB 246133. I recommend you review the remarks
carefully before you apply this logins transference, so that you will not miss some important
points you should pay attention to.
246133 HOW TO: Transfer Logins and Passwords Between Instances of SQL Server
http://support.microsoft.com/?id=246133
If there is anyting unclear or anything more I can assist you with, please feel free to post it in the
group.
Best regards,
Billy Yao
Microsoft Online Partner Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.

Copying Reports in Report Manager

Is it possible to create a copy of a report in the report manager?
I want to be able to deploy one copy of the report and have users create
multliple copies - each with their own default parameter and name.You can use the Web Service CreateReport method.
Check out this link http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/RSPROG=
/htm/rsp_ref_soapapi_service_ak_1xfd.asp
You will have to manipulate the rdl file from code.
>--Original Message--
>Is it possible to create a copy of a report in the report
manager?
>I want to be able to deploy one copy of the report and
have users create >multliple copies - each with their own default parameter
and name.
>.
>sql

Thursday, March 8, 2012

copying data from Microsoft Access to SQL Server

Hello

I am developing a web application that will allow users to upload a .mdb file and from that file I need to populate an SQL database. I know the table name of the .mdb file, but I am unclear how to structure my data access layer correctly. How do I pull data from the .mdb file and once I have it how do i populate the SQL database?

Any advice would be greatly appreciated.


thanks!

There is one problem with moving Access data on the fly Access let people to just point and click what they wish, if that is your situation you need DTS because in SQL Server your data must be clean and relational. So if you have clean table definitions and clean inserts you could just use OpenRowset or OpenQuery. If not then DTS is your friend. So check your setup and post specifics so I can give you the resources as needed. Hope this helps.

Saturday, February 25, 2012

Copying "My Reports" between users.

Is there a way to copy a report saved in a users "My Reports" folder to a different users folder? If so what permissions and roles do I need to be in?Using the default settings no user has enough permissions to do this. You would need each user to give you permission or you need to go in as an admin (local RS box admin) and modify the security permissions to give yourself permission.

Friday, February 24, 2012

Copy without Locks

I have a stored procedure which copies data from a view into a
temporary table (x2) and then from the temporary table into a table
which the users use. It takes 1 minute to get the data into the temp
table and seconds to update into the final one (hence the two stages).

When I do the initial copy from the view, it locks the various tables
used in the view and potentially blocks the users. It's a complex view
and uses plenty of other tables. We get massive performance issues
'generating' the data into a table as opposed to the view.

What I want to do is take all the data without locking it. I don't
want to modify the data, just read it and stick the data into a table.

Thanks

Ryan

SQL as follows :

/*Drop into temp tables first and then proper ones later as this
works out a lot less time when no data will be available*/

TRUNCATE TABLE MISGENERATE.dbo.CBFA_MISDATATemp -- Temp Table
TRUNCATE TABLE MISGENERATE.dbo.CBFA_MISPIPDATATemp -- Temp Table

INSERT INTO MISGENERATE.dbo.CBFA_MISDATATemp
SELECT * FROM MIS.dbo.CBFA_MISDATA -- View

INSERT INTO MISGENERATE.dbo.CBFA_MISPIPDATATemp
SELECT * FROM MIS.dbo.CBFA_MISPIPDATA -- View

/*Now drop this into full MIS tables for speed*/

TRUNCATE TABLE MISGENERATE.dbo.CBFA_MISDATA
TRUNCATE TABLE MISGENERATE.dbo.CBFA_MISPIPDATA

INSERT INTO MISGENERATE.dbo.CBFA_MISDATA -- Final Table
SELECT * FROM MISGENERATE.dbo.CBFA_MISDATATemp

INSERT INTO MISGENERATE.dbo.CBFA_MISPIPDATA -- Final Table
SELECT * FROM MISGENERATE.dbo.CBFA_MISPIPDATATempRyan (ryanofford@.hotmail.com) writes:
> What I want to do is take all the data without locking it. I don't
> want to modify the data, just read it and stick the data into a table.

You can say things like:

SELECT * FROM tbl WITH (NOLOCK)

although, I am uncertain how this works with a view.

You should be very careful with NOLOCK. Using NOLOCK may save you from
users screaming because they are blocked, but since you are reading
uncommitted data, you may produce incorrect or incoherent results. The
users may not scream about this - they will just make incorrect decisions
because of bad input.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Copy users between databases

Hello All,
I used DTS to copy one database to a blank database for a backup of the
database. A duplicate database.
How do I copy over the user logins to the new database.
This did not happen with DTS.
The databases are on the same instance of SQL.
Any help appreciated.
Thanks,
Terry
tgwillett@.cox.netRun this on the database to autofix users
select 'exec sp_change_users_login ''Auto_Fix'', ''' + name + '''' from
sysusers
where name not in ('INFORMATION_SCHEMA', 'dbo', 'guest', 'public')
"Terry" wrote:

> Hello All,
> I used DTS to copy one database to a blank database for a backup of the
> database. A duplicate database.
> How do I copy over the user logins to the new database.
> This did not happen with DTS.
> The databases are on the same instance of SQL.
> Any help appreciated.
> Thanks,
> Terry
> tgwillett@.cox.net
>
>

Copy users between databases

Hello All,
I used DTS to copy one database to a blank database for a backup of the
database. A duplicate database.
How do I copy over the user logins to the new database.
This did not happen with DTS.
The databases are on the same instance of SQL.
Any help appreciated.
Thanks,
Terry
tgwillett@.cox.netThis is a pretty good article on it:
http://support.microsoft.com/defaul...kb;en-us;246133
Christian
"Terry" <tgwillett@.cox.net> wrote in message
news:r_62g.56456$gE.9859@.dukeread06...
> Hello All,
> I used DTS to copy one database to a blank database for a backup of the
> database. A duplicate database.
> How do I copy over the user logins to the new database.
> This did not happen with DTS.
> The databases are on the same instance of SQL.
> Any help appreciated.
> Thanks,
> Terry
> tgwillett@.cox.net
>

Copy users between databases

Hello All,
I used DTS to copy one database to a blank database for a backup of the
database. A duplicate database.
How do I copy over the user logins to the new database.
This did not happen with DTS.
The databases are on the same instance of SQL.
Any help appreciated.
Thanks,
Terry
tgwillett@.cox.netThis is a pretty good article on it:
http://support.microsoft.com/default.aspx?scid=kb;en-us;246133
Christian
"Terry" <tgwillett@.cox.net> wrote in message
news:r_62g.56456$gE.9859@.dukeread06...
> Hello All,
> I used DTS to copy one database to a blank database for a backup of the
> database. A duplicate database.
> How do I copy over the user logins to the new database.
> This did not happen with DTS.
> The databases are on the same instance of SQL.
> Any help appreciated.
> Thanks,
> Terry
> tgwillett@.cox.net
>

Sunday, February 19, 2012

COPY TABLE users AS usersCopy WHERE UserId > 500 ?

I must extract rows (with criteria) from a table with a few millions of rows in MS SQL 2000
Is there a way to COPY a table ?
if so is there a way to COPY it in a more selective way ?
something like :
COPY TABLE users AS usersCopy WHERE UserId > 500
thank youselect * into usersCopy from Users where UserId >500|||that is what I call 100% GENIAL !!!

thanks 1000 ton !

Monday, February 13, 2012

Copy SQL Users from a server to another

Hi,
We are using a SQL 2000 Std Server on a Windows 2000
Server. I just install a new Server running with Windows
2003 Standart and i installed SQL 2000 Std on it.
When i go into Enterprise Manager, On Security folder and
Logins tabs, i saw all the users that needs access to wich
DB etc.
I want to copy all this security information to my new SQL
Server... how did i do that?
thanks!Hi,
Have a look into the below link.
http://www.databasejournal.com/feat...cle.php/2228611
Thanks
Hari
MCDBA
"GuillauG" <Guillaume.Genest@.qc.teknion.com> wrote in message
news:2b4501c42875$89e027b0$a601280a@.phx.gbl...
> Hi,
> We are using a SQL 2000 Std Server on a Windows 2000
> Server. I just install a new Server running with Windows
> 2003 Standart and i installed SQL 2000 Std on it.
> When i go into Enterprise Manager, On Security folder and
> Logins tabs, i saw all the users that needs access to wich
> DB etc.
> I want to copy all this security information to my new SQL
> Server... how did i do that?
> thanks!|||Hi,
Thank, from your link i find this link:
http://www.databasejournal.com/feat...l/article.php/2
228611
Really easier for me than using sp_ function.
But after i follow the instruction on this web site i got
an "Unspecified error" while running the task. But all my
users seems to have been copied...
Someone know why i get this error?
Thanks!
>--Original Message--
>Hi,
>Have a look into the below link.
>http://www.databasejournal.com/feat...ql/article.php/
2228611
>Thanks
>Hari
>MCDBA
>
>"GuillauG" <Guillaume.Genest@.qc.teknion.com> wrote in
message
>news:2b4501c42875$89e027b0$a601280a@.phx.gbl...
and[vbcol=seagreen]
wich[vbcol=seagreen]
SQL[vbcol=seagreen]
>
>.
>|||Hi Guillaume,
You can transfer logins and passwords between instances following the
suggestions mentioned below:
246133 HOW TO: Transfer Logins and Passwords Between Instances of SQL Server
http://support.microsoft.com/?id=246133
If there is any thing unclear, please feel free to let me know.
Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.|||I already saw that article, but when i want to copy users
from one Server to another i got an "Unspecified error"
while running the task. But all the users seems to have
been copied...
any suggestion?

>--Original Message--
>Hi Guillaume,
>You can transfer logins and passwords between instances
following the
>suggestions mentioned below:
>246133 HOW TO: Transfer Logins and Passwords Between
Instances of SQL Server
>http://support.microsoft.com/?id=246133
>If there is any thing unclear, please feel free to let me
know.
>Regards,
>Michael Shao
>Microsoft Online Partner Support
>Get Secure! - www.microsoft.com/security
>This posting is provided "as is" with no warranties and
confers no rights.
>.
>|||Hi Guillaume,
Please check the following article to see if it is able to fix your
problem.
305365 PRB: DTS Package Fails with "Unspecified Error" Error Message When
You
http://support.microsoft.com/?id=305365
If not, please provide the detailed repro steps so that I can reproduce
this problem on my side and perform further research.
Thank you,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.|||Thanks a lot. This is exactly my problems...
how bizzarre that they don't edit this error message to
give us something more specific :P

>--Original Message--
>Hi Guillaume,
>Please check the following article to see if it is able
to fix your
>problem.
>305365 PRB: DTS Package Fails with "Unspecified Error"
Error Message When
>You
>http://support.microsoft.com/?id=305365
>If not, please provide the detailed repro steps so that I
can reproduce
>this problem on my side and perform further research.
>Thank you,
>Michael Shao
>Microsoft Online Partner Support
>Get Secure! - www.microsoft.com/security
>This posting is provided "as is" with no warranties and
confers no rights.
>.
>