Showing posts with label text. Show all posts
Showing posts with label text. Show all posts

Wednesday, March 28, 2012

Poor performance import text file

Hi,

I'm very new at SSIS. I've got a package to import a 1,000,000 row tab delimited text file into my SQL2005 database. Using SSIS with a Text File source and OLE DB PROVIDER target it crawls. I do have it skipping error rows but that is the only logic I am using. No indexes on the table either. This is pretty basic and it takes SSIS 1.5 hours, DTS blows this away... Assuming this is not something outside of SSIS(like the network, or a user locking issue), what I am I doing wrong?

BTW -- I'm searching for some batch commit sizes, like in DTS, but I cannot find them.

Any ideas.

From the information that you've given, it's hard to know what the problem is, but here are a few things you can check.

Try to isolate the problem. Change the destination to a rowcount or trash destination from SQLIS.com, see if it improves the throughput.

Is the flatfile on the same machine as the executing package?

Are you minimally logged on the destination?

Is the destination DB on the same machine?

Have you tried the SQL Server Destination?

How many errors are you getting from the flat file?

Rows per batch is on the OLEDB Destination Adapter. Did you try changing that?

K

Monday, March 26, 2012

Poll - Stored Procedure vs. Command Text?

Has anyone found a clear benefit to one over the other for complex SQL
in Reporting Services reports?
I've stayed away from stored procedures so that my report development
lifecycle can remain mostly independent from my team's database
migrations, but if there is a clear benefit, I will strongly consider
it.
Thanks!
Mike"Bassist695" <Michael.EJ.Reynolds@.gmail.com> wrote in
news:1123614436.830410.247520@.g14g2000cwa.googlegroups.com:
> Has anyone found a clear benefit to one over the other for complex SQL
> in Reporting Services reports?
> I've stayed away from stored procedures so that my report development
> lifecycle can remain mostly independent from my team's database
> migrations, but if there is a clear benefit, I will strongly consider
> it.
> Thanks!
> Mike
>
I've used both. I prefer to use queries. I'll only used stored procs if 1)
I'll be reusing the same query in a number of reports, and I want to
simplify my life for maintenance, or 2) I need to do some processing on
values prior to returning data.
I query data from 3rd party software and I hate to place stored procs in
those databases. It's too easy to forget them, have have the software
company blow them away during an update.

Friday, March 23, 2012

Point In Time Restore Question

This is a multi-part message in MIME format.
--=_NextPart_000_0038_01C393F7.79D233D0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I am restoring a production database onto a test server to a point in = time.
I restore the database from script with no issue, but when I try to = restore the first of 6 logs, I receive the following message;
Server: Msg 4305, Level 16, State 1, Line 1
The log in this backup set begins at LSN 237426000000004300001, which is = too late to apply to the database. An earlier log backup that includes = LSN 237424000000007700001 can be restored.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.
What am I doing wrong? What does this mean and how do I get my log = restore script to work to get my database restored to a point in time?
Thanx!
--=_NextPart_000_0038_01C393F7.79D233D0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
I am restoring a production database onto a test server to a point = in time.

I restore the database from script with no issue, but when I try to = restore the first of 6 logs, I receive the following message;

Server: Msg 4305, Level 16, State 1, Line 1The log in this = backup set begins at LSN 237426000000004300001, which is too late to apply to the = database. An earlier log backup that includes LSN 237424000000007700001 can be restored.Server: Msg 3013, Level 16, State 1, Line 1RESTORE LOG = is terminating abnormally.

What am I doing wrong? What does this mean and how do I get = my log restore script to work to get my database restored to a point in = time?

Thanx!
--=_NextPart_000_0038_01C393F7.79D233D0--JLS
This is telling you that you have a missing log between the database you
restored and the log that you are trying to restore. The message is telling
you that you need the log backup containing:
LSN 237424000000007700001
The log you are attempting to restore starts with:
LSN 237426000000004300001
As you can see, your log start point is greater. If you have no log backups
between the database backup and the 7700001 log backup, then that may mean
that the log was truncated during that period. When the chain of LSNs is
incomplete, you cannot restore past the break.
(In the MSDN, search for "SQL LSN" and you will get some background on
this.)
Russell Fields
"JLS" <judy.shoop@.sartomer.com> wrote in message
news:%23RvzWiBlDHA.2364@.TK2MSFTNGP11.phx.gbl...
I am restoring a production database onto a test server to a point in time.
I restore the database from script with no issue, but when I try to restore
the first of 6 logs, I receive the following message;
Server: Msg 4305, Level 16, State 1, Line 1
The log in this backup set begins at LSN 237426000000004300001, which is too
late to apply to the database. An earlier log backup that includes LSN
237424000000007700001 can be restored.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.
What am I doing wrong? What does this mean and how do I get my log restore
script to work to get my database restored to a point in time?
Thanx!|||I do a full database backup, then an hour later I start my hourly log
backups.
I think I may need to do a log backup immediately after the database backup
if the log is somehow being truncated after the full backup, and before my
hourly log backup job starts. I need to have a full backup and an hourly
log backup.
The full backup is scheduled for 7:45, then the hourly log backups kick off
at 8:45. The first log backup I am trying to restore is the one right after
the full database backup, therefore, I guess the log is being truncated
somehow in that hour window.
Thanx for the tip on looking this up in MSDN.
--
JUDE
"Russell Fields" <RussellFields@.NoMailPlease.Com> wrote in message
news:%23S2DROClDHA.2772@.TK2MSFTNGP12.phx.gbl...
> JLS
> This is telling you that you have a missing log between the database you
> restored and the log that you are trying to restore. The message is
telling
> you that you need the log backup containing:
> LSN 237424000000007700001
> The log you are attempting to restore starts with:
> LSN 237426000000004300001
> As you can see, your log start point is greater. If you have no log
backups
> between the database backup and the 7700001 log backup, then that may mean
> that the log was truncated during that period. When the chain of LSNs is
> incomplete, you cannot restore past the break.
> (In the MSDN, search for "SQL LSN" and you will get some background on
> this.)
> Russell Fields
>
> "JLS" <judy.shoop@.sartomer.com> wrote in message
> news:%23RvzWiBlDHA.2364@.TK2MSFTNGP11.phx.gbl...
> I am restoring a production database onto a test server to a point in
time.
> I restore the database from script with no issue, but when I try to
restore
> the first of 6 logs, I receive the following message;
> Server: Msg 4305, Level 16, State 1, Line 1
> The log in this backup set begins at LSN 237426000000004300001, which is
too
> late to apply to the database. An earlier log backup that includes LSN
> 237424000000007700001 can be restored.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE LOG is terminating abnormally.
> What am I doing wrong? What does this mean and how do I get my log
restore
> script to work to get my database restored to a point in time?
> Thanx!
>|||Definitely, you don't have to do another log backup
straight after full backup.
When you backup transaction log to the same log backup
file, make sure you use WITH NOINIT option which do not
overwrite the previous backup. Or backup to the different
file name.
When you restore transaction log, you specify WITH FILE=[file no] to specify file number on the file.|||In addition, look in msdb, the backup history tables. These might assist in finding out where the
missing log backups went.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"Johnny" <anonymous@.discussions.microsoft.com> wrote in message
news:2d30601c39474$bfb89c90$a601280a@.phx.gbl...
> Definitely, you don't have to do another log backup
> straight after full backup.
> When you backup transaction log to the same log backup
> file, make sure you use WITH NOINIT option which do not
> overwrite the previous backup. Or backup to the different
> file name.
> When you restore transaction log, you specify WITH FILE=> [file no] to specify file number on the file.|||Thanx Johnny, but I am doing everything that you have suggested. I backup
the log to the same backup file as the database, it is the first log file
backup after the full database backup, and when I restore I use WITH FILE
[file no]. The backup most certainly contains WITH NOINIT, until the full
database backup occurs the next night, this is when I INIT.
"Johnny" <anonymous@.discussions.microsoft.com> wrote in message
news:2d30601c39474$bfb89c90$a601280a@.phx.gbl...
> Definitely, you don't have to do another log backup
> straight after full backup.
> When you backup transaction log to the same log backup
> file, make sure you use WITH NOINIT option which do not
> overwrite the previous backup. Or backup to the different
> file name.
> When you restore transaction log, you specify WITH FILE=> [file no] to specify file number on the file.|||Ok, great! I will, because I would actually like to know what has happened.
Thanx!
"Tibor Karaszi" <tibor.please_reply_to_public_forum.karaszi@.cornerstone.se>
wrote in message news:OFpE3dIlDHA.1764@.tk2msftngp13.phx.gbl...
> In addition, look in msdb, the backup history tables. These might assist
in finding out where the
> missing log backups went.
> --
> Tibor Karaszi, SQL Server MVP
> Archive at: http://groups.google.com/groups?oi=djq&as
ugroup=microsoft.public.sqlserver
>
> "Johnny" <anonymous@.discussions.microsoft.com> wrote in message
> news:2d30601c39474$bfb89c90$a601280a@.phx.gbl...
> > Definitely, you don't have to do another log backup
> > straight after full backup.
> >
> > When you backup transaction log to the same log backup
> > file, make sure you use WITH NOINIT option which do not
> > overwrite the previous backup. Or backup to the different
> > file name.
> >
> > When you restore transaction log, you specify WITH FILE=> > [file no] to specify file number on the file.
>

Monday, March 12, 2012

PLS HELP: Problem altering columns with full text serach enabled

Hi,
I have the following script which enables full text search on the database:
sp_fulltext_database 'enable'
sp_fulltext_catalog 'cntdocimg', 'create'
sp_fulltext_table 'ContactDocumentImage', 'create', 'cntdocimg',
'PK_ContactDocumentImage'
sp_fulltext_column 'ContactDocumentImage', 'imgDocumentImage', 'add', 1,
'sDocType'
sp_fulltext_table 'ContactDocumentImage', 'activate'
sp_fulltext_catalog 'cntdocimg', 'start_full'
sp_fulltext_table 'ContactDocumentImage', 'start_change_tracking'
sp_fulltext_table 'ContactDocumentImage', 'start_background_updateindex'
This script creates full text search for column "imgDocumentImage" of
table "ContactDocumentImage" and defines type of stored document by
looking at column "sDocType".
Now, the problem is that i need to alter the column sDocType to make it
nvarchar(10) instead of nvarchar(3) as it currently is; but when i run
ALTER statement it says that sDocType column is used by some other
object. Then i tried to disable full text search, and it did NOT help
either.
Could anyone please please please help me here!
Thank you in advance,
Andrey
First off I think this statement is incorrect
sp_fulltext_column 'ContactDocumentImage', 'imgDocumentImage', 'add', 1,
'sDocType'
it should be something like this
sp_fulltext_column 'ContactDocumentImage', 'imgDocumentImage', 'add', 1033,
'sDocType'
replace 1 with your lcid.
Secondly, the full-text index is the problem here. There is little you can
do without dropping the fulltext index, then making the change, and then
readding it.
One option is to come up with a new extension XXX lets say and bind the
iFilter to this extension. So if the extension is config and you want to
have the word iFilter index it, you would put XXX in the column for
documents of the config extension and then add the office iFilter pesistent
handler to XXX, like this
[HKEY_CLASSES_ROOT\.XXX\PersistentHandler]
@.="{98de59a0-d175-11cd-a7bd-00006b827d94}"
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"MuZZy" <tnr@.newsgroups.nospam> wrote in message
news:uxNZPiaDHHA.3476@.TK2MSFTNGP04.phx.gbl...
> Hi,
> I have the following script which enables full text search on the
> database:
> ----
> sp_fulltext_database 'enable'
> sp_fulltext_catalog 'cntdocimg', 'create'
> sp_fulltext_table 'ContactDocumentImage', 'create', 'cntdocimg',
> 'PK_ContactDocumentImage'
> sp_fulltext_column 'ContactDocumentImage', 'imgDocumentImage', 'add', 1,
> 'sDocType'
> sp_fulltext_table 'ContactDocumentImage', 'activate'
> sp_fulltext_catalog 'cntdocimg', 'start_full'
> sp_fulltext_table 'ContactDocumentImage', 'start_change_tracking'
> sp_fulltext_table 'ContactDocumentImage', 'start_background_updateindex'
> ----
>
> This script creates full text search for column "imgDocumentImage" of
> table "ContactDocumentImage" and defines type of stored document by
> looking at column "sDocType".
> Now, the problem is that i need to alter the column sDocType to make it
> nvarchar(10) instead of nvarchar(3) as it currently is; but when i run
> ALTER statement it says that sDocType column is used by some other object.
> Then i tried to disable full text search, and it did NOT help either.
> Could anyone please please please help me here!
> Thank you in advance,
> Andrey
|||Hi Hilary,
Thanks for the response! 1 as lcid works in SQL 2000, but you are right,
in SQL 2005 it has to be 1033.
It's fine if i have to drop the fulltext index, but i'm not sure how,
and which piece of the script i will need to run after.
Could you please help me based on the script below?
sp_fulltext_database 'enable'
sp_fulltext_catalog 'cntdocimg', 'create'
sp_fulltext_table 'ContactDocumentImage', 'create', 'cntdocimg',
'PK_ContactDocumentImage'
sp_fulltext_column 'ContactDocumentImage', 'imgDocumentImage', 'add', 1,
'sDocType'
sp_fulltext_table 'ContactDocumentImage', 'activate'
sp_fulltext_catalog 'cntdocimg', 'start_full'
sp_fulltext_table 'ContactDocumentImage', 'start_change_tracking'
sp_fulltext_table 'ContactDocumentImage', 'start_background_updateindex'
Thanks a lot!
Andrey
Hilary Cotter wrote:
> First off I think this statement is incorrect
> sp_fulltext_column 'ContactDocumentImage', 'imgDocumentImage', 'add', 1,
> 'sDocType'
> it should be something like this
> sp_fulltext_column 'ContactDocumentImage', 'imgDocumentImage', 'add', 1033,
> 'sDocType'
> replace 1 with your lcid.
> Secondly, the full-text index is the problem here. There is little you can
> do without dropping the fulltext index, then making the change, and then
> readding it.
> One option is to come up with a new extension XXX lets say and bind the
> iFilter to this extension. So if the extension is config and you want to
> have the word iFilter index it, you would put XXX in the column for
> documents of the config extension and then add the office iFilter pesistent
> handler to XXX, like this
>
> [HKEY_CLASSES_ROOT\.XXX\PersistentHandler]
> @.="{98de59a0-d175-11cd-a7bd-00006b827d94}"
>
>
|||Try drop fulltext index on TableName
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"MuZZy" <tnr@.newsgroups.nospam> wrote in message
news:456486B0.6050700@.newsgroups.nospam...[vbcol=seagreen]
> Hi Hilary,
> Thanks for the response! 1 as lcid works in SQL 2000, but you are right,
> in SQL 2005 it has to be 1033.
>
> It's fine if i have to drop the fulltext index, but i'm not sure how, and
> which piece of the script i will need to run after.
> Could you please help me based on the script below?
> sp_fulltext_database 'enable'
> sp_fulltext_catalog 'cntdocimg', 'create'
> sp_fulltext_table 'ContactDocumentImage', 'create', 'cntdocimg',
> 'PK_ContactDocumentImage'
> sp_fulltext_column 'ContactDocumentImage', 'imgDocumentImage', 'add', 1,
> 'sDocType'
> sp_fulltext_table 'ContactDocumentImage', 'activate'
> sp_fulltext_catalog 'cntdocimg', 'start_full'
> sp_fulltext_table 'ContactDocumentImage', 'start_change_tracking'
> sp_fulltext_table 'ContactDocumentImage', 'start_background_updateindex'
>
> Thanks a lot!
> Andrey
>
> Hilary Cotter wrote:
|||Hilary Cotter wrote:
> Try drop fulltext index on TableName
>
I'm using SQL 2000 - it doesn't have DROP FULLTEXT statement
Any other ideas?
Thank you,
Andrey
|||try sp_fulltext_column 'tablename', 'columnName', 'drop',
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"MuZZy" <tnr@.newsgroups.nospam> wrote in message
news:OAR8Eu$DHHA.1748@.TK2MSFTNGP02.phx.gbl...
> Hilary Cotter wrote:
> I'm using SQL 2000 - it doesn't have DROP FULLTEXT statement
> Any other ideas?
> Thank you,
> Andrey
|||Hilary Cotter wrote:
> try sp_fulltext_column 'tablename', 'columnName', 'drop',
>
Hi Hilary,
I actually tried even more than that to completely disable fulltext
search for the database:
sp_fulltext_column 'ContactDocumentImage', 'imgDocumentImage', 'drop'
sp_fulltext_table 'ContactDocumentImage', 'drop'
sp_fulltext_database 'disable'
I was hoping it would disable fulltext search and "unlock" the column
sDocType for altering. It didn't help - i still get the same error when
trying to ALTER that column:
Server: Msg 5074, Level 16, State 7, Line 6
The object 'CompanyDocumentImage' is dependent on column 'sDocType'.
Server: Msg 4922, Level 16, State 1, Line 6
ALTER TABLE ALTER COLUMN sDocType failed because one or more objects
access this column.
Any ideas?
Thank you,
Andrey
|||I am unable to repro your problem. What sp are you running?
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"MuZZy" <tnr@.newsgroups.nospam> wrote in message
news:456A53A3.5000603@.newsgroups.nospam...
> Hilary Cotter wrote:
> Hi Hilary,
> I actually tried even more than that to completely disable fulltext search
> for the database:
> sp_fulltext_column 'ContactDocumentImage', 'imgDocumentImage', 'drop'
> sp_fulltext_table 'ContactDocumentImage', 'drop'
> sp_fulltext_database 'disable'
>
> I was hoping it would disable fulltext search and "unlock" the column
> sDocType for altering. It didn't help - i still get the same error when
> trying to ALTER that column:
> Server: Msg 5074, Level 16, State 7, Line 6
> The object 'CompanyDocumentImage' is dependent on column 'sDocType'.
> Server: Msg 4922, Level 16, State 1, Line 6
> ALTER TABLE ALTER COLUMN sDocType failed because one or more objects
> access this column.
>
> Any ideas?
> Thank you,
> Andrey
|||Hilary Cotter wrote:
> I am unable to repro your problem. What sp are you running?
>
SP4 with Hotfix for SP 4

pls help.......very urgent....

is there any possible way to have a page break each time a text field from the report changes.

i am using CR 8.5 and VB6

if possible can anyone who has the answer pls contact on msn mesenger....
amit_mash@.hotmail.com

PS: i am attaching a report i generated. i want to have a page break each time the value of the text field containing 'Blood Routine (CBC)' changes.The field you want to page break on first must be part of a sort group. Then the group header and footer will appear. In Format Section select the group and check page break before or after as needed.