how to transfer all data to another database
-
hi. How do you transfer data of a database from another database. I am using MS SQL. I have hundreds of data there and I need to transfer it to another database since I'm having problems with the previous one with regards to attaching it to the dataset with crystal reports. It only recognizes the newly created databases in SQL Express and I don't know why. So I just planned to recreate my recent database and transfer all of the existing data to a new one. How do I do that? Thanks!
harcaype wrote:
How do you transfer data of a database from another database
SSIS is one way if you have to do this continuously but you can also use backup/restore or detach/attach. They would be easier for a single transfer.
harcaype wrote:
It only recognizes the newly created databases in SQL Express
If this is the root problem, I think you should concentrate in this. There's no reason why Crystal would connect only to a new database if the database you're trying to connect to is in good condition.
The need to optimize rises from a bad design.My articles[^]
-
harcaype wrote:
How do you transfer data of a database from another database
SSIS is one way if you have to do this continuously but you can also use backup/restore or detach/attach. They would be easier for a single transfer.
harcaype wrote:
It only recognizes the newly created databases in SQL Express
If this is the root problem, I think you should concentrate in this. There's no reason why Crystal would connect only to a new database if the database you're trying to connect to is in good condition.
The need to optimize rises from a bad design.My articles[^]
Root problem? I'm sorry, but what did you mean by root problem? I'm not really sure myself though. A few days ago I was able to attach the tables on the dataset with the same database, and get recognized in the Crystal Report Wizard. Then when I duplicated my project file, and redo what I did in my "backed-up" project file, that started the strange problem. And if you mean that getting and successfully querying the database is a good condition, Yes. My database is in good condition for that part.
-
Root problem? I'm sorry, but what did you mean by root problem? I'm not really sure myself though. A few days ago I was able to attach the tables on the dataset with the same database, and get recognized in the Crystal Report Wizard. Then when I duplicated my project file, and redo what I did in my "backed-up" project file, that started the strange problem. And if you mean that getting and successfully querying the database is a good condition, Yes. My database is in good condition for that part.
harcaype wrote:
A few days ago I was able to attach the tables on the dataset with the same database, and get recognized in the Crystal Report Wizard. Then when I duplicated my project file, and redo what I did in my "backed-up" project file, that started the strange problem
Yes that's what I mean by root problem. If your new project acts differently than the previous project I would guess that the problem is actually in the project, not in the database. But then again I don't know enough about the solution so this is merely guessing. Try for example restoring a backup to a new database. If that solves the problem then everything should be ok. If it doesn't it would still give you more information about the problem.
The need to optimize rises from a bad design.My articles[^]
-
harcaype wrote:
A few days ago I was able to attach the tables on the dataset with the same database, and get recognized in the Crystal Report Wizard. Then when I duplicated my project file, and redo what I did in my "backed-up" project file, that started the strange problem
Yes that's what I mean by root problem. If your new project acts differently than the previous project I would guess that the problem is actually in the project, not in the database. But then again I don't know enough about the solution so this is merely guessing. Try for example restoring a backup to a new database. If that solves the problem then everything should be ok. If it doesn't it would still give you more information about the problem.
The need to optimize rises from a bad design.My articles[^]
-
I tried attaching the database on a newly created project. Still the same. Not recognized in the crystal report wizard. Sigh.. Oh well. I'll just try this newly created database first. Hopefully it works.
-
harcaype wrote:
How do you transfer data of a database from another database
SSIS is one way if you have to do this continuously but you can also use backup/restore or detach/attach. They would be easier for a single transfer.
harcaype wrote:
It only recognizes the newly created databases in SQL Express
If this is the root problem, I think you should concentrate in this. There's no reason why Crystal would connect only to a new database if the database you're trying to connect to is in good condition.
The need to optimize rises from a bad design.My articles[^]
Mika Wendelius wrote:
There's no reason why Crystal would connect only to a new database if the database you're trying to connect to is in good condition.
Unless Crystal Reports is connected to the new instance only. I'm willing to bet he has two instances installed.
The world is a stage and most of us are desperately unrehearsed. —Sean O’Casey, Playwright
-
Mika Wendelius wrote:
There's no reason why Crystal would connect only to a new database if the database you're trying to connect to is in good condition.
Unless Crystal Reports is connected to the new instance only. I'm willing to bet he has two instances installed.
The world is a stage and most of us are desperately unrehearsed. —Sean O’Casey, Playwright
-
Jerry Hammond wrote:
I'm willing to bet he has two instances installed
That would explain it, but even though it's a matter of connection string... "Where do want to go today" :)
The need to optimize rises from a bad design.My articles[^]
If I remember my Crystal Reports it is even simpler. From within the report he is building he should be able to use the UI to connect to the correct instance/db.
The world is a stage and most of us are desperately unrehearsed. —Sean O’Casey, Playwright
-
If I remember my Crystal Reports it is even simpler. From within the report he is building he should be able to use the UI to connect to the correct instance/db.
The world is a stage and most of us are desperately unrehearsed. —Sean O’Casey, Playwright
It depends if he's letting the dialogs to show up or if he sets credentials in the code. But you're right, at the time when the report is launched, the actual connection is evaluated. And if any information is missing, it will be asked.
The need to optimize rises from a bad design.My articles[^]
-
It depends if he's letting the dialogs to show up or if he sets credentials in the code. But you're right, at the time when the report is launched, the actual connection is evaluated. And if any information is missing, it will be asked.
The need to optimize rises from a bad design.My articles[^]
I got it working now. Thanks! I just created a new database however I have a new problem. Yesterday I was able to successfully migrate my data to another database, using this query: "INSERT INTO Records SELECT * FROM MMDAserver.dbo.Records", then being stupid, I accidentally deleted the newly created database from the project file I attached into. Now when I created the new database again with the same name and same everything, I already get this error when I try to copy them again:
Msg 8101, Level 16, State 1, Line 1 An explicit value for the identity column in table 'Records' can only be specified when a column list is used and IDENTITY_INSERT is ON.
-
I got it working now. Thanks! I just created a new database however I have a new problem. Yesterday I was able to successfully migrate my data to another database, using this query: "INSERT INTO Records SELECT * FROM MMDAserver.dbo.Records", then being stupid, I accidentally deleted the newly created database from the project file I attached into. Now when I created the new database again with the same name and same everything, I already get this error when I try to copy them again:
Msg 8101, Level 16, State 1, Line 1 An explicit value for the identity column in table 'Records' can only be specified when a column list is used and IDENTITY_INSERT is ON.
This means that you hav an IDENTITY column in records table. Normally you cannot give value to an identity column because SQL Server assigns it. When migrating old data you can set this feature temporarily off. Have a look at: SET IDENTITY_INSERT (Transact-SQL)[^] However if you don't want that SQL Server assigns the value at all, you should remove the identity definition from that table.
The need to optimize rises from a bad design.My articles[^]
-
This means that you hav an IDENTITY column in records table. Normally you cannot give value to an identity column because SQL Server assigns it. When migrating old data you can set this feature temporarily off. Have a look at: SET IDENTITY_INSERT (Transact-SQL)[^] However if you don't want that SQL Server assigns the value at all, you should remove the identity definition from that table.
The need to optimize rises from a bad design.My articles[^]
-
Yeah I just noticed. LOL. I removed the Identity Specification for the newly created tables. THANKS A BUNCH! You guys were a great help! :)