| Pages: [1] :: one page |
| Author |
Thread Statistics | Show CCP posts - 0 post(s) |

beldonuin
|
Posted - 2009.08.25 22:23:00 -
[1]
i am setting up a database in msql, does anyone have a script to create the blank database so i can restore to it please
|

beldonuin
|
Posted - 2009.08.26 11:39:00 -
[2]
someone must have the database creation script, please
|

Muscaat
ASCENTIS CORPORATION Free Worlds Alliance
|
Posted - 2009.08.26 13:49:00 -
[3]
Are you after something more complicated than "CREATE DATABASE myDatabaseName;"? ---------- EVE Markets - global price trends at your fingertips |

beldonuin
|
Posted - 2009.08.26 14:27:00 -
[4]
Edited by: beldonuin on 26/08/2009 14:27:48
Originally by: Muscaat Are you after something more complicated than "CREATE DATABASE myDatabaseName;"?
all i am after is an sql statement to create the database and tables for the datadump please
|

Arous Drephius
|
Posted - 2009.08.26 16:17:00 -
[5]
Originally by: beldonuin Edited by: beldonuin on 26/08/2009 14:27:48
Originally by: Muscaat Are you after something more complicated than "CREATE DATABASE myDatabaseName;"?
all i am after is an sql statement to create the database and tables for the datadump please
You only need to create an empty database, then just restore the backup.
|

beldonuin
|
Posted - 2009.08.26 18:50:00 -
[6]
Originally by: Arous Drephius
Originally by: beldonuin Edited by: beldonuin on 26/08/2009 14:27:48
Originally by: Muscaat Are you after something more complicated than "CREATE DATABASE myDatabaseName;"?
all i am after is an sql statement to create the database and tables for the datadump please
You only need to create an empty database, then just restore the backup.
thanks
|

beldonuin
|
Posted - 2009.08.26 18:55:00 -
[7]
i get this error when trying to restore to a blank database "ebs_back" TITLE: Microsoft SQL Server Management Studio ------------------------------
Restore failed for Server 'PAUL-PC\SQLEXPRESS'. (Microsoft.SqlServer.SmoExtended)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.2531.0+((Katmai_PCU_Main).090329-1015+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476
------------------------------ ADDITIONAL INFORMATION:
System.Data.SqlClient.SqlError: The backup set holds a backup of a database other than the existing 'ebs_back' database. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.2531.0+((Katmai_PCU_Main).090329-1015+)&LinkId=20476
------------------------------ BUTTONS:
OK ------------------------------
|

Ki Tarra
Ki Tech Industries
|
Posted - 2009.08.26 20:42:00 -
[8]
You don't need to create a blank database so that you can restore to it. MSSQL can create a new database as part of the restore proceedure. Try modifying this to work how you want:
RESTORE DATABASE [NewDB] FROM DISK = N'C:\Users\Public\Downloads\Apocrypha_1.5.29569_db\Apocrypha_1.5.29569_db.bak' WITH FILE = 1, MOVE N'ebs_DATADUMP' TO N'C:\Users\Public\MSSQL\Data\NewDB.mdf', MOVE N'ebs_DATADUMP_log' TO N'C:\Users\Public\MSSQL\Data\NewDB_1.ldf', NOUNLOAD, REPLACE, STATS = 10 GO
|

Catari Taga
Centre Of Attention Rough Necks
|
Posted - 2009.08.27 01:14:00 -
[9]
I always just right click and restore. /shrug
Neither MSSQL nor MySQL need any existing databases if the create statements are in the backup (which they are). And unless they also include a DROP IF EXISTS (not sure) they'll probably fail if you try to restore to an existing database.
|

sontaq
|
Posted - 2009.08.27 15:21:00 -
[10]
Originally by: Ki Tarra You don't need to create a blank database so that you can restore to it. MSSQL can create a new database as part of the restore proceedure. Try modifying this to work how you want:
RESTORE DATABASE [NewDB] FROM DISK = N'C:\Users\Public\Downloads\Apocrypha_1.5.29569_db\Apocrypha_1.5.29569_db.bak' WITH FILE = 1, MOVE N'ebs_DATADUMP' TO N'C:\Users\Public\MSSQL\Data\NewDB.mdf', MOVE N'ebs_DATADUMP_log' TO N'C:\Users\Public\MSSQL\Data\NewDB_1.ldf', NOUNLOAD, REPLACE, STATS = 10 GO
that worked just fine thankyou, just one problem now it doesnt return any data |

Ki Tarra
Ki Tech Industries
|
Posted - 2009.08.27 19:01:00 -
[11]
Originally by: sontaq just one problem now it doesnt return any data
What do you mean it doesn't return any data? Do you mean that the database is blank? If so, did you use the correct paths in your script? All the paths (ie "C:\Users\Public\") are simply the locations that I used on my computer, and need to be edited to suit your computer.
|
| |
|
| Pages: [1] :: one page |
| First page | Previous page | Next page | Last page |