Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
error
15 posts, Page 1 of 2
1
2
»»
error
Rate Topic
Display Mode
Topic Options
Author
Message
getsimrangujral
getsimrangujral
Posted Monday, January 21, 2013 11:09 PM
SSC Rookie
Group: General Forum Members
Last Login: Saturday, February 09, 2013 6:00 AM
Points: 27,
Visits: 65
C:\Users\1245>sqlcmd -S MOLNEW0014\TEST -i c:\script.sql
Sqlcmd: 'c:\script.sql': Invalid filename.
Post #1409789
anthony.green
anthony.green
Posted Tuesday, January 22, 2013 1:20 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
getsimrangujral (1/21/2013)
C:\Users\1245>sqlcmd -S MOLNEW0014\TEST -i c:\script.sql
Sqlcmd: 'c:\script.sql':
Invalid filename
.
Invalid filename, correct the filename and re-try
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1409854
getsimrangujral
getsimrangujral
Posted Tuesday, January 22, 2013 5:51 AM
SSC Rookie
Group: General Forum Members
Last Login: Saturday, February 09, 2013 6:00 AM
Points: 27,
Visits: 65
it is not working
Post #1409975
anthony.green
anthony.green
Posted Tuesday, January 22, 2013 5:52 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
What is the error message
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1409978
getsimrangujral
getsimrangujral
Posted Tuesday, January 22, 2013 9:58 PM
SSC Rookie
Group: General Forum Members
Last Login: Saturday, February 09, 2013 6:00 AM
Points: 27,
Visits: 65
command line generate script for database ?
Post #1410336
anthony.green
anthony.green
Posted Wednesday, January 23, 2013 1:28 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
-i is an input file which means you want to use that file to run it against the DB, not that you want to script out the DB to the file.
Do a google search (other search engines avilable) for "Script Database Via Command Line" you will get many hits.
Also remember that SQL has a built in GUI in SSMS which will do this for you.
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1410391
getsimrangujral
getsimrangujral
Posted Wednesday, January 23, 2013 1:45 AM
SSC Rookie
Group: General Forum Members
Last Login: Saturday, February 09, 2013 6:00 AM
Points: 27,
Visits: 65
Yes i can do with ssms , but the problem is database too large , soo it throw me error
Thank you
Post #1410402
anthony.green
anthony.green
Posted Wednesday, January 23, 2013 1:47 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
They you need to look at writing a command line program which interfaces with the SQL SMO objects to pull out the DDL of the database.
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1410404
getsimrangujral
getsimrangujral
Posted Wednesday, January 23, 2013 1:50 AM
SSC Rookie
Group: General Forum Members
Last Login: Saturday, February 09, 2013 6:00 AM
Points: 27,
Visits: 65
http://blog.sqlauthority.com/2011/05/07/sql-server-2008-2008-r2-create-script-to-copy-database-schema-and-all-the-objects-data-schema-stored-procedure-functions-triggers-tables-views-constraints-and-all-other-database-objects/
look at the end part ( there is a command for large table )
Post #1410405
anthony.green
anthony.green
Posted Wednesday, January 23, 2013 1:55 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
Yes, but if you read the whole thing, you will see that Pinal Dave has run the SSMS GUI tool, saved the file as c:\script.sql and is then using the command line to run the script to create the objects and import the data.
What are you trying to do?
Have you run the GUI and exported the schema and the data into a file?
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1410407
« Prev Topic
|
Next Topic »
15 posts, Page 1 of 2
1
2
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.