?
Solved

User Defined Defaults & DataTypes

Posted on 2005-05-03
3
Medium Priority
?
184 Views
Last Modified: 2012-05-05
I created a database from an SQL export of another database. Both are SQL Server 2000. The issue I have with the new database is that the default values, which are assigned to user defined data types, are not inserting automatically. Why are the defaults which are assigned to the data types, not propagating on inserts?
0
Comment
Question by:paulfryer
  • 2
3 Comments
 
LVL 28

Accepted Solution

by:
rafrancisco earned 1000 total points
ID: 13921093
During the Import/Export, if you selected the first option "Copy tables and views from the source database", then the defaults will not be exported to the destination database.  If you want the defaults to be included, select the third option "Copy objects and data between SQL Server databases".
0
 
LVL 1

Author Comment

by:paulfryer
ID: 13921201
I did a copy from a SQL script, I did NOT use the import wizard.
0
 
LVL 28

Expert Comment

by:rafrancisco
ID: 13921223
How did you generate the SQL scripts?  Is it through Enterprise Manager--> Generate SQL Scripts?  If so, did you go to the Options tab and selected the Table Scripting Options, specifically the last one, "Script PRIMARY keys, FOREIGN keys, defaults and check constraints"?
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question