SolvedPrivate

Creating and importing data into a database using .sql files

Posted on 2013-11-13
4
49 Views
Last Modified: 2016-02-11
We have created a new CRM deployment and pointed it to a new back end database that is running SQL Server 2008. We also have an existing deployment on SQL 2008 R2, which I would like to use a database off to test the new environment. The problem that I have is that the smallest database is 20GB, so when I script it out and convert it so that it is compatible with 2008 it is roughly 34GB in size, which means when I try and import it the .sql file it says there are not enough resources available. I have then exported it in several files (over 2000) and transferred them to the new server.

My question is - How do I know what order the new files should be imported in?

Any assistance would be appreciated
0
Comment
Question by:TVS-ServiceDesk
  • 2
4 Comments
 
LVL 27

Expert Comment

by:Chinmay Patel
ID: 39645161
I dont think you can do it this way. Did you try to import the database directly.
0
 
LVL 26

Accepted Solution

by:
Zberteoc earned 500 total points
ID: 39645298
You can try this:

1. Like you said, generate a script with both structure and data for all your objects in the database (with create database option if the database doesn't exist on the target server) into 1 big .sql file, which then you will have to execute on the target using the SQLCMD utility from a command prompt window:

C:>sqlcmd -S myServer\instanceName -i C:\myScript.sql -E

2. Use the import export feature on any of the servers.

3. Use SSIS

4. Use snapshot replication
0
 
LVL 27

Expert Comment

by:Chinmay Patel
ID: 39645840
Please try taking the DB files and try an upgrade. CRM doesnt allow direct database manipulation. Make sure you have all the required backups befor you try anything.
0
 

Author Closing Comment

by:TVS-ServiceDesk
ID: 39692611
This worked a treat, thankyou very much for your assistance
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Troubleshooting Methodology - steps 3 36
Best Query To Insert One Year Calendar 6 44
TSQL DateADD update Question 4 25
sql Total query 2 14
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

919 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now