Showing posts with label key. Show all posts
Showing posts with label key. Show all posts

Wednesday, March 28, 2012

problem with key encryption

Hello,

I am using report server sql express.

The report was working until yesturday.Sudenly the report did'nt work and give an error :

The report server cannot decrypt the symmetric key used to access sensitive or encrypted data in a report server database. You must either restore a backup key or delete all encrypted content and then restart the service. Check the documentation for more information. (rsReportServerDisabled) Get Online Help
Bad Data.

I delete the key and change the data source.Now it works fine!

My problem is that this is not the first time that it happens!!!

I don't know what the cause of the problem and why suddenly after some times,the report give an erraur that i have to delete the key!!

i would like this not to happen anymore!!

What do i have to do to avoid this?

Please help me it's urgent

Thanks alot

Did you reset (not change, but reset) the password for the user that the Report Server windows service is running as? This would cause this message. Did you change the user that the report service is running as?|||

Hi

Thank you for your answer,when i installed reporting service, i installed the default installation so that now i have in the report server window service account this configurations:

service name: ReportServer$SQLEXPRESS

service account: NT AUTHORITY\NetworkService

built in account: network service.

Does it cause a problem that it's a built in account network service? i have a network.what configuration do i have to change so that i will never get the error that i got?

For answering your question i didn't change or reset the password i don't even know how to do that!

Help me please!

Thanks in advance

|||You should only get this error when you change the service account via the service control panel and not through the report server config tool. What you can try now is running the Report Server Configuration Manager and select the Encryption Keys tab. Then select Delete. This will mean that you will need to re-enter any data source credential information, but should at least bring your server back up.

problem with key encryption

Hello,

I am using report server sql express.

The report was working until yesturday.Sudenly the report did'nt work and give an error :

The report server cannot decrypt the symmetric key used to access sensitive or encrypted data in a report server database. You must either restore a backup key or delete all encrypted content and then restart the service. Check the documentation for more information. (rsReportServerDisabled) Get Online Help
Bad Data.

I delete the key and change the data source.Now it works fine!

My problem is that this is not the first time that it happens!!!

I don't know what the cause of the problem and why suddenly after some times,the report give an erraur that i have to delete the key!!

i would like this not to happen anymore!!

What do i have to do to avoid this?

Please help me it's urgent

Thanks alot

Did you reset (not change, but reset) the password for the user that the Report Server windows service is running as? This would cause this message. Did you change the user that the report service is running as?|||

Hi

Thank you for your answer,when i installed reporting service, i installed the default installation so that now i have in the report server window service account this configurations:

service name: ReportServer$SQLEXPRESS

service account: NT AUTHORITY\NetworkService

built in account: network service.

Does it cause a problem that it's a built in account network service? i have a network.what configuration do i have to change so that i will never get the error that i got?

For answering your question i didn't change or reset the password i don't even know how to do that!

Help me please!

Thanks in advance

|||You should only get this error when you change the service account via the service control panel and not through the report server config tool. What you can try now is running the Report Server Configuration Manager and select the Encryption Keys tab. Then select Delete. This will mean that you will need to re-enter any data source credential information, but should at least bring your server back up.|||Did you resolve your issue with this problem. We are having the same problem every time we reboot our servers. we have to reapply the key each time. Very troubling!

problem with join

hi, I have two tables join with each other,
key from table1 is nvarchar column, key from table2 is varchar column, so
when they join, the performance is very bad, however, when I change both
them to varchar and join them together, the performance is much better.
but the problem is I don't want to change the column definition, I still
want to improve the query. is it possible?When column datatypes are different in comparison side, SQL Server has to
internally convert it for you and that's why your query is performing slower
.
This is by design and is the expected.
You can use CAST funtion and see if it helps which I highly doubt.
"Britney" wrote:

> hi, I have two tables join with each other,
> key from table1 is nvarchar column, key from table2 is varchar column, s
o
> when they join, the performance is very bad, however, when I change both
> them to varchar and join them together, the performance is much better.
> but the problem is I don't want to change the column definition, I still
> want to improve the query. is it possible?
>
>

Tuesday, March 20, 2012

problem with foreign keys

Hiya, I'm having a prob I'd really appreciate any help. I get the message 'ORA-02273: this unique/primary key is referenced by some foreign keys' every time i try these foreign keys. I read another post on something similar but still need some help.

For example I have 2 tables:

CREATE TABLE EQUIPMENT
(serialno varchar2(7) not null,
equip varchar2(30),
primary key (serialno) );

CREATE TABLE ROOMBOOKING
(bookingdate date not null,
sess char(1) not null,
roomno number(3) not null,
misc varchar2(30),
primary key (bookingdate, sess, roomno) ); <<SO COMPOSITE KEY HERE

Now I need to make foreign keys in another table to some of these columns but I keep getting there error. For example I've got a table called EQUIPMENTBOOKING that contains
sess, bookingdate, roomno, serialno

but I cant get the keys working.

ALTER TABLE EQUIPMENTBOOKING
add constraint fkey_room
foreign key (bookingdate, roomno, sess) references roombooking (bookingdate, roomno, sess) ;

tried one at a time

ALTER TABLE EQUIPMENTBOOKING
add constraint fkey_room
foreign key (bookingdate) references roombooking (bookingdate) ;

still get the error. And still havent put in the other table one yet, its roombooking thats causing the problem. Can one help?

thanks alottry specifying the FK columns in the same order as the PK columns

in fact you should be able simply to reference the table, and it will figure out the PK

ALTER TABLE EQUIPMENTBOOKING
add constraint fkey_room
foreign key (bookingdate, sess, roomno) references roombooking|||Aaah, thanks a lot. That fixed it up. Working now, thankyou.

Problem with foreign key

Hello,
I have a problem with foreign key. What I want to do is , have one foreign key referencing in two different tables! I have created three tables:

create table University(
UniversityID int not null,
Name nvarchar(50),
....
....
....
primary key(UniversityID )
);

create table Person(
PersonID int not null,
Name nvarchar(50),
....
....
....
primary key(PersonID )
);

create table Borrower(
BorrowerID int not null,
Name nvarchar(50),
MemberName int,
....
....
....
primary key(BorrowerID )
foreign key(MemberName) reference University,
foreign key(MemberName) reference Person,

);

So I want to have one column (in my example MemeberName) which referencing in two different tables. How can I do that??I am not entirely sure what you are trying to accomplish, could you please reword you question a little?|||

Quote:

Originally Posted by Motoma

I am not entirely sure what you are trying to accomplish, could you please reword you question a little?


Ok, Sorry for that. Well, I have created three tables University, Person and Borrower. What I want to do is to have one column in table Borrower (lets say with name MemberId) which will be foreign key referencing together in the other two tables.
For example I gave the below syntax in SQL Server but it does not work:

create table Borrower(
BorrowerID ..........,
................,
..................,
...................,

foreign key (MemberID) references University,
foreign key (MemberID) references Person

);|||So you want the key to exist in either one of the tables? I'm not quite sure of the interaction you are looking for.|||

Quote:

Originally Posted by Motoma

So you want the key to exist in either one of the tables? I'm not quite sure of the interaction you are looking for.


ok I see. I will try to find another way. thanks

Wednesday, March 7, 2012

Problem With Distinct clause

Hi

I have the following tables:

Suppliers:
SupplierID int not null primary key auto_increment
SubscriptionTypeID int not null
SubscriptionExpDate Date

Products:
ID int not null primary key auto_increment
SupplierID int not null as foreign key
ProductCode varchar(30) not null
productName varchar(255) not null
ImageID int not null as foreign key

Images:
ImageID int not null primary key auto_increment
Image blob not null

Whats is the correct SQL syntax to retrieve the disticnt Image and ProductName where ProductName is LIKE some user defined string and SubscriptionExpDate >= Date() order by SubscriptionTypeID DESC.

The above query will retrieve multiple records for the same Image if there are multiple suppliers for that product. How do I retrieve the distinct Image? The only other way i can think of solving this is to redesign the table and include the productName in the Images table. However all images are unique but product names supplied by the supplier for a particular image/product can be different. hence to increase the posibility of retrieving a match I have included it in the products Table!

Any help will be appreciated.what does "the distinct image" mean?

if a single product is supplied by multiple suppliers, and you have a query where you join product to suppliers, then why aren't you asking about returning "the distinct product" too?

that is where your difficulty lies ;)|||Basically I want to check if there is a product that matches the user defined search string on product name, for an item supplied by a supplier whos subcription to the database is still valid. If there is I only want to display one image and product name. Hence I want to retrieve distinct name as well. But that is not possible becuase the product name for a given product is different for each supplier yet it is for the same product. i dont think there is any other way round this than the way I metioned. By including product name in the images table aswell!

You may be wondering what is the purpose of such a query. well it is to be implemented on a web page. The above query should display all items which match the search string but onyl display unique images and any one name. At present I get duplicate images and names per row.

If you have any other suggestions I would be glad to hear them.|||here's the important part of what you just said --Basically I want to check if there is a product that matches the user defined search string on product name, for an item supplied by a supplier whos subcription to the database is still valid. If there is I only want to display one image and product name.so my question is, which one? the item with the shortest name? the supplier with the latest registration date?

to pick one from among many, you need a way to say which one

answers that are not allowed include "any one," "the first one," and "you pick one"

:)

Saturday, February 25, 2012

problem with delete statement

Hi guys,

i need some help on this issue, i have a table with a nvarchar type column with primary key constraint. I have made a procedure which deletes record from this table using the primary key. My primary key is TxnID, and when i ran the following statement:

DELETE from mytable where TxnID = '119DA-117440520'

it deleted the record with the id '119DA-1174405208'

I dont want this to happen, i only want to delete records with the exact IDs that i provide. Can any one tell me how i should do that?

Thanks in advance.

sorry! i managed to fix it...actually the width was not defined properly which was causing problem

sorry again