Upgrade Windows NT To 200, Effect The SQL 6.5?
Jan 31, 2004If the server is upgraded to Windows 2000, will SQL 6.5 require to be upgraded to SQL 7 or 2000?
View 1 RepliesIf the server is upgraded to Windows 2000, will SQL 6.5 require to be upgraded to SQL 7 or 2000?
View 1 RepliesMy company has a Windows 2008 R2 server which is running SQL Server v11.0.5058. Â This server was previously running SQL Server 2008 and was recently upgraded. Â Since the upgrade I have noticed that when I connect to this server using SSMS and Windows authentication it seems as though I have a limited user context as I cannot see SQL Agent in the server tree at all and underneath the server security > logins folder I can only see the sa and SQL Server Windows service accounts (there are many more).
If I connect to the server using SSMS and the sa credential then I can see everything I expect to be able to see as a sysadmin.
I tried connecting as sa, then deleting my Windows AD account from the security > logins folder and reading my Windows AD account with the sysadmin role however this yielded the same result, when I connect using Windows authentication I still appear to be in a limited user context.
We have several other SQL 2008 / 2012 servers within our organization and all of them appear to be working fine / none of them exhibit this problem.
I've got a box running Windows 2000 Server and SQL Server 2000. This summer I plan on upgrading to Windows 2003 Standard and SQL Server 2005, but which do I do first?
My guess is that I shouldn't mess with upgrading SQL at all. Just dump the data, uninstall, upgrade the OS, install SQL 2005 and reimport the data back in. Is that a really bad idea?
I would think that if I wanted to upgrade both, then Windows should be upgraded first, right?
Hello,
I have to do an upgrade from server 7 and OS NT to server2000 and windows 2000. Has anyone had any problems while doing this ? Please list the steps taken for the upgrade if you can.
Thanks
I posted this under 'microsoft.public.sqlserver.client' but got no reply.Any help with this problem would be greatly appreciated---------------------I developed a database under SQL Server 2000, with Access 2000 on Windows2000 as client. This had been running fine for several years. The client isnow upgrading to Windows XP, and has come across a display problem on thereports. The figures are correct but are now displayed with lots of trailingzeros e.g365.00000I have built a test system but cannot duplicate the problem :-( . Also theproblem varies between computers, and even between different users on thesame computer. One solution that seems to work is to explicitly cast alloutput from the server e.g.CAST ( TonsLoaded AS INT) TonsLoadedbut this is a pita since there are 141 stored procedures.Has anyone seen this problem? I haven't found anything in the newsgroups orany Knowlege Base article. It looks like it is to do with Windows XP as theclient ...David
View 5 Replies View RelatedThis morning I attempted to connect to my local copy of SQL Server (2012) (Win 7) using Windows Authentication. I was unable to do so and per the error log it was due to error 18456 (invalid credentials).
Yesterday I changed my windows password. Is it possible for this to be the cause?
FYI, following is from the error logs:
2015-04-27 10:10:32.98 Backup BACKUP DATABASE successfully processed 0 pages in 0.451 seconds (0.000 MB/sec).2015-04-28 00:00:41.90 spid18s This instance of SQL Server has been using a process ID of 2096 since 4/21/2015 9:08:05 AM (local) 4/21/2015 1:08:05 PM (UTC). This is an informational message only; no user action is required.2015-04-28 09:58:51.16 Logon Error: 18456, Severity: 14, State: 38.2015-04-28 09:58:51.16 Logon Login failed for user 'NT AUTHORITYSYSTEM'. Reason: Failed to open the explicitly specified database 'model'. [CLIENT: xx.xx.xxx.xxx]2015-04-28 17:09:59.87 Server SQL Server is terminating because of a system shutdown. This is an informational message only. No user action is required.
The logs showed the error occurred yesterday (4/28) which is about when I changed my password. The 17:09 log (last one) is when I shut down my computer. Note that I was logged into SQL Server when I changed my Windows password and worked with it several times through out the day.
Also, per the configuration manager SQL Server (MSSQLSERVER) (and all other services) is stopped and I was unable to start it ("The request failed or the service did not respond in a timely fashion).
I "upgraded" to Windows 10 (I was installing a new c: drive anyway). Â I installed SQL Server & SSIS, Visual Studio 2012, SQL Server Data Tools 2012, etc. When I try to load up my project (.sln) in SQL Data Tools I get the following warnings/errors:
Warning 1
Warning loading DataImport.dtproj: Warning: Failed to decrypt an encrypted XML node. Verify that the project was created by the same user. Project load will attempt to continue without the encrypted information.
Warning 2
Warning loading DataImport.dtproj: Warning: Failed to decrypt sensitive data in project with a user key. You may not be the user who encrypted this project, or you are not using the same machine that was used to save the project. If the sensitive
data is a parameter value, the value may be required to run the package on the Integration Services server.
Error 3
Error loading ImportFiles.dtsx: The version number in the package is not valid. The version number cannot be greater than current version number. Â
Error 4
Error loading ImportFiles.dtsx: Package migration from version 8 to version 6 failed with error 0xC001700A "The version number in the package is not valid. The version number cannot be greater than current version number.". Â
Error 5
Error loading ImportFiles.dtsx: Error loading value "<DTS:Property xmlns:DTS="www.microsoft.com/SqlServer/Dts" DTS:Name="PackageFormatVersion">8</DTS:Property>" from node "DTS:Property". Â
Error 6
Error loading 'ImportFiles.dtsx' : The package failed to load due to error 0xC0010014 "One or more error occurred. There should be more specific errors preceding this one that explains the details of the errors. This message is used as a return
value from functions that encounter errors.". This occurs when CPackage::LoadFromXML fails.Â
As well as installing Windows 10, I had also renamed by computer. Â I have tried renaming it back (I noticed some references to the computer name in the xml), but no difference.Have I installed the wrong versions of one of the software? Â If so, how could I check which one I need to install (to match the VS project/dts package)? Â
No logs created, this is all I have:
Â
Unhandled Exception: System.Security.SecruityException: Request failed.
        at Microsoft.SqlServer.Chainer.Setup.Setup.DebugBreak()
        at Microsoft.SqlServer.Chainer.Setup.Setup.Main()
Then the Managed SQL Server Installer box pops up with Managed SQL Server Installer has stopped working.
SQL Server 2005 x64 Developer Edition
Log output from the SP2 installation...
------------------------------------------------------------------------------------------------
Product : Database Services (MSSQLSERVER)
Product Version (Previous): 2221
Product Version (Final) :
Status : Failure
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfixSQL9_Hotfix_KB921896_sqlrun_sql.msp.log
Error Number : 11032
Error Description : Unable to install Windows Installer MSP file
------------------------------------------------------------------------------------------------
The C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfixSQL9_Hotfix_KB921896_sqlrun_sql.msp.log file is a 5mb file that I can't make much sense out of...here are the first many lines of the file. I'll be glad to provide more information - just let me know what you need to know...
Thanks,
Dave
=== Verbose logging started: 8/15/2007 20:32:13 Build type: SHIP UNICODE 3.01.4000.4042 Calling process: e:47b31966cf7dcaa4e0fe0fa356ab34dahotfix.exe ===
MSI (c) (D4:9C) [20:32:13:508]: Resetting cached policy values
MSI (c) (D4:9C) [20:32:13:508]: Machine policy value 'Debug' is 0
MSI (c) (D4:9C) [20:32:13:508]: ******* RunEngine:
******* Product: {F14F2E25-99AF-42A9-977C-F6D0352DC59F}
******* Action:
******* CommandLine: **********
MSI (c) (D4:9C) [20:32:13:508]: Client-side and UI is none or basic: Running entire install on the server.
MSI (c) (D4:9C) [20:32:13:508]: Grabbed execution mutex.
MSI (c) (D4:9C) [20:32:13:508]: Cloaking enabled.
MSI (c) (D4:9C) [20:32:13:508]: Attempting to enable all disabled priveleges before calling Install on Server
MSI (c) (D4:9C) [20:32:13:508]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (9C:BC) [20:32:13:539]: Grabbed execution mutex.
MSI (s) (9C:FC) [20:32:13:539]: Resetting cached policy values
MSI (s) (9C:FC) [20:32:13:539]: Machine policy value 'Debug' is 0
MSI (s) (9C:FC) [20:32:13:539]: ******* RunEngine:
******* Product: {F14F2E25-99AF-42A9-977C-F6D0352DC59F}
******* Action:
******* CommandLine: **********
MSI (s) (9C:FC) [20:32:13:539]: Machine policy value 'DisableUserInstalls' is 0
MSI (s) (9C:FC) [20:32:13:539]: Adding MSIINSTANCEGUID to command line.
MSI (s) (9C:FC) [20:32:13:539]: End dialog not enabled
MSI (s) (9C:FC) [20:32:13:539]: Original package ==> C:WINDOWSInstaller1f00a5.msi
MSI (s) (9C:FC) [20:32:13:539]: Package we're running from ==> C:WINDOWSInstaller1f00a5.msi
MSI (s) (9C:FC) [20:32:13:586]: APPCOMPAT: looking for appcompat database entry with ProductCode '{F14F2E25-99AF-42A9-977C-F6D0352DC59F}'.
MSI (s) (9C:FC) [20:32:13:586]: APPCOMPAT: no matching ProductCode found in database.
MSI (s) (9C:FC) [20:32:13:586]: Detected that this product uses a multiple instance transform.
MSI (s) (9C:FC) [20:32:13:586]: MSCOREE not loaded loading copy from system32
MSI (s) (9C:FC) [20:32:13:586]: Applying multiple instance transform 'qlRun01.mst'...
MSI (s) (9C:FC) [20:32:13:586]: Looking for storage transform: SqlRun01.mst
MSI (s) (9C:FC) [20:32:13:586]: Validating transform 'SqlRun01.mst' with validation bits 0x809
MSI (s) (9C:FC) [20:32:13:586]: Transform 'SqlRun01.mst' is valid.
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2205 2: 3: Patch
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2205 2: 3: PatchPackage
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2262 2: _Tables 3: -2147287038
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2262 2: _Columns 3: -2147287038
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2262 2: Media 3: -2147287038
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2262 2: File 3: -2147287038
MSI (s) (9C:FC) [20:32:13:586]: TRANSFORM: 'PatchPackage' table is missing or empty. No pre-transform fixup necessary.
MSI (s) (9C:FC) [20:32:13:586]: TRANSFORM: Applying regular transform to database.
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2262 2: _Tables 3: -2147287038
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2262 2: _Columns 3: -2147287038
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2262 2: _Validation 3: -2147287038
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2262 2: File 3: -2147287038
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2262 2: MsiFileHash 3: -2147287038
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2262 2: Signature 3: -2147287038
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2262 2: RegLocator 3: -2147287038
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2262 2: AppSearch 3: -2147287038
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2262 2: CompLocator 3: -2147287038
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2262 2: DrLocator 3: -2147287038
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2262 2: Binary 3: -2147287038
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2262 2: CustomAction 3: -2147287038
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2262 2: Directory 3: -2147287038
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2262 2: Registry 3: -2147287038
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2262 2: Condition 3: -2147287038
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2262 2: CreateFolder 3: -2147287038
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2262 2: _sqlObjectSecurity 3: -2147287038
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2262 2: Icon 3: -2147287038
MSI (s) (9C:FC) [20:32:13:586]: Note: 1: 2262 2: InstallExecuteSequence 3: -2147287038
...
I am setting up my first sql node on a 2 node cluster and runing into this
The disks are already added into the failover cluster manager
I have a sqlserve, which service account is 'local system', running in machine A.
A credential ,which associated a windows user U1 in machine A, mapped to a sqlserver login Login1.
A file named 1.txt that only can be accessed by U1 in machine A.
A CLR procedure P1 that would read the 1.txt file.
I encounter a error when i access the 1.txt file through P1 as Login1:
A .NET Framework error occurred during execution of user-defined routine or aggregate "HelloWorld":
System.UnauthorizedAccessException: Access to the path 'E:1.txt' is denied.
System.UnauthorizedAccessException:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
at System.IO.StreamReader..ctor(String path)
at StoredProcedures.StoredProcedure1(SqlString fileName)
.
I think it need a credential when a sqlserver login access some resource outside the sqlserver, so i add a credential and mapped to the login
any suggestions would be appreciated.
And please correct me if i have any inaccurate concept.
I have this stored procedure. I want to run a few simple SQL functions against my tables. In particular I want to take a subset of records (One or Two years worth) and calculate AVG, VAR and STDEV.
It does not work the way I thought it would. I end up with the whole input table in #tempor1 which is about 6 years worth of records.
set ANSI_NULLS ON
set QUOTED_IDENTIFIER OFF
GO
ALTER PROCEDURE [dbo].[findAve1YearDailyClose_MSFT]
AS
BEGIN
SET NOCOUNT ON;
SELECT adjClosed, volume INTO #tempor1 FROM dbo.dailyCl_MSFT
GROUP BY dateTimed, adjClosed, volume
HAVING (dateTimed > DATEADD (year, -1, MAX (dateTimed)))
SELECT AVG (adjClosed) AS "AVGAdjClose1Year",
VAR (adjClosed) AS "VARAdjClose1Year", AVG (volume) AS "AVGVolume1Year",
STDEV (volume) AS "STDEVVolume1Year", COUNT (*) AS "total"
FROM #tempor1
END
Thus if I change the number of years I subtract from the latest date from 1 to 2 I end up with the same result. What is the problem?
Thanks.
When running a trace on a database, how does if affect that databases performance? Does it slow it down at all?
Thanks In Advance,
Chris
Hello,
What happens to these REPLication agents if SQL Agent is stopped and started:
Snapshot Agents
Merge Agents
Misc Maintenance Agents
Can the agent be stopped and started with no thought to the status of replication, or should the replication state be modified in some way before any change to the status of the Agent?
(I know REPL depends on agent, so wuestion is, can REPL simply resume or not when agent is re-started.)
Thanks.
MichaelGG
Does someone know if doing a reindex on a clustered or non-clustered index cause the snapshot file to grow? In other words, is the data that makes up the snapshot copied from the source to the snapshot database? If a normal reindex is done on the underlying database, will it block users from acessing the snapshot? Any help would be appreciated.
View 1 Replies View RelatedHow can I achieve the same effect as a cross join (since the merge operator doesn't have a cross join)?
Situation is this... a flat file has some header and footer information that I need to keep and attach to each row. So for simplicity sake of an example lets just say header has only 1 thing we care about - a row that says DATE=01/01/06.
I take the file and run a split to split into "Date" "Data" and "other" (other has all the throwaway rows in header and footer I don't care about). Then I use a derived column object to get all the columns out of the "Data". Finally I want to add that Date metadata back to every row in the data...
I thought this would be an easy thing to do.. but I can't seem to figure out how to duplicate that Date info into every row.. Hopefully I am overlooking something simple.
Thanks in advance.
Hi..
I want to know that when I do something like..
Select Query
Left Join
Select Query 2
Left Join
Select Query 3
How does it work actually?
As in, whether Query 2 & Query 3 will work only on the records retrieved by Query 1 only.
Or, all the select statements retrieves all the records and then the condition is applied to filter out the results.
Also, does the order of the Select statements make any difference on the speed?
Thanks
We have a database that we have designed so all the data dependances are managed by the front end code. However the company we are writing it for has asked us to add around 50 constraints. I was just a little worried what kind of effect on performance this would have. Cheers Ed
View 1 Replies View RelatedEdit: Sorry This is OSQL.What I use as my query is:"DELETE FROM timerecord WHERE Actual_Time_In LIKE '11.12.2006%'"The row of Actual_Time_In is formatted with Date and time (MM.DD.YYYY HH:MM:SS) sometimes there are ten records and I'd rather not have to remove them from the table one at a time. However, even though I have a record that is '11.12.2006 22:43:00' my delete doesn't work osql states I have 0 rows affected.This is only MSDE so I don't have anyother way to open the table.Sometimes these records have other records that reference them. Is there anyway to do a cascading delete without it getting to complex?Thanks of all your help, I am just a tech support guy beating his head against a wall..
View 2 Replies View RelatedHi all,
Does JOIN order effect efficiency?
If I have three large tables to join together should I join the two that I know will cut the number of rows down a lot first and then join the 3rd table or does it make no difference (if I join the first and 3rd - which I know will be a large result set and then join the 2nd).
Thanks in advance,
Chiz.
Hello all, thanks in advance for any advice here.
My question is, what's the effect of the Enterprise Manager > Tasks > Shrink Database function? It seems to reduce the used space on the device. Testing it on some dev machines, I've seem to have gotten back as much as 20g of space. I know it should grow back to that, but the time it took was minimal, and it didn't seem to affect my developers. They tend to add alot and delete alot during testing. What negative effects of running this should I look out for? Will it affect the DB long term? Is is preferable to schedule once a month or so? Is this done on Production DB's?
Thanks for any guidence on the usage of this.
Bob
Not a downstroke, fistpicker
Hi Guys,
I have created a report where I have Z-Index all set correctly, but I cannot see the desired effect of toggling as can be seen in the AdventureWorks sample of SalesOrder report that gets shipped with SSRS. What am I missing?
I'm looking into the automatic recompilation of stored procedures andI have been reading up on the "Do not recompute statistics" option onindexes.Am I correct in concluding that disabling the "Do not recomputestatistics" option for an index, will ensure that no automaticrecompilations will occur as a result of updates to data in thatindex?Am I also correct in understanding that the "Update Statistics" willstill update statistics for the index even if the "Do not recomputestatistics" option is disabled?RegardsBjørn
View 1 Replies View RelatedHello All,I have a stored procedure which will act like a main/controller scriptwhich will then invoke more stored procedures (~20). Basically, itlooks something like below:-- start scriptcreate procedure ...print 'process started'exec sp_1exec sp_2exec sp_3....print 'process ended'-- end scriptLooking at it, after running that procedure, immediately I would expectthe first PRINT statement to be printed but it won't. It seemedthat the print statements would only display the messages afterthe whole processing completed.What's the reason for this sort of behaviour. If so, then we wouldnot be able to print any progress reporting in our scripts.Please comment.Thanks in advance.
View 4 Replies View RelatedHello,When I try to run the following query on two different SQL Servers,I get error on one of the server (both has same set of data). I wastrying to get rows for ProductCode='XYZ_Q1'.SELECT ProductName, ProductType, ProductDesc FROM Product WHEREDepartmentID=12 AND ProductType > 2000 AND CAST(SUBSTRING(ProductCode,CHARINDEX('_', ProductCode)+2, 1) AS int)=1Example dataProductCode|ProductName|ProductType|DepartmentID|P roductDescXYZ_T_1|Test1|1000|12|TestXYZ_T_2|Test2|1000|12|TestABC_T_1|Test3|1000|11|TestABC_T_2|Test4|1000||11|TestXYZ_Q1|Test5|1000|12|TestABC_Q1|Test6|1000|11|TestIt's trying to cast all values under 'ProductCode' column instead ofapplying to subset with condition 'DeparmentID=12 AND ProductType >2000 'I solved the problem by equating it to whole string rather thantrying to extract the integer part of it. But I wanted find-out reasonas to why this is happenning.Is there any SQL Server setting that's causing this?Thank you very muchManchaiah
View 1 Replies View RelatedHi,
I'm trying to grant/deny object permissions in a user database using Enterprise Manager and query tool without success (for €˜public€™ role and individual sql logins). I€™m not getting any error messages. Permission changes just don€™t take effect. Although, there are few objects, which already have permissions granted and I'm able to change permissions for these ones.
How can I change the permissions?
Hi, all experts here,
Thank you very much for your kind attention.
I am encountering a problem with reports built on my SQL Server 2005 Reporting Services Server. The reports parameters do not take effect at all? I chose the value from the report parameter list, but the result returned the whole report data. Why is that? And how can I solve this problem? Really need help.
Thanks a lot in advance for any guidance and help.
With best regards,
Yours sincerely,
Dear all,
I have some questions regard subject above. I want to know the impact of replication process after SA pasword been changed.
Example: server1 (hq), server2 (district) & server3 (district).
If server1, SA password been changed, is it server2 & server3 need to change too?
may i know where is it the replication SA password stored? is it replication script refer ID (SA) from Security -> Logins?
I hope someone can help me.. thanks.
I just want to change the length of 2 fields. They're CHAR and NVARCHAR type. I want to change the length from 50 to 75.
Will doing this effect the data? Will it delete the data in those columns? I just want to make sure before I do anything. The table contains about 2.5 million rows, so I don't want to mess anything up. I'm aware that the script may take a while to run and finish, but I'm only concerned about data integrity.
Here is my example script syntax to show what I'm planning to do:
Code Snippet
alter table credit alter column writeoffreason char(75) not null;
Does it matter what type of data is in the columns? For now, it's only CHAR and NVARCHAR.
I also read somewhere that you can increase length but cannot decrease without repercussions?
Thanks!
I build reports using reporting services 2005 sp2.
I have 3 parameters---> 3 multi value combo box .
However when I tick "allow blank value" within the report parameter
properties for this drop menu, report WILL NOT run without making
selection.(The xml is ok allow blank value set to true)
the reports still require you to enter a value for all parameters in the report when the report can and should be able to be run with no parameter defined.
the trick "default values for all of the params to "=String.Empty"" is not good .
I found this article but i can't find microsoft hotfix for it .
http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=125877
"Thank you for filing the bug. This issue has been fixed for the next CTP.
Posted by Microsoft on 8/11/2005 at 7:00 PM"
Am I missing something obvious here?
Hi
I had run a stored procedure in my server that update statistics against all user defined tables in my database (MSSQL 7.0).
Since then I am getting errors in my ASP application where I am reffering to adovbs.inc.
Here is an example of errors I get.
Microsoft VBScript runtime error '800a0411'
Name redefined: 'adOpenForwardOnly'
/Essai/adovbs.inc, line 14
Below is the stored procedure I have run against the database.
Can anybody help tank you guys.
CREATE PROCEDURE update_all_stats
AS
/*
This PROCEDURE will run UPDATE STATISTICS against
ALL user-defined tables within this database.
*/
DECLARE @tablename varchar(30)
DECLARE @tablename_header varchar(75)
DECLARE tnames_cursor CURSOR FOR SELECT name FROM sysobjects
WHERE type = 'U'
OPEN tnames_cursor
FETCH NEXT FROM tnames_cursor INTO @tablename
WHILE (@@fetch_status <> -1)
BEGIN
IF (@@fetch_status <> -2)
BEGIN
SELECT @tablename_header = "Updating " +
RTRIM(UPPER(@tablename))
PRINT @tablename_header
EXEC ("UPDATE STATISTICS " + @tablename )
END
FETCH NEXT FROM tnames_cursor INTO @tablename
END
PRINT " "
PRINT " "
SELECT @tablename_header = "************* NO MORE TABLES" +
" *************"
PRINT @tablename_header
PRINT " "
PRINT "Statistics have been updated FOR ALL tables."
DEALLOCATE tnames_cursor
Hi All,
I have a view that does some calculations on data in the database. Note in the two code snippets, that the columns being used in the calculations are all type FLOAT(53).
My confusion stems from the fact that both code snippets should be functionally the same in my "view" (*snicker* I kill me...), but they return different results which I think are related to rounding issues.
The first snippet:
CREATE VIEW dbo.VIEW_Calculate_PortfolioIndex
AS
SELECT PP.PortfolioID AS PortfolioID,
PP.CreateDate AS CreateDate,
(ROUND((PPI.CloseIndex + (PPI.CloseIndex * PP.DailyPerChg / 100.00)), 2) * PP.AvgHighPriceRatio) AS HighIndex,
CASE WHEN PPI.CloseIndex IS NULL
THEN 100.00
ELSE ROUND((PPI.CloseIndex + (PPI.CloseIndex * PP.DailyPerChg / 100.00)), 2)
END AS CloseIndex,
(ROUND((PPI.CloseIndex + (PPI.CloseIndex * PP.DailyPerChg / 100.00)), 2) * PP.AvgLowPriceRatio) AS LowIndex,
PP.Volume as Volume
FROM dbo.PortfolioIndex PPI INNER JOIN
dbo.PortfolioPerformance PP ON
PPI.PortfolioID = PP.PortfolioID AND
PPI.CreateDate = PP.PrevDate
GO
and it's result set:
PortfolioIDCreateDateHighIndexCloseIndexLowIndexVolume
102/20/2004781.11774.17769.53527896
112/20/2004757.97750.36742.93605740
122/20/2004509.92501.72494.854180516
132/20/2004988.23980.65973.58632337
142/20/20041283.261269.571259.37416145
And the second snippet:
CREATE VIEW dbo.VIEW_Calculate_PortfolioIndex
AS
SELECT PP.PortfolioID AS PortfolioID,
PP.CreateDate AS CreateDate,
(CloseIndex * PP.AvgHighPriceRatio) AS HighIndex,
CASE WHEN PPI.CloseIndex IS NULL
THEN 100.00
ELSE ROUND((PPI.CloseIndex + (PPI.CloseIndex * PP.DailyPerChg / 100.00)), 2)
END AS CloseIndex,
(CloseIndex * PP.AvgLowPriceRatio) AS LowIndex,
PP.Volume as Volume
FROM dbo.PortfolioIndex PPI INNER JOIN
dbo.PortfolioPerformance PP ON
PPI.PortfolioID = PP.PortfolioID AND
PPI.CreateDate = PP.PrevDate
which returns a different result set:
PortfolioIDCreateDateHighIndexCloseIndexLowIndexVolume
102/20/2004784.52774.17772.89527896
112/20/2004755.64750.36740.64605740
122/20/2004512.43501.72497.294180516
132/20/2004989.77980.65975.1632337
142/20/20041285.991269.571262.05416145
Specifically, I am concerned with the HighIndex and LowIndex values...since the only modification between the two code snippets is that in the second one, the HighIndex and LowIndex calculations use the column name of CloseIndex (as calculated in the select) in the calcs for those two columns, rather than repeating the code used to calculate the CloseIndex column's value.
I am confused as to why the results of the HighIndex and LowIndex caculations are different in the two selects, when the only change (in my view/expectations) is that one references the CloseIndex column, and the other one just reproduces the calculation itself
*scratching head*
any thoughts? Thanks,
Paul
Hi,
I am trying to use a very easy and simple feature of a reportmodel, model item security.
In my example i have two users; HGHJohn and HGHJKooi
I want to test if I am able to restrict access in the model to a whole entity. HGHJKooi shouldn't be able to see the entity 'Customers'.
These are the steps I executed:
1. In Sqlserver management studio I opened the properties of my model and navigated to the tabpage 'model item security'.
2. I activated the option 'secure individual model items...'
3. In the root of the model I declared two users(groups) as specified above
4. Automatically all nodes inherit these settings from the root.
5. For the entity 'Relations' I change the default, by selecting 'use these roles for each group or user account'
6. I removed HGHJKooi from this list, leaving only 'HGHJohn as model item browser
What I expected at this moment is that when I login the system as HGHJKooi, then I won't see this entity, but I still can! Does anybody know a solution to this problem?
Julian Kooiker