Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
X002548
Not Just a Number
15586 Posts |
Posted - 2004-06-10 : 11:45:59
|
| OK, I'm a turned around (again...so what else is new)Dealing with our newly outsousrced HR IT department (it got pretty bloody when that happened).SQL 7Now I'm dealing with the mess the old IT staff left...same database on different boxes, different sort orders (52 and 53)How is this possible? I thought the only way was to script it and dump and load it.Am I missing the boat (what again?)To top it off, I'm reading this..http://www.itworld.com/AppDev/136/ITW3856/pfindex.htmlWhich say in 2k you can have a dtabase (or parts of one) that run under a different sort order...I kinda get that (why is another story)But you can't RESTORE a different order to a box in 2k...right?I'm so confused.So here's the question. sql 7.0, sort order 53, database needs to be restored to a different box, sort order 52. Possible?I didn't think so.Brett8-) |
|
|
SamC
White Water Yakist
3467 Posts |
Posted - 2004-06-10 : 12:51:48
|
| Step 1: Margarita mix... |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2004-06-10 : 13:27:49
|
quote: Originally posted by SamC Step 1: Margarita mix...
Thanks I got that one covered...tall glass, fill with ice, fill with tequila, stir with finger, big gulp to make room for mix, pour in mix, stir againSo....am I correct, (because I've seen it not work) that you can't do this?Brett8-) |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-06-10 : 13:32:12
|
| I haven't had to restore a database with a different sort order since 6.5. In 6.5 you had to transfer the data in order to move it. You could rebuildm the master database on the server with sort order 53, then move the database with backup/restore. I'll keep looking for the answer though.Tara |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-06-10 : 13:35:04
|
Looks like you can in SQL 2000:quote: SQL Server 2000 finally solved the problem of taking database backups from servers with a different character set / sort order and restoring them, without getting a collation error. Before SQL Server 2000, backups from one server could only be restored on a different server if the same character set and sort order where used by both servers. With SQL Server 2000, you are able to set the collating sequence at the server, database, and even the column level. Now that you can have multiple collating sequences on a single database server, there are a few things you should understand about mixing collations.
Quote taken from http://www.databasejournal.com/features/mssql/article.php/1587631Tara |
 |
|
|
mcrowley
Aged Yak Warrior
771 Posts |
Posted - 2004-06-10 : 14:03:51
|
| I have restored a backup from a case sensitive server to a case insensitive server. All in SQL 2k. The worst thing you will potentially have to deal with is if you have any cross-database queries that compare values. For those, you will have to specify the collation. Ugly, but there it is.I can understand the need to have the very few case sensitive databases on the same servers with the case insensitive ones. We only had one case sensitive database, and it was always a waste to have it on a server to itself. |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2004-06-10 : 14:56:44
|
Yeah that's what I've been getting a sense of...unfortunatly this is 7.But You know when soemone tells you something, and it doesn't make sense...Sounds like this is the case...Or as Dutch said...trust but verifySo, now, although it's like pulling teeth with these 3rd party vendors...they HAVE to execute my sp_helpsort scripts...On both boxes...damn it...And the articles says you can do it on 2k...but beware...oh great, like I'm gonna want to do that...if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[myTable99]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[myTable99]GOCREATE TABLE myTable99(Col1 varchar(8000))GOSET NOCOUNT ONDECLARE @Error int, @RowCount int, @cmd varchar(8000), @pwd varchar(30), @uid varchar(30), @db sysname, @fn sysnameSELECT @db = db_name() , @uid = 'sa' , @pwd = 'p99edward' , @fn = 'c:\myTable99_'+REPLACE(@@SERVERNAME,'\','_')+'_'+@db+'.txt'INSERT INTO myTable99(Col1) EXEC sp_helpsortSELECT @Error = @@ERROR, @RowCount = @RowCountIF @Error <> 0 BEGIN SELECT 'Error Occured executing sp_helpsort. Error='+CONVERT(varchar(5),@Error) GOTO l_Error ENDIF @RowCount = 0 BEGIN SELECT 'No Rows returned from sp_helpsort' GOTO l_Error ENDSELECT @cmd = 'bcp ' + @db + '.dbo.myTable99 out ' + @fn +' -c -S' + @@SERVERNAME + ' -U'+@uid+' -P'+@pwd SELECT @cmdEXEC master..xp_cmdshell @cmdSELECT * FROM myTable99SELECT 'Successful'GOTO l_Exitl_Error:SELECT 'Unsuccessful'l_Exit:SET NOCOUNT OFFGODROP TABLE myTable99GO Brett8-) |
 |
|
|
|
|
|
|
|