SQL 2012 :: Migrate Logins From A Copy Of Master Database

Jun 18, 2015

I am working on a Login migration issue. I have the Master database from the original database, that I have attached as a User Database, call it OriginalMaster. I also renamed the mdf and ldf files, before attaching, just in case.

I want to select the logins from the OriginalMaster, and using sp_help_revlogin script all the Logins out. I know there were many logins in that database. But what I am seeing, are all the Logins from the Current Master database. Which are only 7 Logins.

How can I select the logins, or script out the Logins from the OriginalMaster database?

View 1 Replies


ADVERTISEMENT

SQL 2012 :: Master Data Services Won't Migrate Delete Entity

Jul 24, 2015

I used "MDSModelDeploy deployclone" do deploy a package with EntityA, EntityB and EntityC to a production environment. I then deleted EntityB from my dev environment and used "MDSModelDeploy deployupdate" do update the model in prodution. After the deployUpdate, EntityB still exists in production. Is there something special I need to do (option of MDSModelDeploy?) in order for the deploy to delete an entity during a migration?

View 1 Replies View Related

How To Use Transfer SQL Object To Copy An Entire Database Including Logins And Users

Dec 14, 2007



I have read the previous threads on the bugs with this task mainly: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1438968&SiteID=1 . These are great posts that helpmed me avoid wasting time. I haven't seen one yet that addresses copying an entire database including the sql server logins.


I would like to import the ENTIRE database from one (2005) server to another(2005) using the SSIS Transfer SQL Object task (not just sprocs,tables,views and functions). I have figured out how to pull the tables,views,sprocs and functions ... by using an execute sql task to drop these objects. But I cannot get this to work for users since the user dbo cannot be dropped and guest can only be disabled. I am creating a new database (this is the database where the sql objects will be copied to) via management studio to test this. There has to ba a way to get this working ... Microsoft must have published some sort of KB article on this task or a Script Task using SMO object calls. If need be I can drop the entire database on the target machine and have SSIS recreate it.

The only reason I'm willing to take a risk with SSIS rather than backup and restore is because of time constraints (I assume the SSIS task is faster) and backup storage administration.


declare @name varchar(200)
declare @object varchar(200)
DECLARE object_cursor CURSOR READ_ONLY FORWARD_ONLY FOR
select table_name,table_type from INFORMATION_SCHEMA.TABLES
union
Select name,'SPROC' table_type from sys.procedures Where [type] = 'P' and is_ms_shipped = 0 and [name] not like 'sp[_]%diagram%'
union
select name,'FN' from sys.objects where type_desc like '%FUNCTION'
OPEN object_cursor
FETCH NEXT FROM object_cursor INTO @name,@object
IF @@FETCH_STATUS <> 0
PRINT ' <<None>>'
WHILE @@FETCH_STATUS = 0
BEGIN
if @object = 'BASE TABLE'
begin
exec ('drop table ' + @name)
end
else if @object = 'VIEW'
begin
exec ('drop view ' + @name)
end
else if @object = 'SPROC'
begin
exec ('drop procedure ' + @name)
end
else if @object = 'FN'
begin
exec ('drop function ' + @name)
end
FETCH NEXT FROM object_cursor INTO @name,@object
END
CLOSE object_cursor
DEALLOCATE object_cursor

View 4 Replies View Related

Migrate Logins To New DB

Aug 3, 2000

The vendor originally set the db up with user logins. I am migrating the db and need to know how to migrate all the logins as well.

View 2 Replies View Related

Migrate Logins And User Permissions

Jul 31, 2012

I know that there is Microsoft KB to migrate SQL Logins but it doesnt take care of Login Server level permissions or User level permissions.Idera used to have a Free tool SQLPermisions.exe but it works only on Windows XP/Vista not on Windows 7. Any third party tool (free or paid) which can migrate SQL Logins and User permissions ?

View 14 Replies View Related

SQL 2012 :: Track All Logins Onto A Single Database?

Oct 17, 2014

We have a particular database sat on SQL Server 2012 box along with about 20 other databases.

What I require is a method/Script/Audit that will simply track anyone who logs (successfully / unsuccessful) into this one particular database on the server (The single database is the key as the end user does not want information on any of the other databases that sit on the server), it also has to log time the attempt was made and it must track the logins via SQL Server or the application itself that is attached to the database.

View 1 Replies View Related

SQL 2012 :: Grant Read-only Access To Windows Logins On Remote Standby Database

Mar 23, 2015

We log ship our production database tansaction logs to a secondary database on a separate remote domain.

Incidentally, this was not set up via the "Ship Transaction Logs" wizard, but instead we had to use the various system stored procedures after restoring a copy of the database on the remote domain in standby mode.

We now have an issue where users are unable to access the remote secondary database without having sysadmin privileges. Clearly we want to avoid this!

We want to be able to use Windows Authentication mode on the server of the secondary database. But since the two domains differ, is it possible to even achieve this?

How can we set up read-only access for users on the secondary database without giving them sysadmin privileges?

View 3 Replies View Related

Logins In Master..syslogins

Jun 21, 2001

How can you manually update the syslogins table in SQL 2000? It keeps giving me the following error:

Server: Msg 4406, Level 16, State 2, Line 1
Update or insert of view or function 'master..syslogins' failed because it contains a derived or constant field.

I used to be able to do it in 6.5.

View 3 Replies View Related

SQL 2012 :: When To Restore And Rebuild Master Database

May 11, 2014

If one is regularly taking backups of system databases, when does it become necessary to rebuild the master database. I am looking for a situation where rebuilding the master is preferred to restoring it from backup.

View 1 Replies View Related

SQL 2012 :: Encrypting Master Database And TempDB

Sep 30, 2014

Is it possible to encrypt Master database and tempdb? On executing below query result is showing temdb is encrypted.

SELECT db_name(database_id), encryption_state, percent_complete, key_algorithm, key_length
FROM sys.dm_database_encryption_keys

View 1 Replies View Related

SQL 2012 :: Master Database To Single Mode

Jan 29, 2015

Is it possible to put master database to single mode, if yes then whats the procedure. The reason behind the scenario is to restore master database from backup for which its strictly recommended to put the database in single mode. But I m not able to do so.

View 5 Replies View Related

SQL 2012 :: Restore Master Database For A New Database?

Jul 29, 2014

Sometime during the night last night some user account permissions were "lost". Am I right to think that restoring the master database would be the way to go? We have a 2 node 2012 cluster and I stop the cluster resource and start the db in single user mode from the active node. Somehow the sharepoint farm is still trying to connect so I can't get logged in single user. What method could I use to stop users from connecting when I don't have access to the sharepoint farm.

View 8 Replies View Related

SQL 2012 :: Read Only Copy Of Particular Database?

Aug 28, 2014

We are using 208r2. We used to generate simple reports against to prod. The production is running slow. Just we need the production fresh copy all the time. We are using mainly one database. So I need to have read only copy of that particular database which is sync with the production.

View 3 Replies View Related

SQL 2012 :: Read Only Database Copy?

Aug 24, 2015

we would like something like Mirroring with a Snapshot database so that the "replicated" site can read the database locally.Unfortunately, this requires SQL Enterprise edition on the reading site if I get this right.Is there a cheaper way to achieve this sort of functionality?

View 9 Replies View Related

How To Copy Logins From One Server To The Other

Sep 10, 2001

We are in process of migrating of databases from one Server to another, Can anyone please suggest me how to transfer or copy the logins from one Server to the other instead of creating them all over again??

Thanks in advance...

View 1 Replies View Related

Copy/Backup/Migrate SSIS Packages From 1 Server To Another

Nov 21, 2007



I'm looking for a way to copy/migrate all of my SSIS packages from 1 SQL2005 server to another SQL2005 server. I see export/import options but they are for 2000 DTS packages. And it seems like I can only do this one package at a time, which is tedious. Anybody out there who's done all packages at once?
Thanks!

View 9 Replies View Related

SQL 2012 :: Copy A Database To Another Instance Daily

Jun 26, 2014

Looking for what others have done to keep a copy of a database, for read only, on another instance. Need to do this once a day early in the morning with no, or minimal, downtime at the source and target. We have applications that access this copy 24/7, so prefer not to disconnect active users, as a detach/attach or backup/restore might do. Permissions are different on each instance, so would prefer not to overlay users on destination database. Options we are looking at right now are...

Log Shipping
Snapshot Replication
Transfer SQL Objects Task (SSIS)

Our environment for this is SQL 2012 on Windows 2012, in the same AD domain located in the same server room. The database size is 1gb. Needs to be copied around 6:30am daily. Does not need to be updated thru the day.

View 5 Replies View Related

Script To Copy Logins And Users With All Permissions

Jan 26, 2007

Hello all,I am looking for the script, which I believe exists already.I need tobe able to populate the script for security of one database andapply it to another database, even if it is located on another server:1. All logins which not exist have to be created and which existsignored including the NT accounts2. Users same as the old database + the existing ones stay in database3. Passwords for the new logins.4. All permissions/grants on all objects for the users that exists(usually it's the case) and ignore those that don't.I have script which does some of it, but it's not perfect, so everytime there are some errors.Please let me know, if you need me to email script that I have. It'spretty long so I cannot just post it in here.Thank you in advance.

View 3 Replies View Related

T-SQL (SS2K8) :: Copy Master Record And Its Detail Records

Aug 26, 2014

I have been asked to give the users the ability to copy a set of records within the database. The current setup is

Master Table: JSA1
JSAID: (PK, int, not null)
JOBTITLE(nvarchar(200), null)
PlantNumber(int, not null)

Detail Table: tblSteps
STEPID (PK, int, not null)
JSAID (FK, int, not null)
StepNo (int, null)
BasicSteps (nvarchar(200), null)
DBPhoto(varbinary(max), null)

The plant number field is a location based field that the application uses to filter/select data on for the end users. What they want to be able to do is to select a record, select another location from a dropdown list and then click a button that duplicates the master record and the detail records to the new location.

I am thinking that a stored procedure passing the JSAID and new Location number to do it, I am just not sure how to get the new ID when I go to copy the detail records.

View 4 Replies View Related

Restore Puts Copy Of User Tables In Master

Jul 20, 2005

Environment is SQL Server 2000 64 bit.I restore from a script 'my' database, this works fine. However, allthe tables are also found in master, no data though.Anyone experienced this?

View 2 Replies View Related

SQL 2012 :: Using VMotion To Migrate AlwaysOn Node

Nov 4, 2015

Our network guys have to carry out an IBM Flex Chassis move at our data centre, which will affect the primary replica of one of our SQL 2012 AlwaysOn Availability Group nodes (the secondary replica won't be affected).

They have suggested using vMotion to migrate the primary replica to another virtual host, which will result in a very brief period of network outage for the node.

I've done some reading and have seen a few potential issues regarding Stun During Page Send (SDPS) and increasing thresholds within WSFC. Unfortunately, we're not able to test this prior to the migration, so I have a few questions...

Would it be necessary to failover to the secondary replica node before performing the vMotion (and back again afterwards)?

View 0 Replies View Related

Lost SQL Logins, But Still Have DB Logins - Script To Recreate SQL Logins?

Jan 21, 2007

ok, first, I know... I forgot to run a backup of the master database, and I forgot to run a script to caputure logins. Not that that is out of the way... I need to recreate the logins under the Securities tab below the databases. All the company databases have the user names and passwords assigned to them, but they are not able to login, because they are not able to authenticate to the SQL server first.

Is there a script that someone has that will copy the company database security info for the users and recreate them in the SQL security tab?

I know that I can rebuild them manually, but I need to delete them first in the application software, then delete them from the databases, and then recreate them in the application software... and as simple as that sounds... it is a slow moving process.

Any assistance would be greatly appreciated.

Thanks,

John

View 3 Replies View Related

SQL 2012 :: Restore With Replace - Logins Get Their Own Schema

May 29, 2014

I refresh QA environments with copies of our production database quite often. Many of the users also have read-only logins to production, but not all. I've noticed that in QA the users in the restored database are matched up with QA server logins that no longer have "DBO" as their default schema. We almost always use DBO, nothing else.

On the most recent restore, I didn't drop the target DB first, just restored with "replace." Does it matter whether I drop or replace in this instance?

The one user reporting issues could not open the database in management studio to view objects/tables etc. I noticed their default schema was their domain login, so fixed that and they now no longer have the issue.

View 0 Replies View Related

SQL 2012 :: Code That Audits All Logins To Production

Jul 2, 2015

So I'm using the 2012 SSMS to connect to a SQL 2008 database, upon which we have code that audits all SQL logins to production and notifies us via email that someone is using logins they shouldn't. Mostly it's to notify us if people other than the DBAs are using these logins from their desktops instead of using their windows accounts.

This morning I opened up SSMS 2012, logged into my production servers in Object Explorer using Windows Auth. An hour later, I had to update an exception table, so I opened a new query with SQL Auth and used a SQL-only login it. Immediately the email pops that someone on my desktop is using a SQL Login. That's okay. That's expected.

What I didn't expect is that after I closed the query window, the email kept popping. The query window isn't even open / connected to production any more, but SQL still thinks I'm logged in using a SQL Login instead of with Windows Authentication (which is what I used on the Object Explorer connection).

Is there a bug with 2012 that causes a new connection type to affect all current connections? I.E., did it change my DB Windows Auth connection to SQL Auth on the other connection?

View 0 Replies View Related

SQL 2012 :: How To Reconcile Logins Between Two Server Instances

Oct 16, 2015

I am in the process of writing a generic PowerShell script (that executes T-SQL statements) to copy all or some databases from one SQL Server 2012 SP2 instance to a second instance that runs SQL Server 2012 SP2 or higher. The script is designed to be used on demand, and part of its execution will involve reconciling the logins between the source and destination instances.

I am looking for a reliable way to reconcile the logins between the instances in a somewhat repetitive (i.e., "on demand") fashion. There is no SSIS in the environment; so the SSIS transfer logins task to not available to me.

View 5 Replies View Related

SQL 2012 :: Script That Will Allow To Create Multiple Logins In One Pass

Feb 24, 2015

I am new to SQL Server and I am trying to create a script / possible a cursor that will allow me to create multiple logins in one pass - without having to type each one.

I have 20 users USER1, USER2, USER3, USER4... but I can't seem to figure out how to get those users into a loop
so I can end up with something like this.

CREATE LOGIN <user> FROM WINDOWS WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[English]......

I realize I can type this statement 20 times but perhaps there is a faster way -

View 3 Replies View Related

SQL Server 2012 :: Copy Database From One Server To Another

Mar 25, 2014

I have two servers on different machines:

Production & Testing

I have a database called MyData on Production.

I can link the servers using sp_AddLinkedServer.

I want to make a copy of MyData from Production to Testing and rename it from MyData to MyData_Testing.

Currently, I figure I will have to make a backup - copy it from Production to Testing - restore it. Since I can link the servers, I can initiate the backup from Testing - copy - and restore from a script on Testing. The only part I am not sure of is how to copy the file via the script.

How to copy the file?

View 3 Replies View Related

The Remote Copy Of Database X Has Not Been Rolled Forward To A Point In Time That Is Encompassed In The Local Copy

May 11, 2006

Hi,

I set up DB mirror between a primary (SQL1) and a mirror (SQL2); no witness. I have a problem when I issue command:


alter database DBmirrorTest
Set Partner = N'TCP://SQL2.mycom.com:5022';
go


The error message is:

The remote copy of database "DBmirrorTest" has not been rolled forward to a point in time that is encompassed in the local copy of the database log.

I have the steps below prior to the command. (Note that both servers' service accounts use the same domain account. The domain account I login to do db mirror setup is a member of the local admin group.)

1. backup database DBmirrorTest on SQL1

2. backup database log

3. copy db and log backup files to SQL2

4. restore db with norecovery

5. restore log with norecovery

6. create endpoints on both SQL1 and SQL2

CREATE ENDPOINT [Mirroring]

STATE=STARTED

AS TCP (LISTENER_PORT = 5022, LISTENER_IP = ALL)

FOR DATA_MIRRORING (ROLE = PARTNER)

7. enable mirror on mirror server SQL2

:connect SQL2

alter database DBmirrorTest

Set Partner = N'TCP://SQL1.mycom.com:5022';

go

8. Enable mirror on primary server SQL1

:connect SQL1

alter database DBmirrorTest

Set Partner = N'TCP://SQL2.mycom.com:5022';

go

This is where I got the error.

The remote copy of database "DBmirrorTest" has not been rolled forward to a point in time that is encompassed in the local copy



Thanks for any help,

KT

View 8 Replies View Related

SQL 2012 :: Disable Logins Automatically Depending Upon Expiry Date In A Table?

Jun 4, 2014

Disable logins on access expiry date(Not windows password expiry). we grant access to users on databases only for 60 days. So access is only valid for 60 days. Then the user should again request access to the database going thru security clearance. Thn the DBA's enable the login. Maintaining all these logins of users manually is causing more confusion.
As we know, we dont have any inbuilt functionality to automatically disable logins in SQL Server.

I have a table where the logins and expirydate were recorded in a DB.

Using this table and SQL Server agent. Can i achieve this process automated ?
CREATE TABLE [dbo].[LoginsExpiry](
[LoginName] [varchar](50) NULL,
[ExpiryDate] [date] NULL,
[Roles] [varchar](500)
) ON [PRIMARY]
GO

View 3 Replies View Related

SQL 2012 :: Ability To View Server Level Logins And Agent Jobs?

Sep 16, 2014

In one of my environments, I need to grant the ability to view all the logins and agent jobs to an account, but I don't want to give him "sysadmin" or "securityadmin".

View 2 Replies View Related

SQL 2012 :: Transactions / Sec In Master DB?

Mar 24, 2015

In an instance with 2008R2, the value of Transactions/sec in Master DB is very bigger than an instance with 2012.
Is it normal? I ask it because both instances execute the same application with the normals differences between them (the Transactions/sec's number for the application's bds is similar).

View 0 Replies View Related

Migrate Database

Jun 15, 2008

 I have DNN installed on one server and now i need to move whole site to another server. I have moved the FTP files, and changed the conn string in config. How can i move the database? I dont have the database publishing webservice installed so i will need some other way. Does anyone know of a simple way to migrate from one sql server to another?

View 1 Replies View Related

SQL 2012 :: Restore Master On New Cluster

Oct 28, 2015

I have this situation: -Two nodes cluster with two instances sql cluster 2012 and I need to move all on the new cluster 2012 with finally the same virtually name and instances.

It's possible to restore master order to preserve all security?

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved