Reporting Services :: Recovering Symmetric Key From Keys Table

Jul 29, 2015

We had a server give out on us completely. All that is left is a back up of the SSRS database. We have been able to get a new SSRS environment working but the symmetric key doesn't seem to work.  Reports will run if we delete all sensitive data through the Config manager and reenter the connection strings into the datasource but if we can get the symmetric key saved in the ReportingServices database to work correctly it will save us a ton of effort. Can we make use of the symmetric key saved in the ReportServer.dbo.Keys table?

View 2 Replies


ADVERTISEMENT

Reporting Services - Recovering Source Code

Mar 7, 2008

Hi all,
I am in a situation where some reports were developed by a colleague who left the company.
The reports were published on the server but since the code behind the reports was deleted inadvertently.
We don't have documentation about them.

My questions are:


is there a way to recover the source code?

is there a way to produce a report showing a list of the reports and the underlying data straucture/stored procedure, even in cases where the RDL is missing (i.e. from the published report)?
Many thanks in advance
Massimo

View 9 Replies View Related

Which Algorithm To Be Used With Symmetric Keys

Mar 28, 2006



Hi,

I want to create a symmetric key that will be encrypted by certificate key. Can u guide me which algorithm is best out of the following:

DES, TRIPLE_DES, RC2, RC4, RC4_128, DESX, AES_128, AES_192, AES_256.

I tried using AES_128, AES_192, AES_256 but it says 'the algorithm specified for the key are not available in this installation of Windows.'

Pls tell me which else algorithm is best to use and pls specify why.

Thanks

Gaurav

View 5 Replies View Related

Replacing Symmetric Keys

Feb 2, 2007

I'm trying to develop a procedure for re-encrypting data with a different symmetric key, but I need the new key to use the old key name. I want to do this without leaving the data in clear text at any point. I would think the process would work like this:

1.Create a new key
2.Decrypt data w/old key and encrypt with new key.
3.Drop old key.
4.Rename new key using the old key name.


However, I can't find that there's a way to rename a symmetric key. Is this correct? If that is the case, I believe I have to do an additional round of encryption:

1.Create a temp key
2.Decrypt data w/old key and encrypt with temp key.
3.Drop old key.
4.Create a new key with the old key name.
5.Decrypt data w/temp key and encrypt with new key.
6.Drop temp key


Thanks for any insight.

View 4 Replies View Related

Symmetric Encryption By Asymmetric Keys

Nov 9, 2007

i've getting ready to implement encryption on a rather large database. I'd read that if performance is of utmost concert, you should use symmetric keys. I want to encrypt those keys by asymmetric keys. My code is working, but i'm just not sure if there is a quicker way? do you have to open and close the key each time you select/update/insert in a stored procedure that references an encrypted column, or is there a way to just modify the code by adding the encryptbykey/decryptbykey functions?

has anyone implemented encryption on columns in large tables? any suggestions for me?

Thanks,
Pete

here's my code to create the keys:

create asymmetric key ASK_Auto_Encrypt
with algorithm = RSA_512;

create symmetric key SK_AE
with algorithm = TRIPLE_DES
encryption by asymmetric key ASK_Auto_Encrypt;

here's my code to test this:

create table encryption_test (test varchar(50));

open symmetric key SK_AE
decryption by asymmetric key ASK_Auto_Encrypt;

insert into encryption_test
select encryptbykey(key_guid('SK_AE'),'test');

select convert(varchar(max),decryptbykey(test)) from encryption_test;

close symmetric key SK_AE;

View 14 Replies View Related

Moving Symmetric Keys Between Servers

Apr 24, 2007

I'm having some issues restoring a backup of database that uses native encryption onto another server. I know there are a couple of articles on this but I seem to be missing something. Any help would be greatly appreciated.

Current Server Windows 2000
Destination Server Windows 2003


The original key setup for the current server was achieved by something like this:

CREATE SYMMETRIC KEY HR01 WITH algorithm=DES encryption BY password = 'HRpassword'


Running the command select * from sys.symmetric_keys on the current server I get the following:






name
principal_id
symmetric_key_id
key_length
key_algorithm
algorithm_desc
create_date
modify_date
key_guid

HR01
1
256
56
D
DES
2006-11-22 16:36:01.883
2006-11-22 16:36:01.883
BBD80500-338F-47D7-B336-85D46E00F2F0
So I restored the database onto the new server and ran this script:

OPEN MASTER KEY DECRYPTION BY PASSWORD = 'Password';
ALTER MASTER KEY ADD ENCRYPTION BY SERVICE MASTER KEY;
GO

I don't have a master key... so I go back to the original server and ran this script and did another backup:

CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'Password'
OPEN MASTER KEY DECRYPTION BY PASSWORD = 'Password';
ALTER MASTER KEY ADD ENCRYPTION BY SERVICE MASTER KEY;

Running select * from sys.symmetric_keys on the current server now looks like this:





name
principal_id
symmetric_key_id
key_length
key_algorithm
algorithm_desc
create_date
modify_date
key_guid

##MS_DatabaseMasterKey##
1
101
128
D3
TRIPLE_DES
2007-04-23 16:03:09.183
2007-04-23 17:02:46.630
1CB0D800-0173-4A1E-B841-362B454E60AC

HR01
1
256
56
D
DES
2006-11-22 16:36:01.883
2006-11-22 16:36:01.883
BBD80500-338F-47D7-B336-85D46E00F2F0



I then restored the new backup onto the 2003 server and ran this script:

OPEN MASTER KEY DECRYPTION BY PASSWORD = 'Password';
ALTER MASTER KEY ADD ENCRYPTION BY SERVICE MASTER KEY;
GO

The alter script now runs fine but I get the error message: The decryption key is incorrect when trying to open the HR01 key




View 1 Replies View Related

Retrieving Symmetric Keys From Database.

Apr 9, 2007

I've played with various configurations of the MS SQL Server encryption functionality, and come across an embarrassingly easy question that I cannot seem to resolve. How do I retrieve the actual symmetric and asymmetric keys out of the database?



I'd like to explore the possibility of off-loading the encryption/decryption work from the database server to a load-balanced pool of servers. For this model to work the pool would need access to the keys. The symmetric keys currently are generated with the command...



create symmetric key EncryptionKey211

with algorithm = AES_256

ENCRYPTION BY certificate CreditCardCert



Am I missing something obvious here?

View 4 Replies View Related

Max Number Of Symmetric Keys In A Database

Sep 26, 2007



Is there a limit on number of symmetric keys/asymmetric keys/certificates that can be stored in a database?

Is there any effect on performance of the SQL Server if I have too many (few hundreds) symmetric keys in the database?

thanks

View 1 Replies View Related

2005 Encryption - Symmetric Keys

May 29, 2006



Hi There

We have been playing around with encryption in 2005. I cannot find a BOL topic that discusses dropping encryption objects such as keys.

We do the followign steps:

Create master key with password, then we create a certificate using the master key, we then create a symmetric key using this certificate and encrypt data columns.

But what i find worrying is that you can then drop the symmetric key , there are no warnings that you have objects dependant on this key for decryption.

Once you have dropped the key you cannot decrypt the data anymore?

Also the key defults the expiration date to 1 year.

WHat happens after 1 year when you have encrypted data and an expired key, or someone drops the key ? How can you ever decrypt the data after that ?

You can backup master keys nd certificates but not symmetric keys?

It seems to be that youc an very easily orphan encrypted data by the loss of the symmetric key for whatever reason, is this correct ?

Thanx

View 6 Replies View Related

SQL 2005 Encryption - Symmetric Keys

Feb 14, 2007

I have a question about the storage of symmetric keys in SQL Server 2005 due to the fact that I have read two conflicting statements on this.

In Laurentiu's blog located at http://blogs.msdn.com/lcris/archive/2005/10/14/481434.aspx, in regards to preventing symmetric key loss he makes the statement that "...Because the keys are stored in the database, they will be saved with the database....".

But in the white paper Improving Data Security by Using SQL Server 2005, which is located at http://www.microsoft.com/technet/itshowcase/content/sqldatsec.mspx, in regards to symmetric keys the statement is made "...Note: The symmetric key is not stored in the database. Only the encrypted values of the symmetric key are stored in the database. Therefore, users who can access the database cannot decrypt the data without first decrypting the symmetric key....".

So I am just wondering which statement is correct, are symmetric keys stored in the database or not?

Thanks!

Ginny



View 1 Replies View Related

Create Identical Symmetric Keys On Two Servers?

Apr 17, 2015

why my script is not allowing me to DECRYPTBYKEY once I restore my DB from PRODUCTION BACKUP....

-- SET Staging to Single User Mode to be able to RESTORE DB---

-- STEP 1 (Works No Problems Here)

USE master;
GO
ALTER DATABASE Staging
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE;
GO
RESTORE DATABASE Staging
FROM DISK = 'C:Program FilesMicrosoft SQL ServerMSSQL11.MSSQLSERVERMSSQLBackupMyDBRestore.bak' ;
GO

-- STEP 2 - USE ONLY IF THE ABOVE IS UNSUCCESSFUL ||| FAILURE ****** RESTORE RUN THE FOLLOWING SCRIPT -----

--If the above is successful the DB sets itself back to MULTI_USER

--ALTER DATABASE Staging
--SET MULTI_USER;
--GO
--ALTER DATABASE Staging
--SET READ_WRITE
--GO

-- STEP 3 (Works No Problems Here)

--------------- @@@@@@@@@@@@@@ IMPORTANT UNCOMMIT AND RUN @@@@@@@@@@@@@@@@@@@@@@@@@ MANUAL STEPS ----------------------
-- RBD - Recreate Security ID'S AND PERMISSIONS FOR Stored Procedure EXECUTE RIGHTS, because PASSWORDS are different on lower
-- environments
--USE [Staging]
--GO
--/****** Object: User [WebUser] Script Date: 4/13/2015 11:15:51 AM ******/
--DROP USER [WebUser]

[code]....

View 1 Replies View Related

Data Encyption Using Symmetric Keys Outside SQL Server

Jan 30, 2007

Hello. I have a problem that spans VB.net, SQL Server and SSIS but is rooted in the need to encrypt column data in SQL Server.

I would like to encrypt data that I am bringing into SQL Server in the Data transformation script component of an SSIS package. I have achieved this but I can't decrypt the data because the keys don't match. I would like to use symmetric key encryption but I don't see how to get the symmetric key that I created in SQL Server available to the VB.net script component in SSIS.

Please advise me if my approach is correct and what steps I need to take.

View 5 Replies View Related

Opening Symmetric Keys In Stored Procedures

Apr 26, 2007

I can't seem to use symmetric keys in stored procedures. I am trying to decrypt a column in my stored precedure but the values are all NULL. First I tried a symmetric key that required a password but I kept getting simple syntax errors when I tried to send the password to the stored precedure as a parameter. Now I am trying a symmetric key that uses a certificate.



I also tried using WITH EXECUTE AS SELF and WITH EXECUTE AS CALLER but that made no difference.

View 1 Replies View Related

SQL Server Admin 2014 :: Using Column Encryption With Symmetric Keys

Jun 25, 2015

I am trying to implement the column encryption on one of the tables, have used the below link as the reference and got stuck at the last step.

[URL] ....

I have completed the following steps so far.

- CREATE MASTER KEY ENCRYPTION BY PASSWORD = ‘myStrongPassword’

- CREATE CERTIFICATE MyCertificateName
WITH SUBJECT = 'A label for this certificate'

- CREATE SYMMETRIC KEY MySymmetricKeyName WITH
IDENTITY_VALUE = 'a fairly secure name',
ALGORITHM = AES_256,

[Code] .....

Example by using the function

EXEC OpenKeys

-- Encrypting
SELECT Encrypt(myColumn) FROM myTable

-- Decrypting
SELECT Decrypt(myColumn) FROM myTable

When I ran the last command :

-- Decrypting
SELECT Decrypt(myColumn) FROM myTable

I get the following error :

Msg 257, Level 16, State 3, Line 2
Implicit conversion from data type nvarchar to varbinary is not allowed. Use the CONVERT function to run this query.

Where will I use the convert function, in decrypt function or in select statement?

View 9 Replies View Related

Creating Inter-table Relationships Using Primary Keys/Foreign Keys Problem

Apr 11, 2006

Hello again,

I'm going through my tables and rewriting them so that I can create relationship-based constraints and create foreign keys among my tables. I didn't have a problem with a few of the tables but I seem to have come across a slightly confusing hiccup.

Here's the query for my Classes table:

Code:

CREATE TABLE Classes
(
class_id
INT
IDENTITY
PRIMARY KEY
NOT NULL,

teacher_id
INT
NOT NULL,

class_title
VARCHAR(50)
NOT NULL,

class_grade
SMALLINT
NOT NULL
DEFAULT 6,

class_tardies
SMALLINT
NOT NULL
DEFAULT 0,

class_absences
SMALLINT
NOT NULL
DEFAULT 0,

CONSTRAINT Teacher_instructs_ClassFKIndex1 FOREIGN KEY (teacher_id)
REFERENCES Users (user_id)
)

This statement runs without problems and I Create the relationship with my Users table just fine, having renamed it to teacher_id. I have a 1:n relationship between users and tables AND an n:m relationship because a user can be a student or a teacher, the difference is one field, user_type, which denotes what type of user a person is. In any case, the relationship that's 1:n from users to classes is that of the teacher instructing the class. The problem exists when I run my query for the intermediary table between the class and the gradebook:

Code:

CREATE TABLE Classes_have_Grades
(
class_id
INT
PRIMARY KEY
NOT NULL,

teacher_id
INT
NOT NULL,

grade_id
INT
NOT NULL,

CONSTRAINT Grades_for_ClassesFKIndex1 FOREIGN KEY (grade_id)
REFERENCES Grades (grade_id),

CONSTRAINT Classes_have_gradesFKIndex2 FOREIGN KEY (class_id, teacher_id)
REFERENCES Classes (class_id, teacher_id)
)

Query Analyzer spits out: Quote: Originally Posted by Query Analyzer There are no primary or candidate keys in the referenced table 'Classes' that match the referencing column list in the foreign key 'Classes_have_gradesFKIndex2'. Now, I know in SQL Server 2000 you can only have one primary key. Does that mean I can have a multi-columned Primary key (which is in fact what I would like) or does that mean that just one field can be a primary key and that a table can have only the one primary key?

In addition, what is a "candidate" key? Will making the other fields "Candidate" keys solve my problem?

Thank you for your assistance.

View 1 Replies View Related

How To Find A Symmetric Key That Protected Other Symmetric Key

Jan 22, 2008



Say i have some symmetric keys encrypted by other symmetric keys ,
is there some way to find the relationship of these key?

I know i can find the certificate or asymmetric key through sys.key_encryptions catalog view by "thumbprint" column,
but the thumbprint column is null when the key was encrypted by a symmetric key.


any suggestions?


thanks in advance

View 1 Replies View Related

Integration Services :: Mapping Correct Surrogate Keys In Fact Table After Performing SCD Type 2 On Dimension

Nov 5, 2015

I have dimension data like this 

persn_key  persn_id  address    is_active  updated_date
1                10            NYC         0           2015-11-04 14:19:54.817
2                 10          Chicago      1           null

and Fact table like

fact_key  persn_key units_purchased
1                 1             10

persn_key is the surrogate key between tables.

My question here is as the dimension has SCD type 2 on it and every time when there is a change the persn_key gets a new key value but the fact table still points to oldest key.how to update the surrogate key on fact table to the current key value? As per the requirement fact surrogate key must be pointing to current active record on the dimension.

View 6 Replies View Related

Reporting Services :: Grouping A Table Inside A Table Cell - SSRS Report

Jun 10, 2015

I have a report where in I want to show each record on a separate page.

So, to achieve that I took a single cell from table control, expanded it and used all the controls in that single cell. This looks nice so far.

Now, I also have to show a  sub grid on each record. So I took a table control and added on the same single cell and tried to add a parent group to the table row.

When I preview, it throws this error.

"The tablix has a detail member with inner members. Detail members can only contain static inner members."

What am I doing wrong? How can I achieve table grouping inside a table cell?

View 2 Replies View Related

Migrate From 32bit 2000 Reporting Services To 2005 64bit Reporting Services

Mar 22, 2008



Hello,

I am trying to migrate my reports from SQL server 2000 reporting services 32bit to 2005 64bit. I am following the migration steps that MS specified.
Restored my Reportserver and ReportserverTempDB databases
Then I was using the configure Report services to upgrade these databases but I always end up getting the follwoing exception when I run the upgrade on the "Database Setup" configuration for 'ReportServerTempDB' database
System.Data.SqlClient.SqlException: Could not locate entry in sysdatabases for database 'ReportServerTempDBTempDB'. No entry found with that name. Make sure that the name is entered correctly.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.ReportingServices.Common.DBUtils.ApplyScript(String connectionString, String script)
at ReportServicesConfigUI.SqlClientTools.SqlTools.ApplyScript(String connectionString, String script)

It's driving me crazy, why is it looking for 'ReportServerTempDBTempDB' in the catalog instead of 'ReportServerTempDB'?
Is it possible to migrate from 32bit to 64bit?

Any help is appreciated

View 1 Replies View Related

Reporting Services :: How To Find Out Second Last Inserted Row In A Table

Jun 9, 2015

How to find out second last inserted row in a table in sql ....

View 5 Replies View Related

Reporting Services :: Horizontal Table And Page Break

Dec 2, 2015

I have a dataset with 2 fields : code and value. I have a parameter that will give me the data to insert into the table I want to make. The number of rows is not fixed, so I couldn't create, for example, a table with a fixed number of rows.

I want to create some kind of table that will allow me to have cells that look like this :  "code" : "value" and have 3 of them (like 3 columns) before I switch to the next line (row). 

Just to make it clear, I'm not using any SQL requests here, data comes from XML.

It should look like this :

code1 : value1   code2 : value2   code3 : value3
code4 : value4   code5 : value5   code6 : value6
code7 : value7

and it'll go like this until I've used all the data.

View 5 Replies View Related

Reporting Services :: Two List View - Get Job Info From Table

Oct 2, 2015

I need ssrs report  which  get job info from job table in list control  and other  one is jobid and workdate which also need to be group by and storeproc I am using for this  report is as follow:

ALTER proc [dbo].[VRAJ_JobScheduleReport]            
    @JobID int = null,    @StartDate varchar(25) = null,    @EndDate varchar(25) = nullASSET
NOCOUNT ON SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON DECLARE @sql varchar(max);DECLARE @param varchar(max);DECLARE @where1 varchar(max);DECLARE
@where2 varchar(max);SET @param='';SET @where1='';SET @where2='';IF @JobID IS NOT NULL    BEGIN     
SET @param = @param + 'DECLARE @JobID int; SET @JobID=' + CAST(@JobID AS varchar(50)) + ';';      IF @where1 = ''       
[Code] ...

I need ssrs report which get job info from job table in list control and other one is jobid and workdate which also need to be group by and storeproc I am using for this report is as follow:

ALTER proc [dbo].[VRAJ_JobScheduleReport]
@JobID int = null,
@StartDate varchar(25) = null,
@EndDate varchar(25) = null
AS
SET NOCOUNT ON

[Code] .....

View 5 Replies View Related

Migrating PIVOT TABLE Reports In REPORTING SERVICES

Oct 18, 2006

HI,

We currently have a report generated weekly running script which creates an excel file and pivot tables. Using pivot tables we can drag and drop the various required fields and the report changes instantly. But i was told there is a limitation of size while using pivot tables.

Can this report be easily created with almost all the flexibility in reporting services, if so could you please guide me with some sample report or tutorials.



currently there is a some store procedures thats run every week using a DTS manually, is there a way of automating this.

Many thanks in advance.

Cheers

Dargonheart 007

View 1 Replies View Related

Reporting Services :: How To Insert Deleted Rows From One Table To Another

May 28, 2015

I have  two tables like hyd,hyd1 but  hyd has data ,now I want to delete all rows from hyd at the same time insert deleted rows into hyd1.

View 7 Replies View Related

Reporting Services :: HTML Table Not Rendering In SSRS

Apr 5, 2011

I have some HTML stored in a SQL Server table that I want to render in Reporting Services 2008,

HTML data contain HTML table. While generating report, SSRS not able to render it properly as table.

How we can display the HTML data as it is in SSRS 2008?

View 4 Replies View Related

Reporting Services :: How To Put A Dynamic Table Into Static Control

Sep 9, 2015

I need to put a dynamic table (the amount of rows I control) into a static container (with a fixed size).

View 2 Replies View Related

How To Add Two Cell Values In Table In Reporting Services(on 27th)

Mar 27, 2008

Hi all
I have two cells,having first cell 0 and other cell 5.
How can i add these two cell values.
I used following expression

=Fields!LITMIN.Value + Fields!NUMMIN.Value
But i am getting Concatenated result ie:05
But i need 5.
How can i do it.Pls help me

View 4 Replies View Related

About Table Control In Reporting Services(on March 19th)

Mar 19, 2008

Hi all,
I am having problem with table control
I added one table control to my report designer.
How can i get horizontal and vertical lines to my table.
Regards.

View 6 Replies View Related

Reporting Services :: Adjust Table Height And Width?

Nov 5, 2015

I have designed a matrix report to display activities for which I added a table with in one of the cell When I run the report, I see activities but the row alignment is not proper and also when there are no records it displays blank.

View 6 Replies View Related

Reporting Services :: How To Add Identity Column Into Existing Table

Jun 10, 2015

how to add identity column into existing table in sql.

View 5 Replies View Related

Reporting Services :: Blank Space When Hide Table

Jan 4, 2011

When I hide a table based on an expression it leaves a blank space. How do you get rid of the blank space?

View 7 Replies View Related

VS 2005/SQL Reporting Services/storedprocedure Tmp Table Problem

Mar 9, 2006

hi,

i am trying to design a report (.rdlc) in VS2005 where the data source is a stored procedure which uses a temperory table (#temp_SM) and at the end of this stored procedure I have something like ..

select Sample_collection_num , ProductSeln , message , convert(varchar(10),sample_schedule_date,103) as sample_schedule_date from #temp_SM


drop table #temp_SM
GO


Now the problem is in Visual sudio2005 when I am creating a new dataset with the source as this stored procedure it is saying :

Invalid object name '#temp_SM'

and the result is I cant see any fields in the Data sources explorer......
hence cant add anything to the report......

Any help is greatly appreciated....

Thanks in advance

View 8 Replies View Related

Reporting Services :: How To Call Table Value Function In SSRS

Sep 23, 2015

How to call a table valued functions from SSRS reports ? 

Is there a way to call by selecting Dataset properties> Query >Stored Procedure radio button, If not then why our object type function is visible under this list.

MS SQL Server 2008 R2

View 5 Replies View Related







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