I am trying to import a database from a dump file.
The dump file is from a sql server db.
I have created the db on another server and want to import the data from the
dump file.
I use the bcp like this :
bcp nnfdb.sa.users in x -Usa -P
nnfdb is the name of the database
users is the name of a table
x is the name of the dump file.
But I get this error :
SQLState = S0002, NativeError = 208
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name
'nnfdb.sa.users'.
also I am sure if I have to run the bcp for each table or if I can import
all tables in one bcp run.
Regards
KrisSa is a login. Perhaps you meant nnfdb.dbo.users?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Kris" <Kris@.discussions.microsoft.com> wrote in message
news:963F8255-AD7F-4268-A8F3-3B5570EFCCB0@.microsoft.com...
>I am trying to import a database from a dump file.
> The dump file is from a sql server db.
> I have created the db on another server and want to import the data from the
> dump file.
> I use the bcp like this :
> bcp nnfdb.sa.users in x -Usa -P
> nnfdb is the name of the database
> users is the name of a table
> x is the name of the dump file.
> But I get this error :
> SQLState = S0002, NativeError = 208
> Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name
> 'nnfdb.sa.users'.
> also I am sure if I have to run the bcp for each table or if I can import
> all tables in one bcp run.
> Regards
> Kris|||You'r right, if I use dbo instead of sa I dont get the same error.
So I use :
bcp nnfdb.dbo.users in x -Usa -P -Sdk1052
But it lookes like it is trying to insert everything into the users table.
The dump file is a 20G big file containing the hole db.
I havent made the dump file myself so I don't now how it was created.
Kris
"Tibor Karaszi" wrote:
> Sa is a login. Perhaps you meant nnfdb.dbo.users?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "Kris" <Kris@.discussions.microsoft.com> wrote in message
> news:963F8255-AD7F-4268-A8F3-3B5570EFCCB0@.microsoft.com...
> >I am trying to import a database from a dump file.
> > The dump file is from a sql server db.
> >
> > I have created the db on another server and want to import the data from the
> > dump file.
> >
> > I use the bcp like this :
> >
> > bcp nnfdb.sa.users in x -Usa -P
> >
> > nnfdb is the name of the database
> > users is the name of a table
> > x is the name of the dump file.
> >
> > But I get this error :
> > SQLState = S0002, NativeError = 208
> > Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name
> > 'nnfdb.sa.users'.
> >
> > also I am sure if I have to run the bcp for each table or if I can import
> > all tables in one bcp run.
> >
> > Regards
> >
> > Kris
>
>|||> The dump file is a 20G big file containing the hole db.
> I havent made the dump file myself so I don't now how it was created.
You need to know the format of the dump to determine the proper way to
import the data. If the file contains data from multiple tables, it may be
a SQL Server backup file rather than one created with BCP.
One method to determine if the file was created with BACKUP is by running a
Transact-SQL RESTORE FILELISTONLY from Query Analyzer:
RESTORE FILELISTONLY
FROM DISK = 'C:\MyDumps\MyFile.bkp'
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Kris" <Kris@.discussions.microsoft.com> wrote in message
news:2111D9CB-A350-47CC-BB7C-B8C07F85D5C0@.microsoft.com...
> You'r right, if I use dbo instead of sa I dont get the same error.
> So I use :
> bcp nnfdb.dbo.users in x -Usa -P -Sdk1052
> But it lookes like it is trying to insert everything into the users table.
> The dump file is a 20G big file containing the hole db.
> I havent made the dump file myself so I don't now how it was created.
> Kris
> "Tibor Karaszi" wrote:
>> Sa is a login. Perhaps you meant nnfdb.dbo.users?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> http://www.sqlug.se/
>>
>> "Kris" <Kris@.discussions.microsoft.com> wrote in message
>> news:963F8255-AD7F-4268-A8F3-3B5570EFCCB0@.microsoft.com...
>> >I am trying to import a database from a dump file.
>> > The dump file is from a sql server db.
>> >
>> > I have created the db on another server and want to import the data
>> > from the
>> > dump file.
>> >
>> > I use the bcp like this :
>> >
>> > bcp nnfdb.sa.users in x -Usa -P
>> >
>> > nnfdb is the name of the database
>> > users is the name of a table
>> > x is the name of the dump file.
>> >
>> > But I get this error :
>> > SQLState = S0002, NativeError = 208
>> > Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object
>> > name
>> > 'nnfdb.sa.users'.
>> >
>> > also I am sure if I have to run the bcp for each table or if I can
>> > import
>> > all tables in one bcp run.
>> >
>> > Regards
>> >
>> > Kris
>>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment