-
May 10th, 2013, 08:09 AM
#1
Thread Starter
Fanatic Member
Upsize Access DB to SQL Server 2008
When Upsizing an Access 2003 databse to SQL Server 2008 how can I set my autonumber fields to convert with Identity Specification set to yes and 1?
-
May 10th, 2013, 01:26 PM
#2
Re: Upsize Access DB to SQL Server 2008
You can accomplish it in 2 ways:
1. Export data to SQL Server and then manually change the NUMBER field to include identity.
2. Create a table that already defines that field as identity, enable identity insert and do your export.
-
May 14th, 2013, 01:08 PM
#3
Thread Starter
Fanatic Member
Re: Upsize Access DB to SQL Server 2008
This would have to be done for around 400 tables. Manually changing the field is what drove me to post a question here. Can I do this in C# programmatically?
-
May 14th, 2013, 06:31 PM
#4
Re: Upsize Access DB to SQL Server 2008
You can also do a straight through IMPORT into SQL Server. Select Access as your source. Then write a t-sql script to change each table to use identity. You can query sys.tables, loop through them and alter each of of them to include identity.
-
Jul 18th, 2013, 02:16 PM
#5
Thread Starter
Fanatic Member
Re: Upsize Access DB to SQL Server 2008
Serge, how would I write loop to alter each of them
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|