Re: FreeBCP to SQL Azure complains table is missing?
Frediano Ziglio <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <CAHt6W4fbM28rFesnc0H-4SYVpZo2m_UQBp8YJdFXHzyHbAh0gQ@mail.gmail.com> |
2012/11/19 Cade Roux <[email protected]>: > Of course SQL Azure only lets you connect to one database, so I think > there is some sort of confusion here. > > Has anyone used FreeBCP to connect to SQL Azure? > > $ freebcp DWSTAGE.BCPTEST in bcptest.txt -f cdr.fmt -S > serverfromfreetds -U user@azureserver -P password > Msg 208, Level 16, State 1 > Server 'azureserver', Line 1 > Invalid object name 'DWSTAGE.BCPTEST'. > Msg 208, Level 16 > General SQL Server error: Check messages from the SQL Server > > Msg 20064, Level 2 > Attempt to use Bulk Copy with a non-existent Server table > > $ freebcp DATABASENAME.DWSTAGE.BCPTEST in bcptest.txt -f cdr.fmt -S > serverfromfreetds -U user@azureserver -P password > Msg 40515, Level 15, State 1 > Server 'azureserver', Line 16 > Reference to database and/or server name in > 'DATABASENAME.DWSTAGE.BCPTEST' is not supported in this version of SQL > Server. > Msg 40515, Level 15 > General SQL Server error: Check messages from the SQL Server > > Msg 20064, Level 2 > Attempt to use Bulk Copy with a non-existent Server table > > > I've also tried adding the database to the command line with the -D > option. The default database for that connection is set up as this one > and only Azure database in the freetds.conf. > > The connection to SQL Azure seems fine otherwise - I just can't get > FreeBCP to work: > > $ isql serverfromfreetds user@azuredatabasename password > +---------------------------------------+ > | Connected! | > | | > | sql-statement | > | help [tablename] | > | quit | > | | > +---------------------------------------+ > SQL> SELECT COUNT(*) FROM DWSTAGE.BCPTEST; > +------------+ > | | > +------------+ > | 0 | > +------------+ > SQLRowCount returns 1 > 1 rows fetched > SQL> SELECT COUNT(*) FROM DWSTAGE.BCPTESTX; > [ISQL]ERROR: Could not SQLExecute > SQL> > > This seems like some database/schema confusion, but I can't find a > combination of settings which works. > > > > Cade Roux > [email protected] > 504-717-4887 Hi, I thinkg freebcp just load the data into the table, you have to create the table before running freebcp Frediano