In SQL Server Management Studio right-click your database and select Tasks / Generate Scripts. Follow the wizard and you'll get a script that recreates the data structure in the correct order according to foreign keys. On the wizard step titled "Set Scripting Options" choose "Advanced" and modify the "Types of data to script" option to "Schema and data"
TIP: In the final step select "Script to a New Query Window", it'll work much faster that way.
You're saying you have a drive that is failing, the drive was in your domain controller, and you had no other controllers? And your server had one drive?
Ouch.
Um...well...if you're trying to recover data and the drive is actually failing you might want to score some kind of backup software first and run a backup at the file level; cloning the drive may be more problematic, since sector by sector copies can fail if the sector isn't readable. File copies mean you may have a marginally better chance of it restoring.
Last time I had a system that had a bad sector but could be mostly read I was able to boot from a Linux RIP (rescue-is-possible) disc, mount a network share, and use ntfsclone to copy the contents to an image, then restore it to another drive. Google for the man page (or for a tutorial page) for the usage in your situation.
You could also try dd-rescue to try pulling data off the drive to a share.
All of this assumes the drive won't give errors in data, flipped bits, corruption by cosmic forces, etc. as you're trying to pull the information. You may very well end up having to rebuild from scratch, and build a backup server AND get a second domain controller in there (there's really not anything like a backup domain controller and primary domain controller for Active Directory) If this is a business server, why was there only one? Without RAID? Or a tape/drive backup?...
You might ... might ... have some luck with Macrium Reflect, but for a full restore you have to know whether their rescue boot disc is compatible with your system or you'll end up with an image file of your drive that can be mounted but not restored to your boot drive.
Linux dd command can create a clone sector by sector (again depending on if the drive works) but if there are bad sectors, you'll get bad data off the sectors. Plus restoring would have to be done to an exact drive copy; slight differences in sector size, etc. can cause boot errors.
You might find one of the utilities on the Ultimate Boot CD will work. There are several drive copy utilities on it among other handy utilities. In some cases I've managed to clone disks using Partimage then use Testdisk to fix the cloned system, but testdisk can take some learning to get the hang of if you're unfamiliar with some of the settings and manipulating partitions. Sometimes booting the clone with a Windows boot disc and having it do a bootup repair can also solve the problem. Sometimes.
Best Answer
Too little information to really help.
Your problem sounds like you have some sort of software conflict. Maybe there's a clue to be had in some system log? What does the Windows event log say?