June 19, 2008 at 4:58 am
Hi,
I have A.dat file. Using BCP How to restore file to a new database.
I am trying in this way.
BCP ASPT in -iA.dat -t
Here ASPT is new databse name. It throws 'Object Not found' error.
Can anyone help on this?
Thanks,
Peer Mohamed.
June 19, 2008 at 5:28 am
Hi,
You can try the below query. I'm connecting to the localserver using windows authentication
bcp ASPT.dbo.tablename in A.dat -T -c
Please note that you need to provide the table name to import the data, if the table doesnt exist, create the table with proper structure!!
Regards..Vidhya Sagar
SQL-Articles
June 19, 2008 at 8:36 am
I've got a set of BCP tutorials on my MidnightDBA site below. Go to the admin section and I think they're near the top.
Watch my free SQL Server Tutorials at:
http://MidnightDBA.com
Blog Author of:
DBA Rant – http://www.MidnightDBA.com/DBARant
June 20, 2008 at 6:15 pm
One of the clients sent me backup file once with .dat extention. I just restored it as regular backup. This may not be your case though.
June 23, 2008 at 1:47 pm
peer_mohamed2k (6/19/2008)
Hi,I have A.dat file. Using BCP How to restore file to a new database.
I am trying in this way.
BCP ASPT in -iA.dat -t
Here ASPT is new databse name. It throws 'Object Not found' error.
Can anyone help on this?
Thanks,
Peer Mohamed.
Bcp dbo.ImpTst in 'D:\ImpData.txt' -T -S serverNameinstanceName
MCP, MCTS (GDBA/EDA)
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply