2012年2月18日星期六
bcp
hi Viktor,
"Viktor Zadro" <viktor.zadro@.tel.net.ba> ha scritto nel messaggio
news:O1IHIcPtEHA.2192@.TK2MSFTNGP14.phx.gbl
> How implements bcp.exe in visual basic.net project.
how would you implement BCP?
you can "shell" to it, or you could "import" the COM object definition of
bcp (via INTEROP) and access it's properties and methods...
http://msdn.microsoft.com/library/de..._ob_b_8o8k.asp
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
2012年2月11日星期六
Basics Question for Non tecnical people
SQLserver2000.
I mean information like how many records a DB can hold, those questions that
have no answer in the product overview or What are the advantages comparing
it to Oracle etc.
I need to talk to Non technical people, and those are pretty much the
questions they ask.
ThanksHi
There are plenty of case studies and information on the SQL server web site
www.microsoft.com/sql. It would make more sense to compare SQL 2005 if you
are looking at a new purchase.
As far as number of records, the capacity is really dependent on hardware
and design rather than the DBMS for both.
John
"Kenny M." wrote:
> Hi, Anybody can give me a link where I can find basic information about
> SQLserver2000.
> I mean information like how many records a DB can hold, those questions th
at
> have no answer in the product overview or What are the advantages comparin
g
> it to Oracle etc.
> I need to talk to Non technical people, and those are pretty much the
> questions they ask.
> Thanks|||John Bell a écrit :
> Hi
> There are plenty of case studies and information on the SQL server web sit
e
> www.microsoft.com/sql. It would make more sense to compare SQL 2005 if you
> are looking at a new purchase.
> As far as number of records, the capacity is really dependent on hardware
> and design rather than the DBMS for both.
> John
> "Kenny M." wrote:
>
About how many rows wich must be query as how much data cans I have in
SQL Server, according to Wintercorp, there is a firm that use SQL Server
for _ 20 To database...
A +
Frédéric BROUARD, MVP SQL Server, expert bases de données et langage SQL
Le site sur le langage SQL et les SGBDR : http://sqlpro.developpez.com
Audit, conseil, expertise, formation, modélisation, tuning, optimisation
********************* http://www.datasapiens.com ***********************
Basic: Starting SQL Server
Hello,
I am having trouble just starting SQL Server 2005. When I try to use Management Studio, I do not see any server name. I just need to be able to start it up!
Thanks,
pagates
Hi pagates,
One of the easiest ways to start SQL Server 2005 is go to Start -> Control Panel -> Administrative Tools -> Services. Look up for a service by the name SQL Server or SQL Server (your instance name), right click -> Start. If you do not see this service listed, it is likely that you have installed only the client tools for SQL Server 2005 and not the server.
Hope that helps,
Amol.
Basic, perhaps silly SQLServer 2005 question
I've recently started to learn ASP.net. I've installed
Visual Web Developer 2005 Express and this includes
SQLServer 2005 in the installation. The task manager
and and the list of services definitely show I've got
SQLServer running on my computer.
Here's the problem: how do I actually use it? I can't
find any tools to create and access databases.
I've tried installing the Enterprise Manager from 2000
but this gives me an error message saying I must use the 2005
tools to connect.
So, is there an Enterprise Manager (or similar) for 2005?
Where do I find it?Download Microsoft SQL Server Management Studio Express from
http://www.microsoft.com/downloads/...&DisplayLang=en
Denis the SQL Menace
http://sqlservercode.blogspot.com/|||"SQL" <denis.gobo@.gmail.com> wrote in message
news:1145465194.532705.252780@.u72g2000cwu.googlegr oups.com...
> Download Microsoft SQL Server Management Studio Express from
> http://www.microsoft.com/downloads/...&DisplayLang=en
Thanks, thats great
Basic Windows Authentication Question
I want to give access to a database to all users in a domain
using Windows Authentication. I thought that this would be as simple as
adding a login which specifies the domain only, but this does not seem to be
possible. I can't believe that you have to enter every single domain user
as a login in SQL Server. Someone please tell me this is not the case!Hi,
Not required, Create OS Group and all the domain users to that group. After
that give the previlages to
that domain group to SQL Server.
Thanks
Hari
MCDBA
"Gorge Bush" <bill.gates@.microcock.cum> wrote in message
news:#FwxRFFVEHA.2320@.TK2MSFTNGP10.phx.gbl...
> Hi there,
> I want to give access to a database to all users in a
domain
> using Windows Authentication. I thought that this would be as simple as
> adding a login which specifies the domain only, but this does not seem to
be
> possible. I can't believe that you have to enter every single domain user
> as a login in SQL Server. Someone please tell me this is not the case!
>|||"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:e0rMaRFVEHA.2484@.TK2MSFTNGP11.phx.gbl...
> Not required, Create OS Group and all the domain users to that group.
After
> that give the previlages to
> that domain group to SQL Server.
O.K. Thanks, but the whole point of this exercise is to be able to identify
the user at the database level. Will the system_user or current_user
variables be set to the individual or the group?|||> O.K. Thanks, but the whole point of this exercise is to be able to
identify
> the user at the database level. Will the system_user or current_user
> variables be set to the individual or the group?
I answered that myself. It works!|||Hi,
Yes, you are correct.
Thanks
Hari
MCDBA
"Gorge Bush" <bill.gates@.microcock.cum> wrote in message
news:OpwBIeFVEHA.3788@.TK2MSFTNGP12.phx.gbl...
> identify
> I answered that myself. It works!
>|||Refer to information about the predefined Domain Users group at
http://www.microsoft.com/windows200...sp?url=/windows
2000/en/server/help/sag_SEconceptsImpGroups.htm
Then, just grant access to this group.
-Mark Shlimovich
basic vs. advance
Does anyone knows the differences or if there is a document available
explaining the differences between the following under SQL 2005 server:
Basic ETL and Advance ETL
Standard OLAP and Advance OLAP
Standard Reporting and Advance Reporting
Thanks
Mark
I'm interested in knowing too...
burt_king@.yahoo.com
"Mark" wrote:
> Hi,
> Does anyone knows the differences or if there is a document available
> explaining the differences between the following under SQL 2005 server:
> Basic ETL and Advance ETL
> Standard OLAP and Advance OLAP
> Standard Reporting and Advance Reporting
>
> Thanks
> Mark
>
>
>
>
basic vs. advance
Does anyone knows the differences or if there is a document available
explaining the differences between the following under SQL 2005 server:
Basic ETL and Advance ETL
Standard OLAP and Advance OLAP
Standard Reporting and Advance Reporting
Thanks
MarkI'm interested in knowing too...
--
burt_king@.yahoo.com
"Mark" wrote:
> Hi,
> Does anyone knows the differences or if there is a document available
> explaining the differences between the following under SQL 2005 server:
> Basic ETL and Advance ETL
> Standard OLAP and Advance OLAP
> Standard Reporting and Advance Reporting
>
> Thanks
> Mark
>
>
>
>
basic vs. advance
Does anyone knows the differences or if there is a document available
explaining the differences between the following under SQL 2005 server:
Basic ETL and Advance ETL
Standard OLAP and Advance OLAP
Standard Reporting and Advance Reporting
Thanks
MarkI'm interested in knowing too...
--
burt_king@.yahoo.com
"Mark" wrote:
> Hi,
> Does anyone knows the differences or if there is a document available
> explaining the differences between the following under SQL 2005 server:
> Basic ETL and Advance ETL
> Standard OLAP and Advance OLAP
> Standard Reporting and Advance Reporting
>
> Thanks
> Mark
>
>
>
>
Basic VS Advanced Integration Services
http://www.microsoft.com/sql/prodinfo/features/compare-features.mspx
-Jamie
|||I have seen this link. But that doesn't give me a good comparison between the Basic and the Enterprise editions of SQL Server Integration Services. Thanks|||
Yes it does (assuming that by "Basic" you mean "Standard". There is no "Basic" edition).
At the bottom of that page you'll see "SQL Server Integration Services Data Flow Integration" and "Text Mining" with a tick in the "Enterprise" column. That's the difference between Enterprise and other editions. There is nothing else. Note that these include Fuzzy operations.
-Jamie
Basic Upgrade questions
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
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 Trigger Firing Question
I seem to be having a problem where the trigger is firing only for some of the inserted records but not others, seemingly randomly (although I know there must be some logical explanation for how it's choosing which record to fire under).
Thanks =) MattHere's how I ended up getting multirow inserts to work properly using an INSTEAD OF trigger rather than a AFTER trigger.
-- INSTEAD OF Trigger That Fires Single-Row AFTER Triggers for a Table with IDENTITY
CREATE TRIGGER trg_T1IOIS ON T1 INSTEAD OF INSERT
AS
SELECT IDENTITY(int, 1, 1) AS key_col, data_col
INTO #t1
FROM inserted
DECLARE @.key AS int
SELECT @.key = MIN(key_col) FROM #t1
WHILE @.key IS NOT NULL
BEGIN
INSERT INTO T1
SELECT data_col FROM #t1 WHERE key_col = @.key
SELECT @.key = MIN(key_col)
FROM #t1
WHERE key_col > @.key
END
GO|||Each Trigger written should be able to deal with either a Single Insert/Delete/update or Bulk Insert/Delete/update
I tend to use the following Format :-
BEGIN
IF @.@.RowCount =1
BEGIN
/*DO SINGLE ROW OPERATION*/
END
ELSE
BEGIN
/*DO MULTI ROW OPERATION*/
END
END
Generally I alter the TSQL to cope with both eventualities
and I believe it is good practice to apply this to ALL Triggers unless of course there are special cicumstances.
Hope this Helps
GW
basic trigger ?
I want to have a trigger than when record is inserting into table A, the
trigger inserts a record into table B
I want the identity value from Table A to be one of the values inserted into
table B.
How do I get the indentity value from tableA in my trigger so that I can
insert into table b
thanksAussie Rules (someone@.somewhere.com) writes:
> I want to have a trigger than when record is inserting into table A, the
> trigger inserts a record into table B
> I want the identity value from Table A to be one of the values inserted
> into table B.
> How do I get the indentity value from tableA in my trigger so that I can
> insert into table b
CREATE TRIGGER A_tri ON A FOR INSERT AS
INSERT B (some_col, some_other_col, ...)
SELECT i.identity_col, i.other_col, ...
FROM inserted i
JOIN ...
inserted is a virttual table holds the inserted rows, so you find the
identity value right there.
Be aware of that a trigger fires once per *statement*.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Sirs
You might want to consider using 'After Insert' instead of 'For
Insert'. This way you know that the record has been successfully inserted
into Table A, Before you insert into Table B.
Mark
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns96C24758FE7FYazorman@.127.0.0.1...
> Aussie Rules (someone@.somewhere.com) writes:
the
> CREATE TRIGGER A_tri ON A FOR INSERT AS
> INSERT B (some_col, some_other_col, ...)
> SELECT i.identity_col, i.other_col, ...
> FROM inserted i
> JOIN ...
> inserted is a virttual table holds the inserted rows, so you find the
> identity value right there.
> Be aware of that a trigger fires once per *statement*.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp
>|||I expect you meant Instead Of rather than For.
For Insert triggers are classified as After Insert triggers, and only fire
after the row has been successfully inserted. Instead Of triggers fire in
place of the triggering action. If you want to perform an insert, then the
body of the Instead Of Insert trigger must issue an insert into the
underlying table.
"Mark Moss" <markmoss@.adelphia.net> wrote in message
news:O4hAxQPrFHA.1172@.TK2MSFTNGP11.phx.gbl...
> Sirs
> You might want to consider using 'After Insert' instead of 'For
> Insert'. This way you know that the record has been successfully inserted
> into Table A, Before you insert into Table B.
> Mark
> "Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
> news:Xns96C24758FE7FYazorman@.127.0.0.1...
> the
inserted
can
>
basic tlog question
written to the log file first ? I know they do, but are they also in
memory.. I understand the part where dirty pages are written to disk.. at
checkpoints or lazy writers or thru worker threads...what im a bit confused
is when it talks about writing to disk, is it referring to the data files on
disk or the log files on disk..
Can someone just give me a 2 to 3 liner on the initial part before the data
actually gets written to the disk i.e. disk that contains the data files ?
Yes, the log records are written to memory too, to an area called 'log
cache', and SQL Server has a logic to make sure these cached log records are
written to log files, before the associated dirty pages are written to disk.
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:e3WwGOvaEHA.3524@.TK2MSFTNGP12.phx.gbl...
> whenever a transaction or a SQL statement executes, do the changes get
> written to the log file first ? I know they do, but are they also in
> memory.. I understand the part where dirty pages are written to disk.. at
> checkpoints or lazy writers or thru worker threads...what im a bit
confused
> is when it talks about writing to disk, is it referring to the data files
on
> disk or the log files on disk..
> Can someone just give me a 2 to 3 liner on the initial part before the
data
> actually gets written to the disk i.e. disk that contains the data files ?
>
basic tlog question
written to the log file first ? I know they do, but are they also in
memory.. I understand the part where dirty pages are written to disk.. at
checkpoints or lazy writers or thru worker threads...what im a bit confused
is when it talks about writing to disk, is it referring to the data files on
disk or the log files on disk..
Can someone just give me a 2 to 3 liner on the initial part before the data
actually gets written to the disk i.e. disk that contains the data files ?Yes, the log records are written to memory too, to an area called 'log
cache', and SQL Server has a logic to make sure these cached log records are
written to log files, before the associated dirty pages are written to disk.
--
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:e3WwGOvaEHA.3524@.TK2MSFTNGP12.phx.gbl...
> whenever a transaction or a SQL statement executes, do the changes get
> written to the log file first ? I know they do, but are they also in
> memory.. I understand the part where dirty pages are written to disk.. at
> checkpoints or lazy writers or thru worker threads...what im a bit
confused
> is when it talks about writing to disk, is it referring to the data files
on
> disk or the log files on disk..
> Can someone just give me a 2 to 3 liner on the initial part before the
data
> actually gets written to the disk i.e. disk that contains the data files ?
>
basic tlog question
written to the log file first ? I know they do, but are they also in
memory.. I understand the part where dirty pages are written to disk.. at
checkpoints or lazy writers or thru worker threads...what im a bit confused
is when it talks about writing to disk, is it referring to the data files on
disk or the log files on disk..
Can someone just give me a 2 to 3 liner on the initial part before the data
actually gets written to the disk i.e. disk that contains the data files ?Yes, the log records are written to memory too, to an area called 'log
cache', and SQL Server has a logic to make sure these cached log records are
written to log files, before the associated dirty pages are written to disk.
--
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:e3WwGOvaEHA.3524@.TK2MSFTNGP12.phx.gbl...
> whenever a transaction or a SQL statement executes, do the changes get
> written to the log file first ? I know they do, but are they also in
> memory.. I understand the part where dirty pages are written to disk.. at
> checkpoints or lazy writers or thru worker threads...what im a bit
confused
> is when it talks about writing to disk, is it referring to the data files
on
> disk or the log files on disk..
> Can someone just give me a 2 to 3 liner on the initial part before the
data
> actually gets written to the disk i.e. disk that contains the data files ?
>
basic timestamp question.
Hello I have a very basic timestamp question. There is a data type in SQl Servertimestamp.
what I basically want is that when someone Inserts a data the timestamp column puts a timestamp there...how can i achieve that?...I thought that the timestamp type automatically does that
Yes you cannot insert into a timestamp column. SQL Server does that for you.
|||If it puts a time stamp then instead of seeing some date when I open the table and look under the timestamp column I see something like: 0x00000000E4EBF66E
what does that mean? why it is not putting date there?
|||Thats the hex value of the date/time value. Its very specific. I forget what measure of time it measures to, but its very specific.
Tim
|||
sahajMarg:
If it puts a time stamp then instead of seeing some date when I open the table and look under the timestamp column I see something like: 0x00000000E4EBF66E
what does that mean? why it is not putting date there?
Yes its a binary number assigned by SQL Server. you should read up books online for timestamp columns to understand where/how it can be used.
|||
sahajMarg:
If it puts a time stamp then instead of seeing some date when I open the table and look under the timestamp column I see something like: 0x00000000E4EBF66E
what does that mean? why it is not putting date there?
Yes its a binary number assigned by SQL Server. you should read up books online for timestamp columns to understand where/how it can be used.
||| Just read it the same post the it is the Hex value of date and time..is that correct?
Basic Text File Data Flow Source
In DTS 2000 I had a situation where I had a text file as input source and text file as output source. On migrating the package to 2005 it puts a wrapper around it which executes it as a 2000 package, the rest of the tasks are neatly converted to 2005 style tasks. I presume this to mean that this will not be supported through to the next version, and there is no direct equivalent in 2005.
My question is how do I import a non-flat file source which has different numbers of columns per line. I did ,somehow, manage to do this with 2000 but cannot seem to get anywhere with 2005.
The flat file source seems to be expecting a common number of columns and just can't seem to cope with no column delimiters on some lines. If anybody knows different I would be glad to hear about it.
Raw data is not helpful to me as only works with a specific raw type (apparently)
Went onto Bulk Insert Task but got this message
[Bulk Insert Task] Error: An error occurred with the following error message: "Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.Bulk load: An unexpected end of file was encountered in the data file.".
Have already browsed with this on web but only find comments about changing timeout setting.
Can find timeout settings in DataFlow source and DataFlow destinations but not in Bulk Insert Task.
As you can see this is a long and protracted question.
If the answer is simple I apologise if not blame Microsoft. Other than that have found SSIS has some nice improvements, apart from the odd vague error message I keep coming across.
Set up your flat file source to read in one big long line. Then inside your data flow, use a derived column to substring() out your different columns. OR you can use a conditional split to move your different record layouts to their own flat files, to be read inside another data flow.Search around this forum for conversations and examples on this topic.|||
I am certainly no expert, but there have been a few discussions on getting around the flat file import with variable columns. After a very brief search, I would suggest that you see the following thread:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1134754&SiteID=1
As well as:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1546075&SiteID=1
As to your other question, I am not certain of the bulk insert task error that you are getting, but I am sure someone else will be along to answer it for you shortly.
:-)
(Of course there is a reply in the time it takes me to type this up....)
|||Have been looking into this answer.
Seem to have hit a row limit. Imports the first 158383 lines out of 665525 and then stops. Have had a brief browse to see if there is a number of rows limit but other than someone mentioning a million lines in a flat file have found no other information.
Can anybody confirm this number or can this problem be remedied.
|||Well, I know that the limit, if there is one, is not as low as 158383 as I have retrieved over 700k lines from a flat file. (I do not believe that there is an upper bound on the number of rows a flat file source can handle)
Have you turned on logging to see if there is a problem with the import? Or, have you set up an event handler or anything of that nature? I would have to think that there is something wrong with the data...
|||With a bit of playing around I found out that if I set the second column to text only 158383 get copied into the table whereas with varchar(255) 665517 get copied.
Looking into the scripting solution but so far have only got 15 columns of blanks being written. Tried putting in breakpoints but must be missing something really basic as not breaking and when going back into script breakpoint vanished. I am using this event
PublicOverridesSub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
as set up by SSIS I presume this is set up to work with each row received from the data source. Am I wrong? Am I missing some settings?
|||Obviously replied to wrong one earlier for previous post see up a couple of messages. Have partially discovered what is wrong. Am correctly applying data to right output columns. However inital column data is wrong. I seem to trying to split the Row.Column1.ToString which returns the type blob? A bit puzzled here. Having great difficulty locating where the column data actually is so I can split it.|||
Madhattuer wrote:
Obviously replied to wrong one earlier for previous post see up a couple of messages. Have partially discovered what is wrong. Am correctly applying data to right output columns. However inital column data is wrong. I seem to trying to split the Row.Column1.ToString which returns the type blob? A bit puzzled here. Having great difficulty locating where the column data actually is so I can split it.
How are you trying to do this?
# Delimiter character is ";" in this example; change to what you need:
Dim myStringSplit as String() = Split(Row.Column1.ToString, ';')|||If it is a blob(and it would be if you set the type to DT_TEXT or if the data is binary), you have to read the data using the GetBlobData method, and then convert it to a string, before applying the split function.|||
jwelch wrote:
If it is a blob(and it would be if you set the type to DT_TEXT or if the data is binary), you have to read the data using the GetBlobData method, and then convert it to a string, before applying the split function.
Ah yes... And in converting that blob data to a string, won't the developer have to split that blob stream up into 4,000 byte chunks? (That is, assuming the input string length is more than 4,000 characters...)|||
Yes I would split using the method you described earlier.
Yes correctly identified that the input column to the scripting was of type TEXT.
I did notice the GetBlobData and noticed that it returned in byte form. I might have another brief glance at this. Hopefully 255 characters should be enough. On one of the files the largest column on one of the rows has a maximum of 60 but the other columns shouldn't really get as big as this.
Thanks for all the input.
|||DT_STR will give you 4,000 characters to work with. As long as each row length is less than 4,000 characters, that's what I'd use. One caveat is that if you have embedded carriage returns/line feeds/NULLs, you'll have to read in the row as DT_TEXT (binary data).|||Whoops showing my ignorance, mind obviously still set on old 255 limits.
Ah 4000 hence your comments on the [TEXT] earler assuming length 4000 plus.
Will be using crlf as end of line so I don't thinks any of those get passed through. There are no NULLS. Thanks this has saved me a lot of time and effort.
Basic Table update/append question
In Access, I did this within VB by checking the max value of the primary key and then running the append for any values greater than that.
In SQL, I'm not sure if this should be done as a stored procedure or if there is an easier approach altogether.In SQL Server (or in Access...) you are better off using a LEFT OUTER JOIN against your destination table, and filtering where the destination table key is null:
select [YourFields]...
from SourceTable
left outer join DestinationTable on SourceTable.PKey = DestinationTable.PKey
where Destination.PKey is null
You could also use NOT EXISTS, but I prefer this method.|||Thanks, that worked really well!
Basic Table in SQL Server 2005
2005 using Enterprise Manager?
Thanks.
Sabir wrote:
> Could anyone please tell me how to create a new table in SQL Server
> 2005 using Enterprise Manager?
> Thanks.
>
Drill down to the database and Tables and right click - choose "New
Table" (it's quite simple, but maybe I am missing something in our
question?).
Regards
Steen Schlter Persson
Database Administrator / System Administrator
|||Sabir wrote:
> Could anyone please tell me how to create a new table in SQL Server
> 2005 using Enterprise Manager?
> Thanks.
>
Drill down to the database and Tables and right click - choose "New
Table" (it's quite simple, but maybe I am missing something in your
question?).
Regards
Steen Schlter Persson
Database Administrator / System Administrator
|||Sabir
Enterprise Manager has been replaced with SSMS in SQL Server 2005.
Expand the Database where table will be created --Tables--Right click on
Table folder you will 'New Table' option
"Sabir" <SabirBarkaat@.gmail.com> wrote in message
news:1178610495.965678.321780@.l77g2000hsb.googlegr oups.com...
> Could anyone please tell me how to create a new table in SQL Server
> 2005 using Enterprise Manager?
> Thanks.
>
|||... or open a query window and type your CREATE TABLE command then press execute.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Sabir" <SabirBarkaat@.gmail.com> wrote in message
news:1178610495.965678.321780@.l77g2000hsb.googlegr oups.com...
> Could anyone please tell me how to create a new table in SQL Server
> 2005 using Enterprise Manager?
> Thanks.
>