Unexpected Outcome When Exporting Views..

Jan 30, 2004

Something weird happened tonight.. here's the deal. I have two databases exactly the same.. one is for dev, one's for live data.

Anyway, the live DB had an outdated view.. so I exported from the dev DB to the live.. just copying that one view over (using "copy objects" in the export DTS wizard). Very oddly, it actually copied over the data in the tables referenced by the view! Not good, cuz I told my coworkers I'd leave the data in the tables alone :( How do I copy a view over, but just the view definition, and NOT the actual table data??

Thanks

View 4 Replies


ADVERTISEMENT

Converting Sp Outcome

Jan 21, 2004

Hi all,

i have an stored procedure that returns a value, i want to convert that value into smallmoney, is this possible and i yes how?

here is my code:

CREATE proc CP_avgloss_total
@mID varchar(10),
@startdate datetime,
@enddate datetime

as
select

case

((sum(playtime))/ 3600)
when 0
then 0
else ((sum(vtp)-(sum(moneyout)))/100) / ((sum(playtime))/ 3600)
end avgloss
from dbo.total
where
machineID = @mID
and convert(varchar,njdate,121)
between convert(varchar,@startdate,121)
and convert(varchar,@enddate,121)

GO

The value that needs to convert is avgloss

Hope someone can help me with this.
Cheers Wim

View 5 Replies View Related

SQL 2012 :: DBCC CHECK DB Outcome - DB Refresh

Oct 22, 2015

I created sql job using maintenance plan to run DBCC Checkdb for all databases. But I didn't choose the option Ignore databases where the state is not online. If any db is restoring the same time as DBCC Check db job running, is check db job fails?

View 1 Replies View Related

Are Embedded Views (Views Within Views...) Evil And If So Why?

Apr 3, 2006

Fellow database developers,I would like to draw on your experience with views. I have a databasethat includes many views. Sometimes, views contains other views, andthose views in turn may contain views. In fact, I have some views inmy database that are a product of nested views of up to 6 levels deep!The reason we did this was.1. Object-oriented in nature. Makes it easy to work with them.2. Changing an underlying view (adding new fields, removing etc),automatically the higher up views inherit this new information. Thismake maintenance very easy.3. These nested views are only ever used for the reporting side of ourapplication, not for the day-to-day database use by the application.We use Crystal Reports and Crystal is smart enough (can't believe Ijust said that about Crystal) to only pull back the fields that arebeing accessed by the report. In other words, Crystal will issue aSelect field1, field2, field3 from ReportingView Where .... eventhough "ReportingView" contains a long list of fields.Problems I can see.1. Parent views generally use "Select * From childview". This meansthat we have to execute a "sp_refreshview" command against all viewswhenever child views are altered.2. Parent views return a lot of information that isn't necessarilyused.3. Makes it harder to track down exactly where the information iscoming from. You have to drill right through to the child view to seethe raw table joins etc.Does anyone have any comments on this database design? I would love tohear your opinions and tales from the trenches.Best regards,Rod.

View 15 Replies View Related

Large Views Vs Multiple Small Views

Sep 6, 2007

Which is more efficient? One large view that joins >=10 tables, or a few smaller views that join only the tables needed for individual pages?

View 1 Replies View Related

Recompiling Views That Reference Other Views

Jun 28, 2007

Hello.

Newbie here. I've only been using SQL for about a year now and have some minor questions about sql objects that reference other objects.



We have some views which reference other views in the joins. I will call one the primary view and the one being referenced in the joins as the secondary view.

Recently we made changes to the secondary view.

After which the primary views which referenced it would not work because of this change and had to be 'refreshed' by using drop/create scripts which essentially just dropped it and recreated the exact same view. I do not recall the exact error message that was returned other than it seemed to suggest that it could no longer see the secondary view since it had been changed. Nothing in the primary view was changed in any way, just the secondary.



Some here where I work have suggested off hand that this was a recompile of the primary view because the contents of the secondary changed.

My questions are:

1. Exactly why did this happen and is there a proper name for it when it does?

2. The same problem does not seem to occur when we have stored procedures referencing views in the joins which had just been changed. Why is that?



Thanks for any help on the matter. I greatly appreciate it.

View 3 Replies View Related

Quicky : Views Of Views Of Views

Feb 22, 2007

Hello,

to make a report easier I'm developing it using a view of joined views of joined views.

Is there any significant performance penalty as opposed to just having one big select?

Cheers.

View 1 Replies View Related

Unexpected EOF From SQL

Jun 8, 1999

I am working with SQL server 6.5.
DB Library display error unexpected EOF from SQL when I execute a batch Can somebody tell me what can occurs this error ?

View 1 Replies View Related

Unexpected SKU Value

Nov 19, 2007

We are trying to configure and run SSRS on a server installed at the customer data centre. The ReportServer web service is unable to start up and leaves behind this odd error.

w3wp!library!1!11/19/2007-19:21:29:: i INFO: Initializing RunningRequestsDbCycle to '60' second(s) as specified in Configuration file.
w3wp!library!1!11/19/2007-19:21:29:: i INFO: Initializing RunningRequestsAge to '30' second(s) as specified in Configuration file.
w3wp!library!1!11/19/2007-19:21:29:: i INFO: Initializing CleanupCycleMinutes to '10' minute(s) as specified in Configuration file.
w3wp!library!1!11/19/2007-19:21:29:: i INFO: Initializing DailyCleanupMinuteOfDay to default value of '120' minutes since midnight because it was not specified in Configuration file.
w3wp!library!1!11/19/2007-19:21:29:: i INFO: Initializing WatsonFlags to '1064' as specified in Configuration file.
w3wp!library!1!11/19/2007-19:21:29:: i INFO: Initializing WatsonDumpOnExceptions to 'Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException,Microsoft.ReportingServices.Modeling.InternalModelingException' as specified in Configuration file.
w3wp!library!1!11/19/2007-19:21:29:: i INFO: Initializing WatsonDumpExcludeIfContainsExceptions to 'System.Data.SqlClient.SqlException,System.Threading.ThreadAbortException' as specified in Configuration file.
w3wp!library!1!11/19/2007-19:21:29:: i INFO: Initializing SecureConnectionLevel to '0' as specified in Configuration file.
w3wp!library!1!11/19/2007-19:21:29:: i INFO: Initializing DisplayErrorLink to 'True' as specified in Configuration file.
w3wp!library!1!11/19/2007-19:21:29:: i INFO: Initializing WebServiceUseFileShareStorage to 'False' as specified in Configuration file.
w3wp!library!1!11/19/2007-19:21:29:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration error. See the report server log files for more information., unexpected SKU value;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration error. See the report server log files for more information.
We suspect that when they first installed SQL Server, the optical media that they reported to be "faulty" was replaced with another one, and ended up installing Enterprise Edition of SQL Server. They were supposed to install Standard Edition. However, we'd like to confirm if the error message really the case that somehow SSRS is expecting the Std Ed SKU but meets up with Ent Ed?

View 2 Replies View Related

Unexpected LIKE Behavior

Apr 22, 2007

SQL Server 2000 SP4.Running the script below prints 'Unexpected':-----------------------------DECLARE @String AS varchar(1)SELECT @String = 'z'IF @String LIKE '[' + CHAR(32) + '-' + CHAR(255) + ']'PRINT 'Expected'ELSEPRINT 'Unexpected'-----------------------------If the @String variable is set to 'y' (or in fact any ANSI character otherthan 'z'), the result is 'Expected'. The comparison also evaluates asexpected if CHAR(255) is replaced with CHAR(254). The server collation, ifthat matters, is SQL_Latin1_General_CP1_CI_AS.It would be helpful to find the explanatin of this behavior. Thanks.--(remove a 9 to reply by email)

View 2 Replies View Related

Unexpected Xmlns=''

Feb 5, 2008

I'm having issues serializing an XMLChoiceIdentifier in SQLServer. I'm attempting to serialize a type within a larger XML message. The parent object contains and array of sub-objects. The xml I'm trying to serialize is:


<DocumentRequest action="GET">

<Documents>

<DocumentIDList>


<DocumentIdentifier id="1" />

<DocumentIdentifier id="2" />
</DocumentsIDList>
</Documents>
</DocumentRequest>

The relavent parent object code is:

[XmlTypeAttribute(IncludeInSchema = false)]

public enum RequestElementType

{


Documents,

Files,

Folders

}


[Serializable]

[SqlUserDefinedType(Format.UserDefined, IsByteOrdered = true, MaxByteSize = 8000)]

public struct DocumentRequest : IBinarySerialize, ICloneable, IComparable, INullable

{


private bool _isNull;

private string _action;



[XmlAttribute("action")]

public string Action

{


get { return _action; }

set { _action == value; }


_isNull = false;

}




[XmlChoiceIdentifier("RequestElementChoice")]

[XmlElement("Documents", typeof(Documents))]

[XmlElement("Files", typeof(Files))]

[XmlElement("Folders", typeof(Folders))]

public object RequestElement;




[XmlIgnore]

public RequestElementType RequestElementChoice;


....
}

The first child object is ...


[Serializable]

[SqlUserDefinedType(Format.UserDefined, IsByteOrdered = true, MaxByteSize = 8000)]

public struct Documents : IBinarySerialize, ICloneable, IComparable, INullable

{


private bool _isNull;

private DocumentIdentifier[] _docIDs;



[XmlArrayItem("DocumentIdentifier", typeof(DocumentIdentifier))]

[XmlArray("DocumentIDList")]

public DocumentIdentifier[] DocumentIDs

{


get { return _docIDs; }

set

{


_docIDs = value;

_isNull = false;

}
}




[XmlIgnore]
public int DocumentIDCount
{


get { return _docIDs.Length; }

}

....
}

and the grandchild object is:


[Serializable]

[SqlUserDefinedType(Format.UserDefined, IsByteOrdered = true, MaxByteSize = 8000)]

public struct DocumentIdentifier : IBinarySerialize, ICloneable, IComparable, INullable

{


private bool _isNull;

private int _idNumber;



[XmlAttribute("id")]

public int ID

{


get { return _idNumber; }

set

{


_idNumber = value;

_isNull = false;
}

}




....
}

The error I keep receiving in SQLServer is:


A .NET Framework error occurred during execution of user-defined routine or aggregate "DocumentRequest":

System.InvalidOperationException: There is an error in XML document (2, 2). ---> System.InvalidOperationException: <Documents xmlns=''> was not expected.

System.InvalidOperationException:

at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read156_DocumentRequest()

System.InvalidOperationException:

at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)

at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)

at System.Xml.Serialization.XmlSerializer.Deserialize(TextReader textReader)

at Mitochon.Global.Messaging.Internal.DocumentRequest.Parse(SqlString s)

at Mitochon.Global.Messaging.Internal.DocumentRequest.Read(BinaryReader r)

at DocumentRequest::.Deserialize(IntPtr , DocumentRequest& )

Any have any advice on how to get rid of this error?

View 1 Replies View Related

Unexpected Error

May 31, 2007

Dear All,

I'm installing SQL Server 2005 on Windows Server 2003 R2. When installing the support files for the SQL installation I receive the following error message:

"There was an unexpected failure during the setup wizard. You may review the setup logs and/or click the help button for more information"

The information I receive when clicking on the help button are as follows:
LinkID: 20476
ProductName: Microsoft SQL Server
Product Version: 9.00.1399.06
Message Source: setup.rll
Message ID: 50000
EvtType: setupsqlsetupactions.cpp@invokeS

I tried looking on the net for probable causes, but could not find any.

Anybody with answers/suggestions?

Many Thanks,

Franz

View 16 Replies View Related

Unexpected End-of-file (EOF) SQL DTS

Dec 13, 2006

when i am running bulk insert from codebehind but have a error =


"Unexpected end-of-file (EOF) encountered in data file.
OLE DB provider 'STREAM' reported an error. The provider did not give any information about the error.
OLE DB error trace [OLE/DB Provider 'STREAM' IRowset::GetNextRows returned 0x80004005: The provider did not give any information about the error.].
The statement has been terminated."



can i do ?

View 1 Replies View Related

Unexpected Server Restart

Sep 27, 2000

Has anyone ever experienced the SQL Server unexpectedly rebooting?

Yesterday my SQL Server 7 installation rebooted itself and the error log seemed fine as did the restart. The only evidence I can find was a message in the event viewer's application log stating the the MSSQLServer service terminated unexpectedly. Any ideas are appreciated.


Thanks,

- D

View 2 Replies View Related

BCP Giving Error &#34;unexpected Eof&#34;

Mar 19, 1999

Hi ,

I am trying to import a .csv file to SQL server 6.5, I get the db library error "Unexpected EOF encountered in BCP data-file"

What can be the problem with the file ?
Its very important to load this data.

Any help is appreciated.

Thanks
Ajay

View 4 Replies View Related

Unexpected Error When Open DTS

Nov 8, 2005

I created a few DTS packages in our Test Server saving them as file.dts. When I try to open them in from the production server I get an Unexpected error and the DTS is not opened. Do you have any fresh idea for me, please? Thanks!! :)

View 1 Replies View Related

ROUND Unexpected Result

Feb 8, 2006

/*********** Script 1 **************/
declare @nr_1 as decimal (10,2)
declare @nr_2 as decimal (10,2)
set @nr_1=5
set @nr_2=3
select round(@nr_1/@nr_2,0)

RESULT = 2

/*********** Script 2 **************/

select round(5/3,0)

RESULT = 1

What it is the explication for these difference ?

View 1 Replies View Related

DTS Package With Unexpected Issues

Jul 23, 2005

I've got a DTS package that runs an active-x script. The script issimple - it runs a stored procedure and saves the results to a CSVfile. I kept getting this error message when trying to run it sayingthat the recordset object I was using could not be used when closed.Well, it didn't make a whole lot of sense to me as to why that washappening, and it doesn't realte to my question except to give you asense of what I'm trying to do. After spending an inordinate amount oftime on that... I decided to just create a SQL Server connectionobject and an Excel Object and then use a transformation to load thequery results. Simple enough, or so I thought. So in thetransformation object under the Source tab, I typed in the query to runthe Stored Procedure:Declare @S nvarchar(30)Declare @E nvarchar(30)SET @S = Convert(nvarchar(30), GetDate()-1, 101) + ' 12 AM'SET @E = Convert(nvarchar(30), GetDate()-1, 101) + ' 11:59:59 PM'exec CTI_REPORT_Q_ACTIVITY_DETAIL @S, @EAnd then I clicked on the preview button. I got the message that norowset was returned. In a way, that explains the issue with theActive-X script. BUT, I know darn well it returns data. It returns438 rows of data when I run this in Query Analyser.So, here's my question....how could that be? Is there some issue thatDTS packages have with temporary tables? I do use a couple in theStored Procedure. Without having to post the stored procedure andtables, etc. could someone let me know if they've run into somethinglike this before?Thanks,Jennifer

View 1 Replies View Related

Unexpected Casting With Sum && Coalesce

Sep 28, 2006

If I have an SQL query which returns an aggregate of several decimal fieldslike so:(sum(COALESCE(myDecimal1, 0)+sum(COALESCE(myDecimal2, 0)+sum(COALESCE(myDecimal3, 0)) as MyTotalI get an rounded integer in MyTotal.However, if I do the following:sum(COALESCE(myDecimal1, 0)+COALESCE(myDecimal1, 0)+COALESCE(myDecimal1, 0)) as MyTotalI get a (proper) decimal value.Does anyone know why the first case returns an Integer?- Don

View 4 Replies View Related

Unexpected SQL Syntax Error!

Jul 20, 2005

I posted this to microsoft.public.sqlserver.programming, but no onecould answer my question. So I think it is a good place to re-post myquestion here.My question:I found that if you do not include any effective SQL statement betweenBEGIN/END block, SQL Server 2000 Query Analyzer will think it is anerror:Server: Msg 156, Level 15, State 1, Line 6Incorrect syntax near the keyword 'end'.if 1=1select getdate()elsebegin--select 'ok'endIs this behavior a SQL standard or simply a M$ standard glitch?

View 5 Replies View Related

Unexpected Results In Query

Sep 21, 2007

Hi,

I'm trying to run what I thought was a relatively straightforward query to find all entries from one table that don't appear in another table:

select * from Search_Suggestion where Suggestion not in (select distinct C106 from Search_Log)

The Search_Suggestion table contains 4060 entries and the Search_Log table contains 142,000+ distinct entries.

From running a similar query using 'in' instead of 'not in' I find that there are 3778 matches between the two tables would logic which suggest leave 282 that don't exist in the Search_Log table.

However....when I run the above query it returns no records.

I've tried changing it around and have also tried using temp tables but each time I still get no records.

Any help wouldbe greatly appreciated.

Kind regards,
Steve

View 3 Replies View Related

ReportserverTempDB Grows Unexpected

Apr 8, 2008



Hi SSRS Experts

We encounter the problem, that a reportservertempdb grows extremly large... the sessiondata and snapshotdata tables are about 10gb each at the moment and keep growing and growing...
The CleanupCycleMinutes Configuration is set to default=10. We are not taking snapshots of our reports.
Shouldnt those tables be cleaned up every 10minutes with this setting?

What can we do to stop this database growing? is truncating those tables on a weekly base a solution?
We are using SQL Server Reporting Services 2005 SP2 with Cumulative Hotfix Package 5 (Build 3215).

Thanks for your answers...

Kind Regards,

Roger

View 10 Replies View Related

SQLNumResultCols Returns Unexpected Value

Feb 23, 2007

Anyone know why SQLNumResultCols would return a different value for ColumnCountPtr in ODBC 3.0 than in ODBC 2.0?

The only difference in our test program is that we set a different value for the SQL_ATTR_ODBC_VERSION attribute via SQLSetEnvAttr. When we set it to SQL_OV_ODBC2, SQLNumResultCols returns the expected value (10). When we set it to SQL_OV_ODBC3, SQLNumResultCols returns an unexpected value (0).

View 6 Replies View Related

Unexpected Existing Transaction - Error

Aug 13, 2007

 Hi,My code worked fine before i placed "SqlTransaction" command in my code. Now it is showing "Unexpected existing transaction." Please tell me where I am going wrong. My Code:  



























































protected void
Page_Load(object sender, EventArgs e)    {        using (SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["Mfund_String"].ConnectionString))        {             con.Open();             using (SqlConnection destinationConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Mfund_String"].ConnectionString))             {                 destinationConnection.Open();                 using (SqlTransaction transaction =
destinationConnection.BeginTransaction())                 {                     SqlCommand DelCmd = new
SqlCommand("delete
from mfund_data", con);                     DelCmd.ExecuteNonQuery();                         using (SqlBulkCopy bulkCopy = new
SqlBulkCopy(destinationConnection))                         {                             bulkCopy.DestinationTableName = "mfund_data";                             try                             {                                 bulkCopy.WriteToServer(CreateDataTableFromFile());                                 transaction.Commit();                              }                             catch
(Exception ex)                             {                                 transaction.Rollback();                                 Response.Write(ex.Message);                             }                         }                     }                     destinationConnection.Close();                   }                 con.Close();             }             }Regards,Jagadeesh 

 

View 2 Replies View Related

Unexpected Existing Transaction With SqlBulkCopy

Oct 17, 2007

I have programmatically created a SqlConnection that begins a SqlTransaction.  During the first part of this SqlTransaction, the contents of a table are deleted.  The next part uses the SqlBulkCopy object to copy data from another database (in the form of a DataTable).  The delete goes through fine, but the SqlBulkCopy always generates a SqlException with the message "Unexpected existing transaction."  I cannot think of anything I am doing wrong. 
The code looks at an XML file for instructions on each transaction.  Each transaction is composed of tasks.  Each task will pull data from a different type of database (MVR.Command is a Factory Database object).  Please view the code below and tell me if you can spot what I am doing wrong:
 using (SqlConnection destinationConnection = new SqlConnection(MVR.ConnectionSource.GetConnectionString(destinationServiceName)))
{
destinationConnection.Open();

using (SqlTransaction transaction = destinationConnection.BeginTransaction(IsolationLevel.Snapshot, "Transport"))
{
transaction.Save("Beginning");

int totalTasks = 0;
int successfulTasks = 0;

foreach (XmlNode taskNode in transactionNode.SelectNodes("Tasks/Task"))
{
totalTasks += 1;

string sourceServiceName = taskNode.Attributes["sourceServiceName"].Value;
string destinationTablename = taskNode.Attributes["destinationTablename"].Value;
string query = taskNode.InnerText;

MVR.Command source = MVR.ConnectionSource.GetCommand(sourceServiceName);
source.CommandType = CommandType.Text;
source.CommandText = query;

DataTable sourceData = source.ExecuteDataTable();

try
{
// Prepare the destination table (delete everything)
int rowsDeleted = new SqlCommand("delete from " + destinationTablename, destinationConnection, transaction).ExecuteNonQuery();

using (SqlBulkCopy bulkCopy = new SqlBulkCopy(destinationConnection))
{
bulkCopy.DestinationTableName = destinationTablename;

bulkCopy.NotifyAfter = 1000;
bulkCopy.WriteToServer(sourceData);
bulkCopy.Close();

successfulTasks += 1;

// Log success
}
}
catch (Exception ex)
{
// Log failure
}
}

transaction.Save("End");

// Based on the success of all tasks, either commit or rollback
if (successfulTasks == totalTasks)
{
transaction.Commit();
}
else
{
transaction.Rollback();
}
}

destinationConnection.Close();

 

View 2 Replies View Related

SQL Msg: &#34;an Unexpected Error Happened During This Operation&#34;

Nov 1, 2000

I have W2K Adv, SQL 7 Enterprise in a workgroup with mixed security. The SQL installation is an almost entirely default install.

At the console, in SQL Enterprise Manager, when I select open a database, open tables, select a table, open table, and select all rows the system displays "an unexpected error happened during this operation". As far as I know this has never worked on this installation.

The error occurs with every logon account (including sa and local administrator accounts), both the "all rows or top row" options, every table, every database (including the customers database and the Northwind database).

I have tried adding administrators and accounts as users of the databases etc. and given the accounts all the permissions I can dream up.

There are no interesting messages in the event viewer. The SQL agent is running.

Technet found two documents but not related to the problem.

I can run SQL Analyzer and run "select * from table_name". That works on the Northwind and customer database tables - every time.

Colleagues with other installations do not get the error, and their systems return the rows correctly.

If any of you can help, I'd really appreciate it.

View 3 Replies View Related

Jobs - Unexpected Slow Performance

Mar 7, 2003

DECLARE @num int
SET @num = 0
DECLARE @tableVariable table(ColA int, ColB decimal(18,4))
WHILE @num < 1000
BEGIN
INSERT INTO @tableVariable VALUES (2, 10.56)
SET @num = @num +1
ENDWhen this code is run in SQL Server 2000 Query Analyzer it commits in less than 1 second.
The same code run as a SQLServerAgent job takes 16 seconds.

Similar behaviour appears if INSERT statement is substituted with UPDATE.

SELECT statement runs equally nice on both alternatives.

Has anybody got an idea what might be the reason for slow execution of INSERT and UPDATE in a job?

Thanks,
teetjott

View 2 Replies View Related

Unexpected EOF Encountered In BCP Data-file.

Nov 1, 1999

I'm getting this message on a replication distribution task after a successful SYNC task. The exact error message is:
" Unexpected EOF encountered in BCP data-file.Failed while bulk copying into '<table name>' "
I'm running SQL 6.5 Sp4.
I tried recreating the article, resyncing and redistributing, with no luck.
Is there anything I can do to fix this? Any help would be appreciated

View 1 Replies View Related

DBCC DBREINDEX - Unexpected Results

Jul 28, 2004

I have lost the reference but I read somewhere that when running DBCC DBREINDEX against a clustered index, all the secondary indexes on the table are automatically re-indexed as well. I did a test of this on a small table and it seemed to confirm this. However, now I've put this into practice, I am finding that it doesn't seem to work this way. I noticed that having run DBCC DBREINDEX against a table's clustered index (DBCC DBREINDEX ('tablename', 'clusteredIndexName', fill_factor)), the secondary indexes were not automatically re-indexed - as born out by the fact that they remained badly fragmented.

First of all, do the dba's who read this beleive it is correct that DBCC DBREINDEX run against a clustered index will automatically rebuild the secondary indexes too? If so, why wouldn't it work in all cases?

Clive

View 12 Replies View Related

DBCC DBREINDEX Unexpected Results

Aug 9, 2004

Normally, after I use DBCC DBREINDEX, I can be sure that Scan Density on a clustered or non-clustered index is very good - eg. 99% or 100%. However, I have one database where there are a number of indexes that are not showing any improvement in Scan Density after running DBCC DBREINDEX. In on case, a clustered index, I run it on two days in succession and Scan Density actually go worse! Can anyone give me a reason for this? Can anyone suggest how to fix it?

Clive

View 1 Replies View Related

An Unexpected Error Occured During This Operation

Nov 4, 2005

Hiwhen i right click table and click design table then error occured(an unexpected error occured during this operation)If any one knows please let let me know your help would be appreciated .thankspardhi--Message posted via http://www.sqlmonster.com

View 1 Replies View Related

There Was An Unexpected Failure During The Setup Wizard.

Dec 20, 2005

Hello!

I'm trying to install Microsoft SQL Server (en_SQL2005_DEV_Servers_Sept2005). But when I do so I get:

TITLE: Microsoft SQL Server 2005 CTP Setup
------------------------------

There was an unexpected failure during the setup wizard. You may review the setup logs and/or click the help button for more information.


For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&ProdVer=9.00.1314.06&EvtSrc=setup.rll&EvtID=50000&EvtType=packageengine%5cinstallpackageaction.cpp%40InstallToolsAction.10%40sqls%3a%3aInstallPackageAction%3a%3aperform%400x643

------------------------------
BUTTONS:

OK
------------------------------


Doeas anyone know what is going on?


Thank you in advance and best regards
John

View 6 Replies View Related

Unexpected Results Of Stored Procedure

Jul 8, 2006

hi, hvae a little trouble with thos procedure.

When executed it always adds 2 to the value of fields Telefon and Mobil.

Can anyone help me, please

Kurt



ALTER Procedure opdaterbruger

(

@Initialer nvarchar(100),

@Mailadr nvarchar(100),

@Telefon float(8),

@PlusNet float(8),

@Mobil float(8),

@pnmobil float(8)

)

AS

UPDATE Brugere

SET Mailadresse = @Mailadr

WHERE Initialer = @Initialer

IF (@Initialer= '0') OR NOT EXISTS ( SELECT * FROM PNetlokal WHERE Bruger = @Initialer)

INSERT INTO pnetlokal ( Bruger, Kortnr, Telnr )

VALUES ( @initialer, @Plusnet, @Telefon)

ELSE

UPDATE PNetLokal

SET TelNr = @Telefon, KortNr = @PlusNet

WHERE Bruger = @Initialer

IF (@Initialer= '0') OR NOT EXISTS (SELECT * FROM PlusNet WHERE Bruger = @Initialer )

INSERT INTO plusnet (Bruger, Kortnr, Mobilnr)

VALUES (@initialer, @pnMobil, @mobil)

ELSE

UPDATE PlusNet

SET Mobilnr = @Mobil, KortNr = @pnmobil

WHERE Bruger = @Initialer

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved