Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 help needed in creating .fmt file

Author  Topic 

aakcse
Aged Yak Warrior

570 Posts

Posted - 2010-03-29 : 08:33:54
hi All,

plz help me in correcting the syntax for creating .fmt file

bcp mydb.dbo.mytable format nul -c -f
\\266A\ProjectZ\C204\Sys_Ext\mytable.fmt -T


once I create the fmt file, with the help of this, I have to load a file(1gb) into a table.

Regards,
aak

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2010-03-29 : 08:39:26
You haven't specified SQL Server name. Use -S option.

Harsh Athalye
http://www.letsgeek.net/
Go to Top of Page

aakcse
Aged Yak Warrior

570 Posts

Posted - 2010-03-29 : 08:54:43
Thanks Harsh,

so how the corrected syntax looks like?

Regards,
aak
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2010-03-29 : 09:00:33
[code]bcp mydb.dbo.mytable format -c -f\\266A\ProjectZ\C204\Sys_Ext\mytable.fmt -S myserver -T
[/code]

Harsh Athalye
http://www.letsgeek.net/
Go to Top of Page

aakcse
Aged Yak Warrior

570 Posts

Posted - 2010-03-29 : 09:11:02
After providing -S it says


bcp mydb.dbo.mytable format nul -c -f
\\266A\ProjectZ\C204\Sys_Ext\mytable.fmt -T -S

User name not provided, either use -U to provide the user name or use -T for Tru
sted Connection

Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2010-03-29 : 09:21:58
you need to specify the Server Name after -S

refer to http://msdn.microsoft.com/en-us/library/ms162802.aspx


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -