显示标签为“current”的博文。显示所有博文
显示标签为“current”的博文。显示所有博文

2012年3月8日星期四

BCP Format File Issues

Hi, All,
I'm having problems with BCP and a format file that I created. The current version of BCP is 8.00.382 and the format file looks like this:
8.0
2
1SQL VARCHAR018"||" 1PRONUM
2SQL VARCHAR030"||"2DESCR
When I run BCP it gives me the following error:
Error = [Microsoft][ODBC SQL Server Driver]Attempt to read unknown version of BCP format file
I then tried modifying the version to 8.00.382 and it then gives me the following error:
Error = [Microsoft][ODBC SQL Server Driver]Incorrect host-column number found in BCP format-file
I'm assuming that this is because it doesn't like the 8.00.338 but I really am not sure. If anyone can help it would be greatly appreciated.
Cheers,
Neil Guyette
************************************************** ********************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
nguyette@.gemssensors.com wrote:

>Hi, All,
>I'm having problems with BCP and a format file that I created. The current version of BCP is 8.00.382 and the format file looks like this:
>8.0
>2
>1SQL VARCHAR018"||" 1PRONUM
>2SQL VARCHAR030"||"2DESCR
>
The problem is not with the 8.0 version number. Your file should
probably look more like this:
8.0
2
1SQLCHAR018"||" 1PRONUM""
2SQLCHAR030"\r\n"2DESCR"Arabic_CI_AS"
1. If your host file is a text file, use SQLCHAR (no spaces in that) as
the type.
2. Add a collation column for each column (use "" if you don't want to
specify one)
3. || for the column 2 terminator might be correct, but if your data
file has usual line breaks that you don't want to import, you need to
specify that.
The "Using Format Files" topic in Books Online describes the basic
format file layout, and for many good samples, go to
http://groups.google.co.uk/groups?q=...ie+format+file
Steve Kass
Drew University

>When I run BCP it gives me the following error:
>Error = [Microsoft][ODBC SQL Server Driver]Attempt to read unknown version of BCP format file
>I then tried modifying the version to 8.00.382 and it then gives me the following error:
>Error = [Microsoft][ODBC SQL Server Driver]Incorrect host-column number found in BCP format-file
>I'm assuming that this is because it doesn't like the 8.00.338 but I really am not sure. If anyone can help it would be greatly appreciated.
>Cheers,
>Neil Guyette
>
>************************************************* *********************
>Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
>Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
>

2012年2月13日星期一

Batch file and use of isql command

Hi,
I'm trying to figure out how to be able to run a batch
file, go to the database, find the current application
version of our product and based on that result it
returns, run a specific script. We have a table that
holds all of the builds/releases of the application that
have been applied against the database. Based on the
information there (the max build/release number), I want
it to execute a specific SQL script that will upgrade them
to the next build/release.
For example, we have a table called DBVersion with one
column in it (AppsVersion). In this table, it has rows
that are as follows:
8.0.100.0
8.0.101.0
8.0.102.0
We have two upgrade paths that we will support. In the
example above, we can upgrade a customer who are in
8.0.100.0 or 8.0.102.0 to the new release number
8.0.103.0. We have two upgrade scripts...one that holds
all db changes from 8.0.100.0 to 8.0.103.0 and one that
holds all db changes from 8.0.102.0 to 8.0.103.0. I want
to create a batch file that finds the version they are on
and run a specific script to upgrade them to the new
release.
Thank you in advance,
Dee
Hi, this line of SQL maybe helps you
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'),
SERVERPROPERTY ('edition')
greatings, Cesar
"Dee" wrote:

> Hi,
> I'm trying to figure out how to be able to run a batch
> file, go to the database, find the current application
> version of our product and based on that result it
> returns, run a specific script. We have a table that
> holds all of the builds/releases of the application that
> have been applied against the database. Based on the
> information there (the max build/release number), I want
> it to execute a specific SQL script that will upgrade them
> to the next build/release.
> For example, we have a table called DBVersion with one
> column in it (AppsVersion). In this table, it has rows
> that are as follows:
> 8.0.100.0
> 8.0.101.0
> 8.0.102.0
> We have two upgrade paths that we will support. In the
> example above, we can upgrade a customer who are in
> 8.0.100.0 or 8.0.102.0 to the new release number
> 8.0.103.0. We have two upgrade scripts...one that holds
> all db changes from 8.0.100.0 to 8.0.103.0 and one that
> holds all db changes from 8.0.102.0 to 8.0.103.0. I want
> to create a batch file that finds the version they are on
> and run a specific script to upgrade them to the new
> release.
> Thank you in advance,
> Dee
>
|||Hi Cesar,
Thank you for your response. Actually, the version that I
was implying was our own product's application version and
not SQL Server's.
Thanks again,
Dee
>--Original Message--
>Hi, this line of SQL maybe helps you
>SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY
('productlevel'),[vbcol=seagreen]
>SERVERPROPERTY ('edition')
>greatings, Cesar
>"Dee" wrote:
that[vbcol=seagreen]
want[vbcol=seagreen]
them[vbcol=seagreen]
holds[vbcol=seagreen]
want[vbcol=seagreen]
on
>.
>

Batch file and use of isql command

Hi,
I'm trying to figure out how to be able to run a batch
file, go to the database, find the current application
version of our product and based on that result it
returns, run a specific script. We have a table that
holds all of the builds/releases of the application that
have been applied against the database. Based on the
information there (the max build/release number), I want
it to execute a specific SQL script that will upgrade them
to the next build/release.
For example, we have a table called DBVersion with one
column in it (AppsVersion). In this table, it has rows
that are as follows:
8.0.100.0
8.0.101.0
8.0.102.0
We have two upgrade paths that we will support. In the
example above, we can upgrade a customer who are in
8.0.100.0 or 8.0.102.0 to the new release number
8.0.103.0. We have two upgrade scripts...one that holds
all db changes from 8.0.100.0 to 8.0.103.0 and one that
holds all db changes from 8.0.102.0 to 8.0.103.0. I want
to create a batch file that finds the version they are on
and run a specific script to upgrade them to the new
release.
Thank you in advance,
DeeHi, this line of SQL maybe helps you
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'),
SERVERPROPERTY ('edition')
greatings, Cesar
"Dee" wrote:

> Hi,
> I'm trying to figure out how to be able to run a batch
> file, go to the database, find the current application
> version of our product and based on that result it
> returns, run a specific script. We have a table that
> holds all of the builds/releases of the application that
> have been applied against the database. Based on the
> information there (the max build/release number), I want
> it to execute a specific SQL script that will upgrade them
> to the next build/release.
> For example, we have a table called DBVersion with one
> column in it (AppsVersion). In this table, it has rows
> that are as follows:
> 8.0.100.0
> 8.0.101.0
> 8.0.102.0
> We have two upgrade paths that we will support. In the
> example above, we can upgrade a customer who are in
> 8.0.100.0 or 8.0.102.0 to the new release number
> 8.0.103.0. We have two upgrade scripts...one that holds
> all db changes from 8.0.100.0 to 8.0.103.0 and one that
> holds all db changes from 8.0.102.0 to 8.0.103.0. I want
> to create a batch file that finds the version they are on
> and run a specific script to upgrade them to the new
> release.
> Thank you in advance,
> Dee
>|||Hi Cesar,
Thank you for your response. Actually, the version that I
was implying was our own product's application version and
not SQL Server's.
Thanks again,
Dee
>--Original Message--
>Hi, this line of SQL maybe helps you
>SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY
('productlevel'),
>SERVERPROPERTY ('edition')
>greatings, Cesar
>"Dee" wrote:
>
that[vbcol=seagreen]
want[vbcol=seagreen]
them[vbcol=seagreen]
holds[vbcol=seagreen]
want[vbcol=seagreen]
on[vbcol=seagreen]
>.
>

Batch file and use of isql command

Hi,
I'm trying to figure out how to be able to run a batch
file, go to the database, find the current application
version of our product and based on that result it
returns, run a specific script. We have a table that
holds all of the builds/releases of the application that
have been applied against the database. Based on the
information there (the max build/release number), I want
it to execute a specific SQL script that will upgrade them
to the next build/release.
For example, we have a table called DBVersion with one
column in it (AppsVersion). In this table, it has rows
that are as follows:
8.0.100.0
8.0.101.0
8.0.102.0
We have two upgrade paths that we will support. In the
example above, we can upgrade a customer who are in
8.0.100.0 or 8.0.102.0 to the new release number
8.0.103.0. We have two upgrade scripts...one that holds
all db changes from 8.0.100.0 to 8.0.103.0 and one that
holds all db changes from 8.0.102.0 to 8.0.103.0. I want
to create a batch file that finds the version they are on
and run a specific script to upgrade them to the new
release.
Thank you in advance,
DeeHi, this line of SQL maybe helps you
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'),
SERVERPROPERTY ('edition')
greatings, Cesar
"Dee" wrote:
> Hi,
> I'm trying to figure out how to be able to run a batch
> file, go to the database, find the current application
> version of our product and based on that result it
> returns, run a specific script. We have a table that
> holds all of the builds/releases of the application that
> have been applied against the database. Based on the
> information there (the max build/release number), I want
> it to execute a specific SQL script that will upgrade them
> to the next build/release.
> For example, we have a table called DBVersion with one
> column in it (AppsVersion). In this table, it has rows
> that are as follows:
> 8.0.100.0
> 8.0.101.0
> 8.0.102.0
> We have two upgrade paths that we will support. In the
> example above, we can upgrade a customer who are in
> 8.0.100.0 or 8.0.102.0 to the new release number
> 8.0.103.0. We have two upgrade scripts...one that holds
> all db changes from 8.0.100.0 to 8.0.103.0 and one that
> holds all db changes from 8.0.102.0 to 8.0.103.0. I want
> to create a batch file that finds the version they are on
> and run a specific script to upgrade them to the new
> release.
> Thank you in advance,
> Dee
>|||Hi Cesar,
Thank you for your response. Actually, the version that I
was implying was our own product's application version and
not SQL Server's.
Thanks again,
Dee
>--Original Message--
>Hi, this line of SQL maybe helps you
>SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY
('productlevel'),
>SERVERPROPERTY ('edition')
>greatings, Cesar
>"Dee" wrote:
>> Hi,
>> I'm trying to figure out how to be able to run a batch
>> file, go to the database, find the current application
>> version of our product and based on that result it
>> returns, run a specific script. We have a table that
>> holds all of the builds/releases of the application
that
>> have been applied against the database. Based on the
>> information there (the max build/release number), I
want
>> it to execute a specific SQL script that will upgrade
them
>> to the next build/release.
>> For example, we have a table called DBVersion with one
>> column in it (AppsVersion). In this table, it has rows
>> that are as follows:
>> 8.0.100.0
>> 8.0.101.0
>> 8.0.102.0
>> We have two upgrade paths that we will support. In the
>> example above, we can upgrade a customer who are in
>> 8.0.100.0 or 8.0.102.0 to the new release number
>> 8.0.103.0. We have two upgrade scripts...one that
holds
>> all db changes from 8.0.100.0 to 8.0.103.0 and one that
>> holds all db changes from 8.0.102.0 to 8.0.103.0. I
want
>> to create a batch file that finds the version they are
on
>> and run a specific script to upgrade them to the new
>> release.
>> Thank you in advance,
>> Dee
>.
>

2012年2月11日星期六

Basic Upgrade questions

Hi,
I need a few no nonsense answers to help me with my current SQL setup.
I currently have SQL7.0 Server running on NT4.0 SP6 box and also a SQL7.0
server running on a Windows 2000 SP4 box.
They are not clustered but I want to upgrade the SQL to SQL 2000 on both
boxes and I must also upgrade the NT4 to Win 2000.
What I want to know is, what is the best way to do this so that I can avail
of SQL clustering.
Both SQL instances should be equal so that either server can take requests
automatically if the other fails.
All help would be greatly appreciated.
Some suggestions:
1) Upgrade to Win2K BEFORE doing the upgrade to SQL2K
2) Ensure that you will be running Win2K Advanced Server or Datacenter
server
3) Ensure that you will be running SQL2K Enterprise Edition
4) It sounds like you want a single-instance SQL cluster, formerly known
as Active/Passive
6) Make sure to update statistics WITH FULLSCAN on all of your tables
7) If you have the bucks, go with new hardware and just migrate the
databases to the new cluster
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com
"Padraig" <Padraig@.discussions.microsoft.com> wrote in message
news:C17ADBE9-CC8F-4128-9F20-582DA05C073F@.microsoft.com...
Hi,
I need a few no nonsense answers to help me with my current SQL setup.
I currently have SQL7.0 Server running on NT4.0 SP6 box and also a SQL7.0
server running on a Windows 2000 SP4 box.
They are not clustered but I want to upgrade the SQL to SQL 2000 on both
boxes and I must also upgrade the NT4 to Win 2000.
What I want to know is, what is the best way to do this so that I can avail
of SQL clustering.
Both SQL instances should be equal so that either server can take requests
automatically if the other fails.
All help would be greatly appreciated.
|||One more recommendation. Once you are up to where you want to be in
software versions, do a rolling clean install for each node. Wipe each node
and reinstall the OS from scratch. The instructions in BOL for Maintaining
a Failover Cluster list what to if a node completely fails. Just do this
once for each node reusing the 'failed' hardware after a clean install.
This way you guarantee there are no issues lef over from an upgrade, but you
still get the small step benefits of upgrading in place. It is definitely
more work, but I think it leaves a cleaner and more stable system.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:ONTo1vJrEHA.2340@.TK2MSFTNGP11.phx.gbl...
> Some suggestions:
> 1) Upgrade to Win2K BEFORE doing the upgrade to SQL2K
> 2) Ensure that you will be running Win2K Advanced Server or Datacenter
> server
> 3) Ensure that you will be running SQL2K Enterprise Edition
> 4) It sounds like you want a single-instance SQL cluster, formerly
known
> as Active/Passive
> 6) Make sure to update statistics WITH FULLSCAN on all of your tables
> 7) If you have the bucks, go with new hardware and just migrate the
> databases to the new cluster
> --
> Tom
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinnaclepublishing.com
>
> "Padraig" <Padraig@.discussions.microsoft.com> wrote in message
> news:C17ADBE9-CC8F-4128-9F20-582DA05C073F@.microsoft.com...
> Hi,
> I need a few no nonsense answers to help me with my current SQL setup.
> I currently have SQL7.0 Server running on NT4.0 SP6 box and also a SQL7.0
> server running on a Windows 2000 SP4 box.
> They are not clustered but I want to upgrade the SQL to SQL 2000 on both
> boxes and I must also upgrade the NT4 to Win 2000.
> What I want to know is, what is the best way to do this so that I can
avail
> of SQL clustering.
> Both SQL instances should be equal so that either server can take requests
> automatically if the other fails.
> All help would be greatly appreciated.
>

Basic Upgrade questions

Hi,
I need a few no nonsense answers to help me with my current SQL setup.
I currently have SQL7.0 Server running on NT4.0 SP6 box and also a SQL7.0
server running on a Windows 2000 SP4 box.
They are not clustered but I want to upgrade the SQL to SQL 2000 on both
boxes and I must also upgrade the NT4 to Win 2000.
What I want to know is, what is the best way to do this so that I can avail
of SQL clustering.
Both SQL instances should be equal so that either server can take requests
automatically if the other fails.
All help would be greatly appreciated.Some suggestions:
1) Upgrade to Win2K BEFORE doing the upgrade to SQL2K
2) Ensure that you will be running Win2K Advanced Server or Datacenter
server
3) Ensure that you will be running SQL2K Enterprise Edition
4) It sounds like you want a single-instance SQL cluster, formerly known
as Active/Passive
6) Make sure to update statistics WITH FULLSCAN on all of your tables
7) If you have the bucks, go with new hardware and just migrate the
databases to the new cluster
--
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com
"Padraig" <Padraig@.discussions.microsoft.com> wrote in message
news:C17ADBE9-CC8F-4128-9F20-582DA05C073F@.microsoft.com...
Hi,
I need a few no nonsense answers to help me with my current SQL setup.
I currently have SQL7.0 Server running on NT4.0 SP6 box and also a SQL7.0
server running on a Windows 2000 SP4 box.
They are not clustered but I want to upgrade the SQL to SQL 2000 on both
boxes and I must also upgrade the NT4 to Win 2000.
What I want to know is, what is the best way to do this so that I can avail
of SQL clustering.
Both SQL instances should be equal so that either server can take requests
automatically if the other fails.
All help would be greatly appreciated.|||One more recommendation. Once you are up to where you want to be in
software versions, do a rolling clean install for each node. Wipe each node
and reinstall the OS from scratch. The instructions in BOL for Maintaining
a Failover Cluster list what to if a node completely fails. Just do this
once for each node reusing the 'failed' hardware after a clean install.
This way you guarantee there are no issues lef over from an upgrade, but you
still get the small step benefits of upgrading in place. It is definitely
more work, but I think it leaves a cleaner and more stable system.
--
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:ONTo1vJrEHA.2340@.TK2MSFTNGP11.phx.gbl...
> Some suggestions:
> 1) Upgrade to Win2K BEFORE doing the upgrade to SQL2K
> 2) Ensure that you will be running Win2K Advanced Server or Datacenter
> server
> 3) Ensure that you will be running SQL2K Enterprise Edition
> 4) It sounds like you want a single-instance SQL cluster, formerly
known
> as Active/Passive
> 6) Make sure to update statistics WITH FULLSCAN on all of your tables
> 7) If you have the bucks, go with new hardware and just migrate the
> databases to the new cluster
> --
> Tom
> ---
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinnaclepublishing.com
>
> "Padraig" <Padraig@.discussions.microsoft.com> wrote in message
> news:C17ADBE9-CC8F-4128-9F20-582DA05C073F@.microsoft.com...
> Hi,
> I need a few no nonsense answers to help me with my current SQL setup.
> I currently have SQL7.0 Server running on NT4.0 SP6 box and also a SQL7.0
> server running on a Windows 2000 SP4 box.
> They are not clustered but I want to upgrade the SQL to SQL 2000 on both
> boxes and I must also upgrade the NT4 to Win 2000.
> What I want to know is, what is the best way to do this so that I can
avail
> of SQL clustering.
> Both SQL instances should be equal so that either server can take requests
> automatically if the other fails.
> All help would be greatly appreciated.
>