Trunc. Log On Chkpt. Is True
Mar 17, 2006
hi
I just created a DB , & ran sp_dboption , it showed me that the trunc. log on chkpt. is true .....
What if i set the recovery model of this DB to full , would I be able to recover the DB to a specific point in time ,
or since trunc. log on chkpt. is true.. I would not be able to collec the transaction log backups ???
Cant understand this concept , need some link to read this stuff ....
Thanks
View 1 Replies
ADVERTISEMENT
Jan 9, 2007
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?
View 3 Replies
View Related
Feb 18, 2004
HI ALL,
Please show me how to set the trunc. log on chkpt. database option to TRUE .
thanks so much
View 1 Replies
View Related
Dec 27, 1999
I got the following message
"DUMP TRANsaction is not allowed while the trunc. log on chkpt. option is enabled: use DUMP DATABASE, or disable the option with sp_dboption. (Message 4208)"
on the scheduled task as follow
DUMP TRANSACTION TASS_DATA TO tass_log_dump WITH NOUNLOAD , STATS = 10, INIT , NOSKIP
Please help me ASAP!
Many Thanks!
View 1 Replies
View Related
Jul 31, 2015
I have a cube that has a Dimension set up with several values some of which are bools. While Browsing in Excel or SSMS, two new values, when used as a filter shows (All) (Blank) and (True) for selections instead of (All) (True) and (False).
View 2 Replies
View Related
May 22, 2007
ok i thought trunc meant that it truncated the characters or data in a cell to something, but what is going on here?
UPDATE primary_mst set box_name_change = TRUNC(box_name_change);
site: http://www.deweydesigns.com
blog: http://www.deweydesigns.com/blog
myspace:
http://www.myspace.com/esotericstigma
View 4 Replies
View Related
Aug 1, 2006
Hi....
I am new to SQL Server. I primarily use Oracle which allows me to trunc(date) to removed the timestamp from a date.
Can anyone tell me the equivalent in SQL Server?
Thanks!
Christine
View 3 Replies
View Related
Oct 24, 2007
How to trunc (truncate) a table using enterprise manager?.
no trunc like toad in enterprise manager?.....
View 3 Replies
View Related
Jan 8, 2003
Can someone confirm that setting a db to use the simple recovery model in sql server 2000 is the same as setting a db to user trunc. log on checkpt. and select into/bulk copy on sql server 7?
View 3 Replies
View Related
Jan 23, 2008
Hi all,
I've just started using SQL Server and I'm having problems trying to trunc dates. In my application I have a table with information about calls and I need to group them by hour, day, month and year, and I would like to do it exactly in the same way that PostgreSQL or Oracle do, for example:
trunc(to_date('22-AUG-03'), 'YEAR') would return '01-JAN-03'
trunc(to_date('22-AUG-03'), 'MONTH') would return '01-AUG-03'
I need to store that grouped information in another table, so I'm trying to get for example:
22-AUG-03 01:00:00,
22-AUG-03 02:00:00 for hours,
22-AUG-03 00:00:00
23-AUG-03 00:00:00 for days and so on...
I'm trying to use convert function but I cant get the information in the way I need it.
Any kind of help will be apreciated. Thank you very much in advance.
View 5 Replies
View Related
Sep 29, 2006
hi,
how can I trunc an shring a db transaction log?
thanks for reply....
View 3 Replies
View Related
Jul 7, 2006
Microsoft E-Learning products are currently available for purchase only within North America at this time
Jezz, bad luck I am currently living in Spain...
View 1 Replies
View Related
Oct 20, 2007
I have a stored procedure that has a boolean (bit) field passed to it (@emailcontract). If a user checks the check box on the webform I would like my where to return only the records where the email_contract column is true. If they don't check the check box I would like it to return records where email_contracts is true or false.
What would my where cluse look lile for this?
View 4 Replies
View Related
Oct 16, 2006
I am designing a package performing some data imports from a text file to some tables, passing by a temporary table.
My specific requirements are:
initially the package checks if the input file exists, if it doesn't it will not continue.I have implemented this with a Script Task, and if the
file doesn't exist I fail the all package (Dts.TaskResult =
Dts.Results.Failure). Is this the right way?
after copying the data into a temporary table, it checks via SQL if some conditions are verified, if not it will not continue.I would have liked to do it via an SQL Task, but I don't know how to stop the package if the conditions are not what expected. Anybody can help?
Thank you.
View 2 Replies
View Related
May 13, 2007
All
Can I ask what data type i use for a true false response (Boolean) in my table?
Thanks
Gibbo
View 1 Replies
View Related
May 3, 2007
This is stupid, I used to be able to do this all the time by mistake now I can't do it on purpose
I want to be able to return a full list of matching records when only one is true
LikeRow 1, ID_1, falseRow 2, ID_1, falseRow 3, ID_1, trueRow 4, ID_2, falseRow 5, ID_2, trueRow 6, ID_2, false
I currently getRow 3, ID_1, trueRow 5, ID_2, true
View 3 Replies
View Related
Mar 10, 2008
Hi all, I am trying to access a sql database and if the userid exists in the database to the let me query another statement within an IF block to check another statement within the data, however I cannot seem to get it to work. I need something like sql.row.count != 0 within the 2nd IF statement below. What can I do?Thanks in advance.Jason using System;using System.Configuration;using System.Data;using System.Data.SqlClient;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void btnStart_Click(object sender, ImageClickEventArgs e) { if (Session["userid"] == null) { Response.Redirect("accessdenied.aspx"); } else { //Response.Redirect("page1.aspx"); SqlConnection objConnect = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["MyConnection"].ConnectionString); objConnect.Open(); SqlCommand cmd = new SqlCommand("SELECT user_id FROM users WHERE user_id = '" + Session["userid"] + "'"); if (cmd == true) { Response.Redirect("page5.aspx"); } objConnect.Close(); } }}
View 7 Replies
View Related
Feb 9, 2004
what does this imply Trusted_Connection=true parameter in the Connection String signify?
Secondly how can I make users with Windows Authentication Login to work in SQL Server Connection String?
Thanks in advance,
Neeraj.
View 1 Replies
View Related
Mar 20, 2008
Hi,
I need to check the existence of a row in a table.
So i am using an if condition
like
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE [dbo].[CheckNOAStages]
@NOAID int,
@StageCode nchar(20)
AS
BEGIN
SET NOCOUNT ON;
Declare @Count int
Select @Count =Count(NOAId) from NOAStages where NOAID=@NOAID and StageCode=@StageCode
if (@Count>0)
Begin
return 1
end
else
begin
return 0
end
END
The stored proc is executing but on the Data Access Layer
I have this
Boolean exists = Convert.ToBoolean (Execute.ExecuteReader(spCollection, dbSQL));
Some how I am always getting false . How can I fix this?
Thanks
View 7 Replies
View Related
Apr 23, 2008
Hi,
we've got this problem with some particular jobs: they look as they
ran correctly, but actually they didn't made it all through their
duties.
The problem is that this job is calling a sequence of DTS, where there
is a DTS with an ActiveX control which modifies another DTS before
launching and some other tasks: the error happens there, .
Launched from the DTS we get the error, from the job no...any idea how
we could get the correct job information?
Thank you
Daniele
View 5 Replies
View Related
Oct 29, 2007
Hello
I am exporting an SQL Server table to a comma delimited text file. The values of Columns defined as Bit are exported as "True" or "False", but I would like that in the file appear 1 or 0 instead (with no surrounding double quotes). How can I acomplish that?
I tried using a Transformation and convert to single byte unsigned integer, but True values are exported as "255" and False values as "0". Why?
Thanks a lot.
View 1 Replies
View Related
Sep 24, 2007
Hello all,
I am trying to migrate date from Oracle 10g to SQL serve 2005 during the data transformation I get the following error
Messages
Warning 0x80202066: Source - SERVICE [1]: Cannot retrieve the column code page info from the OLE DB provider. If the component supports the "DefaultCodePage" property, the code page from that property will be used. Change the value of the property if the current string code page values are incorrect. If the component does not support the property, the code page from the component's locale ID will be used.
(SQL Server Import and Export Wizard)
I searched internet and solution seems to be setting AlwaysUseDefaultCodePath="TRUE"
But where do you do this ?
I found this too: It's on the Properties tab of the OLE DB Source in Custom Properties section.
But still do not know where to go to set this parameter
Please help
View 4 Replies
View Related
Aug 15, 2005
Hi there, I've tried googling this (and looking at the many questions on the forum :) but I've not managed to find a decent tutorial / guide that describes a method for using checkboxs to insert true/false flags in a MS SQL db. The db field i'm setting has type set to "bit", is this correct? And secondly (its been a long day!) I just cant figure out the code to assign the bit 1 or 0 / true or false. This is what I've got so far but it's not working........Function InsertProduct(ByVal prod_code As String, ByVal prod_name As String, ByVal prod_desc As String, ByVal prod_size As String, ByVal prod_price As String, ByVal prod_category As String, ByVal aspnet As Boolean) As Integer Dim connectionString As String = "server='server'; user id='sa'; password='msde'; Database='dbLD'" Dim sqlConnection As System.Data.SqlClient.SqlConnection = New System.Data.SqlClient.SqlConnection(connectionString) Dim queryString As String = "INSERT INTO [tbl_LdAllProduct] ([prod_code], [prod_name], [prod_desc], [prod_size], [prod_price], [prod_category],[aspnet]) VALUES (@prod_code, @prod_name, @prod_desc, @prod_size, @prod_price, @prod_category, @aspnet)" Dim sqlCommand As System.Data.SqlClient.SqlCommand = New System.Data.SqlClient.SqlCommand(queryString, sqlConnection) sqlCommand.Parameters.Add("@prod_code", System.Data.SqlDbType.VarChar).Value = prod_code sqlCommand.Parameters.Add("@prod_name", System.Data.SqlDbType.VarChar).Value = prod_name sqlCommand.Parameters.Add("@prod_desc", System.Data.SqlDbType.VarChar).Value = prod_desc sqlCommand.Parameters.Add("@prod_size", System.Data.SqlDbType.VarChar).Value = prod_size sqlCommand.Parameters.Add("@prod_price", System.Data.SqlDbType.VarChar).Value = prod_price sqlCommand.Parameters.Add("@prod_category", System.Data.SqlDbType.VarChar).Value = prod_category If chkAspnet.Checked = True Then sqlCommand.Parameters.Add("@aspnet","1") Else sqlCommand.Parameters.Add("@aspnet","0") End If Dim rowsAffected As Integer = 0 sqlConnection.Open Try rowsAffected = sqlCommand.ExecuteNonQuery Finally sqlConnection.Close End Try Return rowsAffected End Function Sub SubmitBtn_Click(sender As Object, e As EventArgs) If Page.IsValid then InsertProduct(txtCode.Text, txtName.Text, txtDesc.Text, ddSize.SelectedItem.value, ddPrice.SelectedItem.value, ddCategory.SelectedItem.value, aspnet.value) Response.Redirect("ListAllProducts.aspx") End If End SubAny help would be appreciated or links to tutorials.ThanksBen
View 2 Replies
View Related
Mar 31, 2006
When accessing a web application from an intranet....
And the web app tries to make a connection to a 'SQL Server' using the sqlconnection where does ASP.NET grab user credentials?
My webpage displays web security.principal.windows.getcurrent = domainUser (displays the correct information).
But the connection to sql says Null. Where is ASP.NET grabbing (retrieving) this information from?
Thanks,
View 3 Replies
View Related
Jun 11, 2013
I have this OR in a simple query:
Code:
DECLARE @searchString nvarchar(100)
SET @searchString = 'sample'
SELECT TOP(1) * FROM user
WHERE (user.identity LIKE @searchString OR
CHARINDEX(@searchString, user.firstname + ' ' + user.lastname) > 0)
PS: Handwritten...
If I pass in a searchString that matches the Identity and a different users lastname, this query will return the user with the lastname-match (which is wrong in my eyes, it should have matched the Identity first, then returned that row [Identity is a Primary key, indexed non-clustered]).
I've tried various things:
Removing LastName: (CHARINDEX(@searchString, user.firstname + ' ') > 0), then the returned row is from a matching identity, due to the lastname of a user was a match, but lastname was removed...so :P
Flipping the conditions around
Adding/removing paranthesis... without any luck.
Is there some option somewhere, to force the OR statement to return on the first true condition. I've always thought OR-statements (in a computer that is) breaked and returned true on the first true condition it found (from left to right, not bother to check the rest of the conditions...)?Or do I have to rewrite the query, with an IF, checking if the @searchString is a valid identity-format, if it is, query on the identity, if not query on the username...?
View 12 Replies
View Related
Jan 30, 2004
Hi all,
I have a database filled with contracts, suppliers and administrators who administrates those contracts.
I want to make a sproc that checks the difference between the expiration_date and the current date(in months). the sproc compares this output with a given period in the contracts-table. when the output <= the given period ---> send mail to the administrator with info about the contract. and that the contract will be expired in X months.
Having a Sproc that only gets the info from the tables and compares this info is no problem, but to let the sproc send an email to the admin whose email-adress also comes from a table is a little bit to tricky for me.
I have searched the internet but i can't figure it out.
If anyone knows where I can get more info about this subject please be so kind and let me know, or anything that could help me around for the moment.
PS. I'm using SQL server 2000
Thnx in advance
StylizIt
View 12 Replies
View Related
Jun 10, 2008
Sir
I want to Return 1 and 0 after update , delete , Insert statement
IF Records Effected Return 1 else return 0
Pls help me out .........Sir
Yaman
View 4 Replies
View Related
May 12, 2007
Hello SQL Server Experts,
I'm upgrading an application that uses a VBScript/ASP front-end and MS Access Backend. The application has many points expecting fields to be true or false..
E.g. SELECT * FROM MyTable WHERE Active=True
However, since SQL Server requires 0 or 1 for bit fields, this query keeps failing. SQL Server (2005 Express) thinks True is a column name and is not automatically converting "True" to 1.
It would be so difficult to re-write the application to do this at the VB level, is there a way to make SQL server do this conversion automatically ?
Thanks for any assistance available.
Sunny
View 1 Replies
View Related
Jul 23, 2005
We hear about catalog table in documentation but is this the same asdatabase schema?What is the definiation of catalog table?What does it pertain to?Thanks--Message posted via http://www.sqlmonster.com
View 1 Replies
View Related
Nov 1, 2007
I have multiple viewers on a web page and initialy would like AsyncRendering = true on all viewers, so I can have the loading message. Once the user drill-through, I hide all other viewers and change to AsyncRendering = false, so the autosizing will work.
But, with AsyncRendering = true (in code behind):
private void SetDominateViewerProperties(ReportViewer rptViewer)
{
rptViewer.AsyncRendering = false;
rptViewer.ShowToolBar = true;
rptViewer.ZoomPercent = 100;
rptViewer.Visible = true;
}
private void SetDefaultViewerProperties(ReportViewer rptViewer)
{
rptViewer.AsyncRendering = true;
rptViewer.ShowToolBar = true;
rptViewer.ZoomPercent = 100;
rptViewer.Visible = true;
}
I have only one viewer showing, even though, I can see in debug that all viewers are set to visible. In SetDefaultViewerProperties, I change rendering to false, I get multiple viewers. Are there combinations of property values I need to set?
View 1 Replies
View Related
Aug 21, 2007
I am designing a SSIS package (source=Flat files,, destination =OLEDB) which is executing fine on my system but when I try to execute it on Server 2003 (x64)
it says Error: The AcquireConenction method call to connection manager "name of conn" failed with error code 0xC0014019 and
it says can't Aquire Connections because OfflineMode is true, while as I checked several times while saving the package it is set to false...
View 7 Replies
View Related
Jun 16, 2006
I have a package that creates a recordset in a variable (Type=Object, Name=CountryTable). The recordset is then picked up in a Script Task and loaded into a table using this code:
Dim adp As New OleDb.OleDbDataAdapter
dt = New DataTable
adp.Fill(dt, Dts.Variables("CountryTable").Value)
It was working fine until I turned SaveCheckpoints ON. Now it does not load any rows into the dt table. The dataflow task with the recordset destination ('CountryTable' variable) reports 10 rows in the pipeline. If I turn SaveCheckpoints OFF, it fills the dt table OK. If it cannot fill the dt table because of SaveCheckpoints being ON, shouldn't it give an error message? Thanks.
Note: I have SP1 installed.
View 4 Replies
View Related
Jan 30, 2007
Requirement: Auto-sized report with toolbar, rendered in a ReportViewer in an ASP .NET 2 page.
As we all know the trick is SizeToReportContent = True AND AsynchRendering = False.
With these settings (and ShowToolBar = True) I am still getting scroll bars and no resizing!
I tried setting ShowToolBar=False and it worked! (but I have now lost the export capability).
When ShowToolBar=True the ReportViewer does not resize correctly (it seems to resize based on the width of the toolbar). It looks like the toolbar is rendered first and this width is used as the max. width for the SizeToReportContent.
Anyway my options are:
1) Toolbar "on" with weird resizing (ie scrollbars). This looks sloppy.
2) Toolbar off (no ability to export, which I need). Export is a requirement.
3) Hard code the size to something big enough to hold the report (welcome to 1986)
Anyone else see the same behavior or am I missing something?
View 3 Replies
View Related