Headaches Moving An SQL2K Database Between Servers
Jul 20, 2005
Greetings all,
This should be an easy task, and Im sure it is, but as many times as I have
tried, I cant seem to get this to work properly.
We changed ISPs recently from a shared host to a co-located server, and our
former host was nice enough to send us a backup of our old SQL2000 database
(about 5MB).
I went into Enterprise Manager, created an empty database with the same name
and used the Restore Backup tool successfully. I took a look at the db and
saw all the Tables and data intact.
Next I wanted to re-create the DSN to match the old one so that I wouldnt
have to fiddle with any of the old connection strings in my asp pages.
Thats where the fun began. The old DSN was created by our host via an email
request and I never got a look at the actual creation process of that DSN.
I created one on our colo server with the same name, but it would only pass
the connection tests when I used the Windows User Authentication rather than
SQL Server Authentication. No big deal I figured, and just went ahead and
set it up using the same DSN name.
Next I tried the main.asp page to test the DSN and lo and behold I got the
ODBC connection errors. I tinkered with the connection strings a bit and
managed to get a wide variety of connection errors and fine-tuned to the
point that it said "Unable to login with user 'SERVER169/nacog'". At this
point, I went into Enterprise manager and added 'nacog' to the User list and
the connection string no longer produced errors. (By the way, my connection
string simply contains "DSN=YAVAPAICONNECT;")
My next step was to actually execute a SELECT statement which produced the
following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e09'
[Microsoft][ODBC SQL Server Driver][SQL Server]SELECT permission denied on
object 'ADMINS', database 'YAVAPAICONNECT', owner 'dbo'.
/nacog/admin/main.asp, line 189
Why was I not surprised?
I went back to Enterpise Manager, saw the all the tables had 'dbo' as the
owner, and tried to give 'nacog' all the permissions at the table level, but
the error persists.
To preserve my sanity I stopped there, because I spun my wheels for hours
and days the last time this happened. and my eye has not stopped twitching
since ;)
I am quite sure that this has something to do with one or all of the
following:
1) The way SQL2K was installed (it was installed by someone else)
2) My creation of the db with the windows login, rather than SQL auth, prior
to import
3) My creation and handling of the DSN
My background is mainly in ASP programming, and I understand bits and pieces
of this puzzle, but for the life of me I cannot piece this thing together.
Can anyone help point me in the right direction or suggest a good tutorial?
I would be very thankful to anyone who could help put me on the right track.
I am moving a SQL 2k database from a Windows 2000 server to a Windows 2003 server (seperate appliances) and would like as little SQL downtime as possible.
I have several applications that I believe are connecting to servernow by servernow€™s name and don€™t want to have to figure out how to change them to servernew. Would it work if I built servernew and copied/moved the SQL database to servernew, then take servernow off line and change servernew€™s name to servernow?
I am open to any suggestions on other more appropriate methods.
I am running a SQL 2000 server (Server A) on Win2000. I have a seperate server(Server B) running SQL 7.0 on NT6.0. When I attempt to create a linked server From B to A, I am unable to connect but I am able to create a linked server from A to B and connect( but I can go the opposite direction from A to B and connect). We have another server (Server C) that is running SQL 2000 and NT6.0. We can connect from B to C (so we are assuming that issue is not one of version compatability between versions 7.0 and 2000). The server Network configurations on all the servers are the same. The only difference is Win2000. Are there any other factors we may not have considered?
We€™ve got almost 250 old dts packages which simply loading data into Sql tables from plain files or at the reverse point. Most of them are defined with fixed fields and its fixed positions one after one. We don€™t want to migrate them using Import wizard, on the contrary we€™re producing them from the beggining taking advantatge of SSIS architecture to the full. And now, we€™re trying to imagine how to migrate automatically that valuable info from Sql Server 2000 to Sql Server 2005 without efforts€¦ You know, any program be able to move that detailed info to SSIS.
So we would avoid to select again all these positions per each file -very tedious and we're lazy
I don€™t see how except, of course, migrate them directly
Let me know if you need further explanations or more clarity on that.
Just got a new workstation and installed Enterprise Manager. Is there an easy way to migrate the registered servers from the old workstation to the new one.
I have about 30 servers defined under 6 groups. It would certainly be a lot easier if there was a file I could drag from one workstation to another.
Hi all, I have a database that is duplicated on 4 different SQL Server 2000 servers. I created a database diagram in one of those identical databases using EM, and thought I would like to copy it across to the other 3 databases. I can't find any way to do that though.
Any ideas? I can right-click and copy the diagram in the source server/database, but can't "paste" into the second server/database's Diagrams directory.
I know the diagram is created from the objects in the dabase, but mine required some customization and it would be really cool if someone has a silver bullet I could borrow to make the diagrams in the other DB's match up to the formatted one.
I was wondering if there is a way to move ODBC connections between SQL servers? We are replacing our current server with newer hardware, and I have pretty much everything figured out except this.
I have user that we just migrated his Access database to SQLServer. All went well with the migration, but then he came up withanother requirement to be able to replicate the database to a localSQL server living on the hard drive of a laptop. Before the migrationhe just copied the entire Access databse to the lap top.I tried using the Copy SQL Server Objects Task to move thenecessary tables from the production server to the laptop, but noticedit doesn't copy over the table Indexes/keys identiy fields etc. Iended up backing up the production database and restoring it to thelaptop database, but wondered if there is any way to move the tables,with their properties from one server to another? I know I can setup the backup process to run as scheduled, but the problem is the dataneeds to be moved on an irregular time table. I thought about justwriting code on the remaining Access front end to empty the localtables and then query the data from the production side to reloadthem, but I'm sure there's an easier way.Any suggestions would be appreciated.Thanks,Tom
I have a set of packages that use an Indirect Configuration to a XML config that gives each package a connection string to the Configuration database. The configuration database has all the connection strings for every connection I use.
I just moved my dbs to a new server. I updated the XML config file to point to the new server and updated the connections in the configuration table. I am having two problems. When I open packages in BIDS, I am receiving errors because the connection strings embedded in the packages were pointing to the old server. I updated the Data Sources in the solution and that didn't fix it. Why is it not using the configurations?
Also, on the production box (64bit), I am having the same problem. It is not reading in the connections from the new SQL configuration table. All my connections that are producing errors are OLEDB for SQL.
I'm having some issues restoring a backup of database that uses native encryption onto another server. I know there are a couple of articles on this but I seem to be missing something. Any help would be greatly appreciated.
Current Server Windows 2000 Destination Server Windows 2003
The original key setup for the current server was achieved by something like this:
CREATE SYMMETRIC KEY HR01 WITH algorithm=DES encryption BY password = 'HRpassword'
Running the command select * from sys.symmetric_keys on the current server I get the following:
name principal_id symmetric_key_id key_length key_algorithm algorithm_desc create_date modify_date key_guid
HR01 1 256 56 D DES 2006-11-22 16:36:01.883 2006-11-22 16:36:01.883 BBD80500-338F-47D7-B336-85D46E00F2F0 So I restored the database onto the new server and ran this script:
OPEN MASTER KEY DECRYPTION BY PASSWORD = 'Password'; ALTER MASTER KEY ADD ENCRYPTION BY SERVICE MASTER KEY; GO
I don't have a master key... so I go back to the original server and ran this script and did another backup:
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'Password' OPEN MASTER KEY DECRYPTION BY PASSWORD = 'Password'; ALTER MASTER KEY ADD ENCRYPTION BY SERVICE MASTER KEY;
Running select * from sys.symmetric_keys on the current server now looks like this:
name principal_id symmetric_key_id key_length key_algorithm algorithm_desc create_date modify_date key_guid
We have succesfully moved SQL server to a new machine and this same machine will also be running IIS 5.1 to host our intranet. We will be doing the actual developing on other machines and publishing the site to the new machine. Now, when I went to test the site, it all comes up just fine, but logging in is a problem. What do I need to do to configure the new SQL server to accept new members, logins, etc. Oh, and actually membership is still on the "old" SQL. When I tried to login, I get this:
Server Error in '/' Application.
Login failed for user ''. The user is not associated with a trusted SQL Server connection. Thanks for the information.
Is there any easy way to move users between SQL Servers for a particular database? We have tests and development servers I would like to make sure the user lists are in sync for that db.
The company for which I work did not have a DBA until I started a few weeks ago. Whoever installed SQL2K used the wrong CD so they have been running Personal Edition on their servers. I have installed a new SQL2K standard instance and have restored everything except the jobs and DTS packages. Can the msdb from the Personal edition be restored to the standard instance?
We are planning to move all of our System Center Databases that reside on front end servers to each system center application to a centrally located SQL 2012 server. We'd like to centralize everything and have our DBA care for the server. here is our setup:
SCOM has 1 monitoring and 1 Data warehouse server. SCCM has 1 server with all roles on it. DPM database is on the same server as Application. Same with SCVMM. I have 2 questions regarding this move:
1. Can I have all these databases running on 1 SQL instance?
2. Is there a best practice document that highlights steps and "gotchyas"
Is it possible to downgrade SQL from Enterprise to Standard Edition, or do you have to remove the previous installation (uninstall) and reinstall. Meaning you would also have to restore all user databases? Thanks.
Sorry if this is a very simple couple of questions, i've tried searching the docs but I'm not even sure which docs I should be reading!
We run a few dedicated web servers with our web host. A new one of which has sql server 2005 on it until now we've only ever used 2000.
Anyway I wanted to restore a 2000 database into 2005 and so logged into the machine for the first time, there was no management server installed just Sql Server configuration manager, fine I thought i'd be able to use SQL Express built into visual studio (2008) on my own machine. However when trying to connect I realised I didn't know the admin login details so called the host, they said there are no login details because there is no management software installed on the server and they'll install the Express version. Is this correct? Can you install SQL Server without an administrative login and you then can't connect to it until you've installed the management console?
Secondly, As I mentioned I've got SQL Express installed as part of a visual studio 2008 install, we also have a copy of SQL Server 2005 standard for internal use only, I tried to use this to install the necessary client tools and it tells me I can't because I have a higher version already installed?
Begining to wish I'd taken a look at 2005 much earlier than now as it seems like quite a big jump from 2000 in terms of management and setup...
I am using Visual Web Developer 2005 Express Edition along with SQL Server 2005 Express Edition on the same computer. ALL I WANT TO DO IS MAKE A SIMPLE CONNECTION TO THE DB. I have tried using every possible type of connection string that I can find on the internet (of which there seems to be WAY too many), but none of them seem to work. I can't believe how difficult this is. Any ideas? I am using windows authentication, and the management server utility connects fine. So this is really annoying. PLEASE HELP
Yet another roadblock: Does the standard SQL SE 2005 not install any of the query commands? (isql, isqlw, or osql.exe's). I could have sworn that they were, but every time I go to test the install on my VM none of them are ever installed. If it doesn't is it included in the advanced version of it (which I'd really rather not do)? If still no what's the easiest option I still have open? Can I have my app connect to the master db and run a restore script from the app? I've been arm wrestling with this install for over a week and it's just about brow-beaten me completely.
I had a peculiar problem yesterday with SQLserver2000 database restore from one server to the other. I copied the .BAK file ( 11.2 GB) from source server to target server. Target server already had the same name database. I use SEM to do restore the database using the disk file .BAK as source to restore. The NT drive space was 13.5 GB available after copying. Restore failed with an error that not enough disk space is available to restore and it needs 23 GB of space for expansion. What does it mean? The database went into "Loading" state and it got corrupted. I tried to drop the database and cleared the DBF and LDF files on the drive and again tried to restore from .BAK file but it failed again with the same error message that not enough space is available for expansion. Now I do not have the original database or am not able to build the new database.
Finally I did attach/detach methods where I could bring back the database in running state.
What is it complaining about not enough space? Why did it ask for almost 100% more space for some expansion in restore process? Why it did not fail when doing attach/detach methods from other server.
I just upgraded to SQl Server 2000 from 7, and realized that all my reports created with existing scripts no longer work fine. The reports appear corrupt. Below is an example of a report script:
declare @vSubject varchar(30), @vMessage varchar(20) Begin
One of the forum user suggests that I need to post the following issue to this area relating on data corruption.
Here's where I am up to in detail: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=74599
Summary: Basically, I made a daily automatic testing restore to TARGETSERVER and every database are ok except the master database. I do DBCC CHECKDB on master database in the SOURCESERVER .. and no error what so ever. But the result of restoring of the master backup does. This happens everday.
Let me start off by saying that under normal circumstance I would just restore from the last good backup. However in this case it appears as though the last good backup was sometime last August ... arg! After much yelling at the person responsible I've been attempting to get my blood pressure below 200 and see what data is recoverable.
First off, this was a RAID5 system that failed 1 drive. Secondly, before we got someone in there to replace said drive it failed a second drive and the system went down. We managed to massage the system back online but it appears that there is some corruption as a result which is no surprise.
I've done DB repairs in the past and it hasn't been too bad, but this time it is looking a little gnarly.
I've kicked everyone off the server and tried starting SQLServer several different ways.
I tried starting the service normally and then flagging the bad DB into single user mode with "ALTER DATABASE foo SET SINGLE_USER". I then did a select * from sysdatabases to make sure it took, which it did. I also tried starting the whole SQLServer in single user mode from the command line, "SQLServr -m".
I can run "DBCC CHECKDB('foo')" and I get a long ugly list of allocation errors. I posted it to a link as the 1349 lines returned is a little long: http://chrisnet.net/sqlbad/dbcc_checkdb.txt
But when I attempt to bite the bullet and destroy data in an attempt to put things back together with: "DBCC CHECKDB('foo', REPAIR_ALLOW_DATA_LOSS) WITH ALL_ERRORMSGS" I get: Server: Msg 7919, Level 16, State 2, Line 1 Repair statement not processed. Database needs to be in single user mode. DBCC execution completed. If DBCC printed error messages, contact your system administrator.
But yet the database is in single user mode, according to everything I check check on. Is this just SQL's way of telling me the corruption is too severe to be repaired? No output is displayed in the shell cmd window like it is for a successful DBCC either (when running sqlservr -m).
I have used backup and restore method to upgrage 2000 databases to 2005 database. What do i need to do in order to for my application or users to use databse in 2005 and remove 2000
it is taken from SQL2K5 SP2 readme.txt. Anyone have idea what to do to implement this ? Our sp2 is failing. we suspect the above problem and researching it.we are running on default instance of SQL2K5 on win2003 ent sp2
"When you apply SP2, Setup upgrades system databases. If you have implemented restrictions on the ALTER DATABASE syntax, this upgrade may fail. Restrictions to ALTER DATABASE may include the following:
Explicitly denying the ALTER DATABASE statement.
A data definition language (DDL) trigger on ALTER DATABASE that rolls back the transaction containing the ALTER DATABASE statement.
If you have restrictions on ALTER DATABASE, and Setup fails to upgrade system databases to SP2, you must disable these restrictions and then re-run Setup."
Hi all,I am having trouble getting linked Oracle 9 server in MS SQL Server2005 Express to work properly. My machine is running Windows XP.The Microsoft and Oracle OLE DB Providers have problems dealing withOracle's Numeric Data Type, so I decided to use Microsoft's OLE DB forODBC Provider and an Oracle ODBC source. When using the Microsoft ODBCfor Oracle Driver in my ODBC source I have inconsistent behavior.Sometimes my queries are processed properly, then other times I get thefollowing errorOLE DB provider "MSDASQL" for linked server "ODBCBEAST" returnedmessage "[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttrfailed".OLE DB provider "MSDASQL" for linked server "ODBCBEAST" returnedmessage "[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttrfailed".OLE DB provider "MSDASQL" for linked server "ODBCBEAST" returnedmessage "[Microsoft][ODBC driver for Oracle][Oracle]".Msg 7303, Level 16, State 1, Line 1Cannot initialize the data source object of OLE DB provider "MSDASQL"for linked server "ODBCBEAST".I have no idea why sometimes I can connect to the linked server with noproblems andwhy other times it performs like this. I'm not changing anything aboutthe system I can think of. When I use an Oracle client (PL/SQL) I haveabsolutely no problems connecting. TNSPING returns that the connectionis good.This is unacceptable so I decided to try my luck with the Oracle 10gODBC driver. However when I use this and perform an openquery selectagainst the linked server I get back only 11 rows, when I know that thedatabase has over 100 rows (in fact when using the Microsoft ODBCdriver and it works that's what I get). I figured maybe the buffersetting needed to be raised in the ODBC configuration so I took it from64000 to 600000 (a magnitude of 10) but I still get back only 11 rows.I'm at my wit's end.Any suggestions on resolving one or the other problem would be muchappreciated.Thanks much
Hi I want to transfer a database from one PC to another. (Both running SQL Server 2005 express) I have copied the files (SQL Server Database Primary Data File and SQL Server Database Transaction Log File) from the C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLData folder of the source PC to the destination PC (Same folder). I was under the impression that using Microsoft SQL Server 2005 - SQL Server Management Studio Express these files would be picked up and could be used, do I infact need to do something to attach the files/database so that they will appear in SQL Server management?
I have an SQL database running on an old server and i am upgrading the server, but i am having some problems moving my SQL database over. Has any one got a work through they could mail me to give me a hand!!
I'm very new to SQL Server 2005, so please be kind.We had a vendor in and they loaded their software and the databasethat was created is sittingon the root (c:) drive. On this server we have another drive wherethe database should reside, isthere a way to move this database to the correct drive? Thank you forany help that you couldprovide.Dave Schaeffer
I have two computers, both with SQL Express 2005 and SQL Server Management Studio Express. I created a database on one computer, and need to copy it to the other computer. I'd like to do it all through the Management Studio interface, without using SQL commands, since I only need to do this manually.
I detached the two files, copied them to the second computer, and tried to attach them. This is generating lots of messages about not having the necessary permissions of various sorts. I think the main problem is that I don't know how to set up the database's users in a way that allows the second computer to attach the database.
I've tried Windows authentication, using a Windows user that has the same name and password on both computers, and I've defined that Windows user as a user within the database. I've connected to SQL when logged in as that user. I've tried SQL authentication also, defining the same SQL user within both SQL Servers, as db_owner. But when I try to attach the database, I see no place to specify the user that I intend it to use, and it still fails. If I connect to SQL as that user, then SQL doesn't have permission to look at the file system to find the MDF file.
I'd appreciate the help in learning how to do this with both Windows authentication and SQL authentication, via the Management Studio's GUI. Most of the documentation I've seen covers how to do it by using SQL language commands, and I'd like to avoid that.