Showing posts with label restored. Show all posts
Showing posts with label restored. Show all posts

Friday, March 16, 2012

"trunc. log on chkpt" help

First time poster...
Alright this is what I got...I am running MSSQL server 2000.
I have already restored a copy of the production db to our test sql server.

What I need to do is run some update scripts (from 3rd party vendor, going to newer version of their product). The database is about 60Gb and I filled up the transaction log (causing later updates to fail) while running one of their scripts that executed 194 routines of:

alter table Table_Name add New_Column int
GO
EXEC sp_bindefault mg_zero_dflt, [Table_Name.New_Column]
GO
update Table_Name set New_Column=1
GO

Will "sp_dboption 'dbname' 'trunc. log on chkpt' 'TRUE' " automatically truncate the transaction log when approaching the transaction log file limit while running these update scripts. Then when the updates are complete go ahead and "sp_dboption 'dbname' 'trunc. log on chkpt' 'FALSE' "

I'm not worried about logging the transactions during this process, I just don't want to have the transaction log fill up while running these scripts causing it to error out.

Or is there a way to make those changes using bcp?In the database properties window, go to the options tab and set your database recovery model to "simple". This should keep the log from filling up.
When you are finished, set the recovery model back to "full" and run an immediate backup.|||Thanks for the help. I remember seeing something about that and got sidetracked with the whole 'trunc. log on chkpt' idea. I'm in the process of finishing the scripts on the test server and I'll update with results. Thanks again!|||I finished running the scripts late yesterday without any hitches. That was exactly what I was looking for!

Monday, February 13, 2012

"Drop User" statement does not seem to work

I restored a copy of the production database onto the staging db server. Som
e
of the production database users which need to be removed did not seem to
work when I issued "drop user [username]" statement. I also tried
"sp_dropuser [username]" and that did not work either. Has anyone encoun
tered
this issue? Thanks.Check out sp_change_users_login in the BOL.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
.
"Andrew" <Andrew@.discussions.microsoft.com> wrote in message
news:FF46C63C-56E8-41F7-B238-2E0DA602E209@.microsoft.com...
I restored a copy of the production database onto the staging db server.
Some
of the production database users which need to be removed did not seem to
work when I issued "drop user [username]" statement. I also tried
"sp_dropuser [username]" and that did not work either. Has anyone
encountered
this issue? Thanks.

Thursday, February 9, 2012

"cannot resolve collation conflict for equal to operation" when running view

Get the message "cannot resolve collation conflict for equal to
operation" in a view when a have restored a database on an other
computer. In this view I compare fields from myDB and master. Have
changed so I have the same collation for all my databases om SQL
Server, but still get this problem. Anyone has a suggestion?
//di6pejo
Have you checked that the columns you are comparing actually have the same
collation. Changing the collation of the database does _not_ change the
collation of the columns that exist already in the database, it only
provides a default collation for newly created columns.
Jacco Schalkwijk
SQL Server MVP
"Peter" <ingeskrap@.tjohoo.se> wrote in message
news:3aa71bd7.0407140151.4b78d2d0@.posting.google.c om...
> Get the message "cannot resolve collation conflict for equal to
> operation" in a view when a have restored a database on an other
> computer. In this view I compare fields from myDB and master. Have
> changed so I have the same collation for all my databases om SQL
> Server, but still get this problem. Anyone has a suggestion?
> //di6pejo
|||Big thanks, seem like it worked to change one of the fields is a table.
One questions though, in the setting "SQL_LAtin1_General_CP1_CI_AS" What
does "CP1" stands for?
//Peter
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
|||CP1 stands for codepage 1, which isn't actually codepage 1, but codepage
1252. It is the ANSI standard codepage (loosely translated as character
set), and is used by English and most other Western European languages. For
more information look up "code page" in BOL.
Jacco Schalkwijk
SQL Server MVP
"Pejo" <ingeskrap@.tjohoo.se> wrote in message
news:OuFu3TZaEHA.2520@.TK2MSFTNGP12.phx.gbl...
> Big thanks, seem like it worked to change one of the fields is a table.
> One questions though, in the setting "SQL_LAtin1_General_CP1_CI_AS" What
> does "CP1" stands for?
> //Peter
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!

"cannot resolve collation conflict for equal to operation" when running view

Get the message "cannot resolve collation conflict for equal to
operation" in a view when a have restored a database on an other
computer. In this view I compare fields from myDB and master. Have
changed so I have the same collation for all my databases om SQL
Server, but still get this problem. Anyone has a suggestion?
//di6pejoHave you checked that the columns you are comparing actually have the same
collation. Changing the collation of the database does _not_ change the
collation of the columns that exist already in the database, it only
provides a default collation for newly created columns.
Jacco Schalkwijk
SQL Server MVP
"Peter" <ingeskrap@.tjohoo.se> wrote in message
news:3aa71bd7.0407140151.4b78d2d0@.posting.google.com...
> Get the message "cannot resolve collation conflict for equal to
> operation" in a view when a have restored a database on an other
> computer. In this view I compare fields from myDB and master. Have
> changed so I have the same collation for all my databases om SQL
> Server, but still get this problem. Anyone has a suggestion?
> //di6pejo|||Big thanks, seem like it worked to change one of the fields is a table.
One questions though, in the setting "SQL_LAtin1_General_CP1_CI_AS" What
does "CP1" stands for'
//Peter
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!|||CP1 stands for codepage 1, which isn't actually codepage 1, but codepage
1252. It is the ANSI standard codepage (loosely translated as character
set), and is used by English and most other Western European languages. For
more information look up "code page" in BOL.
Jacco Schalkwijk
SQL Server MVP
"Pejo" <ingeskrap@.tjohoo.se> wrote in message
news:OuFu3TZaEHA.2520@.TK2MSFTNGP12.phx.gbl...
> Big thanks, seem like it worked to change one of the fields is a table.
> One questions though, in the setting "SQL_LAtin1_General_CP1_CI_AS" What
> does "CP1" stands for'
> //Peter
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!

"cannot resolve collation conflict for equal to operation" when running view

Get the message "cannot resolve collation conflict for equal to
operation" in a view when a have restored a database on an other
computer. In this view I compare fields from myDB and master. Have
changed so I have the same collation for all my databases om SQL
Server, but still get this problem. Anyone has a suggestion?
//di6pejoHave you checked that the columns you are comparing actually have the same
collation. Changing the collation of the database does _not_ change the
collation of the columns that exist already in the database, it only
provides a default collation for newly created columns.
--
Jacco Schalkwijk
SQL Server MVP
"Peter" <ingeskrap@.tjohoo.se> wrote in message
news:3aa71bd7.0407140151.4b78d2d0@.posting.google.com...
> Get the message "cannot resolve collation conflict for equal to
> operation" in a view when a have restored a database on an other
> computer. In this view I compare fields from myDB and master. Have
> changed so I have the same collation for all my databases om SQL
> Server, but still get this problem. Anyone has a suggestion?
> //di6pejo