You haven't replied to either of the messages I posted to help you earlier. Please do so.
Your previous attempt appeared to work using SQLCMD - but as you did not save the output to a file, if there were any errors you won't have been able to see them as they scrolled up the screen and you can't check the file, retrospectively, to check for any errors. (In any event the output would have been huge, so trying to find any errors in such a file would be a "challenge")
I think it is very unlikely that, without more knowledge about MS SQL than you have, that you will be able to "just use" the SQL script that you have. Therefore I suggest that you either ask the person who sent you the SQL script to, instead, send you a Full Backup File (which it will be easy for people here to help you restore onto your computer), or you ask someone with more MS SQL knowledge to modify your script so that it will run safely on your machine and create the database etc.
The reason I say this is that it is likely that your script uses a specifically named database, and creates it on a specifically named drive in specifically named folders (all/any of which may not exist on your computer). There are a whole host of similar things which could go wrong which someone with a bit of MS SQL knowledge will easily be able to solve but if you do it on your own, with the help of a forum like this, it will take "for ever" and may well destroy something useful (e.g. by overwriting it, or deleting it) on your computer.
Thank you for your everyones kind support. But i did not get the info.what im expected.
Actually i would like to create new database in microsoft sql server management studio 214 using .sql file (its size was 5.89GB).
I need to know the proper steps and procedures..If i import this file to MSSQL server management studio getting error, if not I used the below script:
USE master ;
GO
CREATE DATABASE maximo_2
ON
( NAME = Sales_dat,
FILENAME = 'c:\testtdatt.mdf',
SIZE = 10,
MAXSIZE = 50,
FILEGROWTH = 5 )
LOG ON
( NAME = maximo_log,
FILENAME = 'c:\testtlogg.ldf',
SIZE = 5MB,
MAXSIZE = 25MB,
FILEGROWTH = 5MB ) ;
GO
comment executed successfully.But i could not able to view my database, .mdf and .ldf file could not be executed too.
Im really not too sure how to get my new database in proper manner.
Dear Experts please kindly give me a suggestion. Really need your great help.
Personally I don't think that runing the script is the problem; because the script was generated on a different server it may well be completely inappropriate for the current environment (location of files etc. or assumption that DB, of specific name, exists, or chance that that DB does exist and is pre-DROPPed / whatever). Also the need to check for errors - all the output is going to go flying up the screen!! and even if diverted to file if the script is full of INSERT statements (and no NOCOUNT statement) it would be impossible to see the wood for the trees ...)
As I said earlier, but O/P has not bothered to respond, I don't think it is possible for someone with no experience of SQL to create and populate a database from a "database dump" script provided by 3rd party and using only Forum for assistance.
it needs either:
Some help from someone with enough SQL experience to be able to review/adjust the script to run safely and make sure that any errors are both found AND dealt with (including ignoring them if it is deemed safe & appropriate to do so ...)
Get the original provider to provide a Database BACKUP. That would be trivial, by comparison, to get help from a Forum to RESTORE. Note that the backup must be made from a version of SQL that is not newer than the O/P's and also not more than 2 versions earlier. (It is not possible to Restore backups from "very old databases" onto a "much newer version").
Im new to powershell too but i believe it can help, just use the piping thingy and output the result so later on can debug based on the outputed text file. Assuming the file is generated from ssms scripted database.....op might had to debug from start to end and this topic will be a never ending story and he/she might become one of the sql pro in the future. Hahahahahahahaha
I had tried to create database by using microsoft sql server management studio, really got very tired..
My size of the data is 5GB. Really im very new for microsoft sql server, shall you knows anyone for most expert to assist me to create databse.
My expertise:
->Would like to create database.
On hand:
->5GB data, which is .sql format data.
->Installed microsft sql serevr management studio
-> have sqlcmd command prompt.
how i can create database with help of above on hand items. ?
What are the steps and what is the query i can used for that?
The best option I think is to go back to the party that provide you with the file. Ask for detail instruction on what is it / how you should do with the file.
I had sent and asked many times my question..can i have your email id .. if you don`t mind. Because when i sending message here really confuse and you also can not get my exact question.