Decrypted Value Is Different From The Original One
Mar 29, 2007
Hi,
I got an issue with encrypt and decrypt. I encrypted a data, say 'ok', then I decrypt the encrypted data, but what I got is not 'ok'. but if I encrypt a column, then after decryption, those data asr same with the original data in that column.
Hi At the moment i don't remember but some times back i found an stored procedure that can DECRYPTall ENCRYPTED objects in sqlServer2000 ( i will try to put URL here) such as stored procedures,Triggers and even View(s). Now i'm writing a very confidential StoredProcedure and i don't want to be hack in this way.Is teher any way to prevent this.Has this Bug been fixed by any of Service Packs.? Thanks in advance.Kind Regards.
I overwrote rsreportserver.config with one from a different installation and that killed my RS because of the encryption key inside that file. Is there any way to generate that file for current install or do I have to reinstall the whole thing now?
The encrypted value for "logoncred" configuration setting cannot be decrypted. (rsFailedTodecryptConfigInformation) ***********************************************************************************
Please help thank you very much for the information.
from the December 2004 _Redmond Magazine_, "Finding Gold in Yukon":http://redmondmag.com/columns/artic...ditorialsID=838"Developers will also pick up the usual new-version enhancements to T-SQL,including error handling, recursive queries, a ROW_NUMBER function, a PIVOTrelational operator and more."ROW_NUMBER???? What possible purpose could that have???
When using @original_{0}, how does this work if you are using a stored procedure instead of inline SQL? For example, if my update parameters are like this : <UpdateParameters> <asp:Parameter Type="String" Name="ProductType" /> <asp:Parameter Type="String" Name="OpportunityType" /> <asp:Parameter Type="Double" Name="Value" /> <asp:Parameter Type="String" Name="Probability" /> <asp:Parameter Type="Int32" Name="OpportunityID" /> </UpdateParameters>
And my stored procedure like this : CREATE procedure dbo.UpdateOpportunity ( @ProductType int, @OpportunityType int, @Value money, @Probability int, @OpportunityID int) as update Opportunity set ProductType = @ProductType, OpportunityType = @OpportunityType,[Value] = @Value, Probability = @Probabilitywhere OpportunityID = @OpportunityID Do I need to change both cases of @OpportunityID in my stored procedure to @original_OpportunityID for it to work?
I managed to get fuzzy grouping working. The relevant output (_key_in and _key_out) are stored in a new table that is a copy of the old table + fuzzy grouping columns.
How do i get SSIS to store the _key_in and _key_out in the original table? The new matching column _key_out refers to the new key: _key_in. How could i get SSIS translate that to a matching column that refers to my original key?
I have a tempdb that was created at 1Gig. I don't know why but I want to shrink it below the original creation size. Is there a way to shrink this file or create a new file and delete the old?
I have tried shinkfile and shrink database with no luck.
I restored a backup of a database running SQL Server in W2K to my own laptop (Windows XP) for report testing pourposes. The restore worked perfectly, but when I ran the store procedure that returns my "report" set I noticed that several of the fields within the result set are different, the number of rows and customers are a perfect match to the production report. The fields that are different are calculated fields that invoque a user defined function, which again are exactly the same on both databases. I tried dropping the stored procedure and the 4 functions and recreating them again but I get the same results, the number of rows, the customers and all "non" function calculated fields are perfect, only the fields calculated with the functions are wrong.
Does anyone know how to get the original Login name, while a context switch is in effect.. For example during the use of Original login to SQL is Wayne Then Execute as Test
Now I need to know that Wayne is the Login and not Test
none of the standard things work, they all use the current context (suser_sname, etc)... Books online includes the following text
SYSTEM_USER returns the name of the currently executing context. If the EXECUTE AS statement has been used to switch context, SYSTEM_USER will return the name of the impersonated context. Use the LOGIN() function to return the name of the original login during impersonation.
But I cannot find any function called LOGIN() anywhere?
I am trying to use SQL Express to support unit testing of functionality which requires database access.
I created an express database (.mdf) which contains a database snapshot which is the database environment that each test expects to see when it starts. Through the execution of the test the database will be modified arbitrarily and I need to reset the database to the original state before the next test executes.
Here's what I do today:
Before Test:
The original database is copied to a unique location in the temp directory A unique database name is generated (GUID-based) I connect to the new database file with:
When I do this, everything seems to work correctly but when I re-open the original database it has changed unexpectedly and includes the modifications that were made by the test as it ran.
Can anyone explain why this is happening and/or provide a solution?
Say I have a result set with two fields numbers and letters.
1 A3 A1 B2 B
The result set is ordered by the letters column. How can I select the distinct numbers from the result set but maintain the current order? When I tryselect distinct Number from MyResultSet
it will reorder the new result set by the Number field and return
123
However, I'd like maintain the Letter order and return
Hi,Good morning to All. While doing practice I did some modifications to some tables in Northwind database.Now, how can I get my original tables back again? Take Oracle for example:We can modify table data. But when we run demobld.sql script then all tables will replaces with original entries. Like this I want in SQL Server also. Is there any such facility available in SQL Server? Thanks in advance,Ashok kumar.
I made a copy of a database "sac_prod" and named the new copy "vgs_prod". Now, when I do a backup of the new database, it still shows the name of the original. Is there any way to change this so it will be the same as the new database name?Here is the BACKUP script:BACKUPdatabase vgs_prod TODISK='\sac-srvr1data$TechnicalSharedProductionSQLBackup LasVegasvgs_prod_CopyOnly.BAK' with COPY_ONLYHere is the messages I received from this BACKUP:Processed 1752 pages for database 'vgs_prod', file 'sac_prod' on file 1.Processed 6 pages for database 'vgs_prod', file 'sac_prod_log' on file 1.BACKUP DATABASE successfully processed 1758 pages in 0.412 seconds (34.955 MB/sec). I would like to change the file 'sac_prod' to be 'vgs_prod' in lines 1 and 2 just above. Thanks,
I have been using the below query to copy a record of data that exists in several draft tables to the original tables. how do i change this query such that i can input multiple records at one time so multiple records get copied to original tables from the draft tables
At this time when i feed mutiple requestids to my query it simply errors out
SET NOCOUNT ON GO DECLARE @oldrequestid varchar(50),@newrequestid varchar(50) DECLARE db_cursor CURSOR FOR SELECT RequestId from report_request_draft where requestid in (320762)
I have a database called PrimaryJunk that is being log shipped to another location, secondary database is secondaryjunk. From PrimaryJunk to SecondaryJunk logs ship and apply fine with no issues. So I figured lets make sure that I am able to perform a role change and swap the roles and that is not working well. My original primary db is stuck in restoring state.
I manually backed up the active transaction log on primary server by performing a transaction log backup with the option 'backup the tail of the log and leave the db in restoring state'
MS site has the same step but mentions NORECOVERY. I am not sure if my step above does that automatically. http://msdn2.microsoft.com/en-us/library/ms191233.aspx
Wonder if thats the reason my original primary db is still in restoring state. any idea?
When I drill down from one report to another and then depress the back button to return to the initial report, the message 'Generating Report" spins forever without actually running. However, if I depress the regenerate button during this time, it will run the report.
I believe that I may have inadvertingly reset a field attribute to have caused this condition. Ironocally, I have the same set of database installed on another server, and the this does not happen.
I forgot to mention that I am using Report Manager to deploy the reports.
I have as simple IS package with a Flat File input and SCD Transform. The package is being used to load a Dimension Table, obviously.
The Table was designed in Analyical Services using the Dimension Wizard which very nicely adds End Date, Start Date, Status and Original ID to the Dimension Table design. I then Generate Relational Scheme... and Viola there is a Dim Table in my data warehouse database!
I next attempt to use the IS package with SCD Transform to load said Dim Table. The SCD Transform Wizard does a nice job of using the End and Start dates and Status fields in my new Dim Table, but I can not find any way to use the Original ID field?
I guess I was expecting that since the SCD Transform Wizard 'knows' how to use all the other fields in this Dim table why not the Original ID field? I know what the Original ID field is for - that's not the issue. I just can not figure out how to 'make' my new IS Data Flow with said SCD Transform use the Original ID field ?
When I drill down from one report to another and then depress the back button to return to the initial report, the message 'Generating Report" spins forever without actually running. However, if I depress the regenerate button during this time, it will run the report.
I believe that I may have inadvertingly reset a field attribute to have caused this condition. Ironocally, I have the same set of database installed on another server, and the this does not happen.
I forgot to mention that I am using Report Manager to deploy the reports.
I have a query that I created in SqlServer and then merely copied the code to a sqldatasource. They are both connected to the same db, however the sqldatasource query only returns 6 records and when run in SqlServer, it returns 52 rows which is the correct number. Any ideas on what might be causing this? There are no filters on the sqldatasource. It only has that one query. Do they differ in the way they execute sql code? Thanks for any help!
I have several reports that are set to landscape but then lose this layout when a linked report is created from the original report. I found the link below describing Brian Welcker's workaround and my question is where do you place the vb.net code he provided?
So i am trying to make a simple database and with one table and use a gui to make rows. When i run the program in debug mode it creates a new copy of my DB in the debug folder and saves only their, i cannot find a way to save back to the original DB no matter what i do including changing the Copy to Output Directory.
Now the more i try to fix this the more new DB it creates one in the Release Folder, one in the bin/Debug/bin/Debug one in bin/Release/bin/Release.
I am going crazy trying to scoure the entire project looking for someplace i can fix this.
All i want is to create a DB and be able to make changes to it and only it.
What's the diffrence between the Built-In account 'SERVICES' and the 'NT SERVICEALL SERVICES' ?I want to dploy a group poicy for 'user right assignment' - 'log on a service' to a server, which curretnly has among other things the 'NT SERVICEALL SERVICES' however i can't replicate this account for my GPO, (even locally on the server),I deploy the GPO and overwrite the server settings for 'user right assignment' - 'log on a service' and won't be able to revert back to the original settings..
I am working on a project that contains several databases in SQL and many settings. The problem I am encountering is that I want to be able to update the program for all my customers. That is no problem.
The problem I am meeting is where, when the program is updated, all the settings and all the information in the databases reverts to the default values, or the values that were compiled with the new update.
I want to be able to update their program without deleting all the settings they have.
Hi, I am looking to implement a custom event handler that will also retain the original event arguments (in addition to several custom arguments). Specifically, I am looking to pass custom arguments into a SqlDataSourceStatusEventHandler, but also want to be able to access the Command.Parameters. I have implemented a new Event Arguments class (derived from System.EventArgs), new Event class and delegate, but do not know how to retain the SqlDataSourceEventArgs. I would really appreciate your suggestions! Thanks!
I have added a page refresh in combination with 'Command Notification' to ensure that my data is fresh,( it is updated on the sql server database approx. every 5 mins). However, I also allow filtering on the table contents and every time I refresh the filtering is lost. Is it possible to maintain the filtering through the refresh? <meta http-equiv="refresh" content="30"/>..<asp:SqlDataSource ID="SqlDataSource1" runat="server" ..SelectCommand="SELECT ... EnableCaching="true" CacheDuration="Infinite" CacheExpirationPolicy="Absolute" SqlCacheDependency="CommandNotification" >
I am trying to create a trigger on a table. Let's call it table ABC. Table looks like this:
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[ABC]( [id] [uniqueidentifier] NOT NULL,
[Code] ....
When someone updates a row on table ABC, I want to insert the original values along with the current date and time getdate() into table ABCD with the current date and time into the updateDate field as defined below:
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[ABCD]( [id] [uniqueidentifier] NOT NULL,
[Code] .....
The trigger I've currently written looks like this:
/****** Object: Trigger [dbo].[ABC_trigger] Script Date: 4/10/2015 1:32:33 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TRIGGER [dbo].[ABC_trigger] ON [dbo].[ABC]
[Code] ...
This trigger works, but it inserts all of the rows every time. My question is how can I get the trigger to just insert the last row updated?
I can't sort by uniqueidentifier in descending as those can be random.