Conflict With Logins/usres When Importing Databases
Jul 16, 2007
Hi,
We have imported several databases from an old SQL Server 2000 deployment in a SQL Server 2005 instance. After the installations we have check that the import doesn't create the logins associated with the users nad now it seems impossible to create "manually" the login. What should be do? Re-import the database after having created the login?
In sql2k you used to be able to have a same user in 2 databases under the same login. Just moved to 2005, using sql authentication, and have some users who need to access 2 databases using the same login credentials. But sql2005 will not let me create 2 users under the same login across databases. Any ideas?
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.
I want to import data from a live site database into a development database (SQL Server 2005 Express) using the DTSWizard. Once I copy/paste the live database to my dev machine, I cant attach the live site database because it has the same name as the database on the dev site.A simple solution I would assume is to change one of the names. But I can't seem to change the "orignal file name". A backup/restore won't work for me because I made table/field changes to the dev database. Thanks --Dietrich
From SQL Server 2000 Import wizard if we use Copy Objects & data between SQL Server Databases it'll copies tables with primary key. Similar to this what is the alternative method in SQL Server 2005.
Hi there,I have a situation where an application needs to import data fromnumber of access mdb files on a daily bases. The file names changeevery day. The data import is very straight forward:insert into sql_table select * from acess_tableThere are up to 8 tables in each access file and some access files willhave less. So the process needs to figure out which tables exist inAccess mdb file and import them whole into sql staging tables.Any recommendations are appreciated.Thanks
I'm trying import 7 tables from each of 30 SQL2005 databases into a SQL2005 Consolidation database. I can simply create data flow tasks for each one but instead I would like loop through a list instead.
I've created a table to house the names of the databases from which I want to import the data. I've created SQL task to return the database names from the table as a "Full Result Set". I've assigned the result set to a user variable (type = Object) an named the result name 0
What I'd like to do is create a data flow task which connects to each of the databases and imports 7 specified tables from each database appending the table name with my database name in the result set.
I'm stuck on how I'd set the connection strings in my OLE DB Source in my Data Flow task. Any insight would be greatly appreciated.
I designed the AlwaysOn wrong, but every time we fail over from primary server to another server, my applications cannot connect because the sql logins cannot connect to their default databases. Once I run the command to link the login with the user in the default database then the users are able to connect. Did I do something wrong when designing AlwaysOn?
I would move a Database to another server. I try to use DTS but I have problems with this process because DB have big tables, I think. I try to use DETACH and ATTACH procedures but logins doesn't export. And more, in new server there are already logins from another DBs.
What's the best way to solve this problem? Please, help Thanks
I am a systems analyst and work with an app that runs against 2 SQL Server DBs. Though I have some familiarity with SQL Server and SQL, I am not a DBA.
The app executable is tied to a Windows service. When we install the app, we run a process that builds 2 dbs to include: Tables, indexes, stored procedures, views and user accounts. SQL Server is set up for mixed mode authentication.
Normally, the dbs run off the local db user accounts which are tied to local logins with the same names. We have a client that wants to remove our standard logins so that they can run on only a Windows login. I know I should be able to tie the db users to a Windows login. And I can do the same for the service.
But I am at a loss as to how to get this done. How do you associate db users with a Windows login? When I have tried sp_change_users_login I get an error that the Windows login does not exist. (Though I have added the Windows account to the DB.)
Does anybody know if there are any conflicts using an XP computer as server and running SQL 7.0 on it?
I have a laptop using Windows XP, that I also have installed SQL 7.0 on (desktop version). I use it both as a client and as a server. As a client I am connecting to the NT server and it is working perfectly. When I try to run my SQL developed software against the local server though, I get a message saying "-2147217900 - Duplicate record or Record is in use. The request for procedure "TABLE NAME" failed because "TABLE NAME" is a table object"
Dear Readers,Is it possible, like in Access, to link to tables in other SQL databases that are on the same server? I have a query that I originally had in Access that queered from multiply databases. It did this by having those other tables in the other databases linked to the database that had the query.
why do i get collation conflict when i used temp table ??Cannot resolve the collation conflict between "Latin1_General_CI_AI" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.i solved it by using COLLATE Latin1_General_CI_AS (the column name)will i have collation conflicts again when i put my web app on a web hosting company??
I have 2 tables Users and DVDTestResults these tables have a relation over UserID Users.UserID DVDTestResults.UserName
both char
But when I try to insert in DVDTestResults I am having an error:
INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK_DVDTestResults_Users'. The conflict occurred in database 'Test', table 'Users', column 'UserID'. The statement has been terminated.
INSERT statement conflicted with TABLE FOREIGN KEY constraint 'FK_ChecklistCases_ChecklistFGroups'. The conflict occurred in database 'Test', table 'ChecklistFGroups'. The statement has been terminated.
but it seems to be no error can you help me please I can send you the related part of database
I am doing this in SQL Query analyzer:select dbo.GetTimedifference(CAST('5:30 PM' AS DATETIME),CAST('12:00 PM' AS DATETIME))it will give me (- 05:30) which is correct if i am talking about 12:00 PM midnight, what if I ment 12:00 PM in the noon, I mean, 11:00 AM, then 12:00 PM, it should give me, (5:30)since 5:30 Pm is 5:30 hours pass 12:00 PM noon, how can I solve that ?thanks a lot.
I'm using merge replication between 10 SQL server 7.0 SP2 machines. One central server is the publisher and 9 subscribers. I’ve setup an alert to get a message in case of conflicts. I defined it to trigger everytime the performance counter conflicts/sec rises above 0.
After some experimenting this seems now to work reliable, but there is still one point which bothers me. All conflicts are kept in the conflict history and everytime I get a message through the alert the number of copnflicts stated in the message increases by one. Also if I open view replication conflicts in EM all conflicts can still be viewed even those I manually resolved. I can't even find a way to seen which conflicts are new ones and which have been resolved already. Does anybody know a way how to reset this numbers without going through all the conflict tables.
I have a database thats got sql as the engine and access 2000 for the client side. and every time I edit a record this "Write Conflict" comes up. I dont know why its doing that but Idont want that happening whent the database goes live and my users start editing records. what do I, apparently its a Replication Conflict
I have a db server which was installed with Collation 'SQL_Latin_General_CP1_CS_AS' and now I have to replace this server with a new server and I want to install this server with Collation 'SQL_Latin_General_CP1_CI_AS'.
I am using Linked Servers to collect some data from my Sybase database which has "Code Page 850 (Multilingual) character set,us_english,Binary ordering, for use with Code Page 850 (cp850)."
But with new SQL server(case-insensitive settings), I am unable to run a select query (joining a local server and sybase server) and I get an error message "cannot resolve collation conflict for equal to operation"
I have tried changing property of linked server by specifying Remote server collation to true and Collation Name as 'SQL_Latin_General_CP1_CS_AS' as well as 'SQL_Latin_General_CP850_Bin' but I do get the same error message.
Could any of you please help me in this regard ?
Thanks in advance.
Wilson
Edit: Sorted out. Somehow it is working now after specifying Remote server collation to true and Collation Name as 'SQL_Latin_General_CP1_CS_AS'
Moving code from Sybase to SQL Server 2005. I have two tables. One table (vINID) is reset and populated right before this code runs. The other table (vINPA) is a table in the database used by the Front End App. This is the error I get when I try and run on our SQL Server 2005.
Msg 468, Level 16, State 9, Line 1 Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_BIN" in the equal to operation.
Here is the SQL code:
SELECT DISTINCT vINID.BLEI_CK, vINID.BLIV_ID, ISNULL(vINPA.RCPT_AMT,0) AS RCPT_AMT
FROM Reporting_DEV.dbo.RPT_04597_INID AS vINID -- table re-populated
LEFT JOIN fauafpr0_pids.dbo.CDS_INPA_PMT_ACT AS vINPA ON vINPA.BLIV_ID = vINID.BLIV_ID
How do I solve a primary key conflict for a mutiple select statement. When SQL finds a duplicate entry I doesn't ignore it like access but it doesn't insert anything. It should be something like where not in.....
Thanks in advance
CREATE PROCEDURE [dbo].[z_qry_history_1_is] AS INSERT INTO r_tbl_history_is_rg ( ean_code, contractnr, switch_id, bakje, week, jaar )
SELECT distinct r_tbl_is_open.ean_code, r_tbl_is_open.transaction_id, r_tbl_is_open.switch_id, r_tbl_is_open.bakje, datepart(ww,getdate()) AS Expr1, datepart(yyyy,getdate()) AS Expr2
FROM r_tbl_is_open; GO
Violation of PRIMARY KEY constraint 'aaaaar_tbl_history_is_rg_PK'. Cannot insert duplicate key in object 'r_tbl_history_is_rg'. The statement has been terminated.
While I execute one query its showing this error: Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Arabic_CI_AS" in the equal to operation.
I have merge replication set with with one publisher and three subscribers (push subscription). From time to time I get the following in the conflict table:
"The same row was updated at both 'Publisher.database' and 'Subscriber.database'. The resolver chose the update from 'Publisher.database' as the winner"
This is weird because the UPDATE only happend at the given subscriber. I checked the publisher and all other subscribers and there was never an UPDATE on this table. Also, the update at the publisher was actually the record that was already present.
I'm kinda stuck here. Any help or comments are greatly appreciated.
i have a dts package that is going to run at night and pull data from2 tables in an Oracle db and load it to 2 staging tables that mypackage creates in sql server 2000. i then execute a few sprocs toand columns, indexes, etc. after that all happens successfully i wantto delete the two production tables and rename the staging tables totake their place.the problem is that when i run the sproc to add the indexes,constraints, etc i get an error because objects with the same nameexist on the 2 production tables. i can't delete the productiontables until the very last step. i thought about generating a randomnumber in my sproc and using it as the name of the index but thatseems crude and messy. any ideas?
I am running merge replication on SQL Server 2005. Included in replication are 6 Subscribers and one Publisher/Distributor. Replication compatibility level is SQL 2005 and I am using row-level tracking. Servers are synchronized in 5 minutes each (so gap between two consecutive syncs of one server is 30 minutes)
Earlier all of this was on compatibility level SQL 2000, since all servers were upgraded from 2000 to 2005. But 10 days ago I upgraded and replication compatibility to 2005. I did not initialize subscription, since I had data in place and db's ready for merge replication.
Since that 10 days ago I have column update conflict on each row change. Not just if it is changed at same time at different subscribers. For example, if I change one row today, and somebody else changes it three days later on other subscriber it counts as a conflict. He always chooses good (updated) version of data as winner, but it is quite annoying having 15000 conflicts in one table daily. And it makes harder to track other conflicts.
Does it have anything to do with row level column tracking, or it is some known bug? Or, even better, if anyone knows how to avoid it. I was thinking about changing it to column level, but then I need to reinitialize subscriptions which means sending of 9 GB data through some pretty slow lines (256 kbp/s), or few hours work to drop existing subscriptions and create new one's. Maybe I would to this if I knew that column level will help.
l've a raw data which contains list of device name and # of wires used, i.e. DEVICE NAME # of Wires --------------------- ------------- A 10 B 11 C 17 D 5 A 0 E 0
So l would like to import these data into my table (with device name as primary key) which each device only appear once. If the device name appear twices, then l should ignore device with # of wires = 0. If device name appear twice and # of wires <> 0, then l should log it.
I developed an ppc application, where i am using web service for synchronisation, but here i am getting lot of problem while handling conflict management.
Please suggest me how to manage conflicts, using web service.
I have installed SQL Server 2005 Express (I have also kep my SQL Server 2000 installation), created a blank database (using the <default> Collation which I believe is Latin1_General_CI_AS), and restored a backup (from SQL Server 2000) into the newly created database.
All the tables and records appear to be there but I get the following error when trying to make any changes to the database (through my front end application that sits over the database).
Unable to get objects. Additional information: Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation..
Looking at the properties of the database, the collation is SQL_Latin1_General_CP1_CI_AS. I have tried changing this to Latin1_General_CI_AS with no success.
Am I supposed to set the collation when I create the empty database before restoring the backup into it or is there something I am missing?
in merge replication using sql server 2005 and sql server compact, what happens when rows or columns cannot be inserted/updated/deleted because of some error other than a conflict? Are they handled differently tan change conflicts?