Showing posts with label studio. Show all posts
Showing posts with label studio. Show all posts

Tuesday, March 27, 2012

Deleting Parameter From Preview Pain

Product: Reporting Services 2005

Visual Studio 2005

I've added parameters to my query in the Data Tab. Then removed one. The preview pane still shows the deleted parameter even though it does not exist in my query. I've tried opening the dataset settings and re-adding the parameter, saving, then deleting. This ghost parameter will not disappear from the Preview Pane. Is this a bug or am I not deleting it correctly.

Thanks,

Matt

To solve your preview pane pain, you need to remove the parameter from the Report Parameters collection.

Select Report from the toolbar and Report Parameters. When you add a query parameter a Report Parameter is automatically created for you, but the same is not true when your remove query parameters.

-chris

deleting multiple tables through the Management Studio GUI

is there a way to delete multiple tables using the Management Studio GUI?In the Object Explorer Detail pane, while holding down the [ctrl] key, select the tables to delete, and the press the [Delete] key.

Sunday, March 25, 2012

Deleting legacy maintenance plans - 2005

I am unable to delete my SQL Server 2005 legacy database mainenance plans. Here are the steps taken in SQL Server Management Studio:

- Expand Management | Legacy | Database Maintenace Plans

- Right click one of the maintenance plans

- Select "Delete"

A Delete Object window is displayed. I click the OK button, and the Management Studio no longer displays the maintenance plan. But after refreshing the view, the maintenance plan reappears. It wasn't really deleted.

I also tried another way of deleting it. In the Delete Object window, I selected "Script Action to new Query window", then ran the query. It did not delete the maint plan.

Any suggestions?

Thanks,

JackS

Still no responses. Have any of you experienced the same problem?

Thank you,

JackS

|||I will follow up with our team and get back to you on this. You can reach me at gdwarak at microsoft dot com(not to get spammers attention) in case i do not get back in couple of days.|||

That is right this is a bug and is planned to get addressed in next service pack.

Gops Dwarak, Microsoft.

|||

Hi Gops!

I (we) 've got the same problem with a lot of customers running SAP on MSSQL.

Therefore there's a lot of trouble about this issue.

Do you or anybody elsing reading this, have a workaround killing these legacy plans.

I mean: it just looks like an annoying thing, but these plans do run. And for example if you have got planned lot's of backups with maint plans it is "more than annoying".

Thanks in advance.

Carsten Loeffler

|||install SP2 problem solved

Deleting legacy maintenance plans - 2005

I am unable to delete my SQL Server 2005 legacy database mainenance plans. Here are the steps taken in SQL Server Management Studio:

- Expand Management | Legacy | Database Maintenace Plans

- Right click one of the maintenance plans

- Select "Delete"

A Delete Object window is displayed. I click the OK button, and the Management Studio no longer displays the maintenance plan. But after refreshing the view, the maintenance plan reappears. It wasn't really deleted.

I also tried another way of deleting it. In the Delete Object window, I selected "Script Action to new Query window", then ran the query. It did not delete the maint plan.

Any suggestions?

Thanks,

JackS

Still no responses. Have any of you experienced the same problem?

Thank you,

JackS

|||I will follow up with our team and get back to you on this. You can reach me at gdwarak at microsoft dot com(not to get spammers attention) in case i do not get back in couple of days.|||

That is right this is a bug and is planned to get addressed in next service pack.

Gops Dwarak, Microsoft.

|||

Hi Gops!

I (we) 've got the same problem with a lot of customers running SAP on MSSQL.

Therefore there's a lot of trouble about this issue.

Do you or anybody elsing reading this, have a workaround killing these legacy plans.

I mean: it just looks like an annoying thing, but these plans do run. And for example if you have got planned lot's of backups with maint plans it is "more than annoying".

Thanks in advance.

Carsten Loeffler

|||install SP2 problem solvedsql

Wednesday, March 7, 2012

Delete user

SQL 2005. and SQL Management studio I have a user 'myuser' in a SQL DB
'mydatabase' under security users. When I try to delete him, I get error
says DB principal owns schema and cant be dropped. I try to remove his role
as DBOwner and it says login name must be specified. (The window above has
his username shown but the loginname field is blank and greyed out/
disabled. I added him to the overall sql DB users / security and it allowed
me to. When I tried to map him to the 'mydatabase' it says 'myuser' already
exists. How can I get rid of this user in the 'mydatabase' DB. I have other
users in the DB that I can delete.
Thanks
bucThe key seems to be that the user owns a schema. See what schema the user ow
ns (schema folder) and
either drop the schema (if empty) or change the owner of the schema to someb
ody else.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<Buc> wrote in message news:OpjsV6ceGHA.1456@.TK2MSFTNGP04.phx.gbl...
> SQL 2005. and SQL Management studio I have a user 'myuser' in a SQL DB 'my
database' under security
> users. When I try to delete him, I get error says DB principal owns schema
and cant be dropped. I
> try to remove his role as DBOwner and it says login name must be specified
. (The window above has
> his username shown but the loginname field is blank and greyed out/ disabl
ed. I added him to the
> overall sql DB users / security and it allowed me to. When I tried to map
him to the 'mydatabase'
> it says 'myuser' already exists. How can I get rid of this user in the 'my
database' DB. I have
> other users in the DB that I can delete.
> Thanks
> buc
>|||Make sure there are no objects owned by this user. If there are any, you
should change the owner and then you should be able to delete this user from
the database.
Anith|||That worked, he had a entry under the schema folder which had zero objects.
I deleted his entry and it worked. Thanks
"Anith Sen" <anith@.bizdatasolutions.com> wrote in message
news:e52E89ceGHA.1276@.TK2MSFTNGP03.phx.gbl...
> Make sure there are no objects owned by this user. If there are any, you
> should change the owner and then you should be able to delete this user
> from the database.
> --
> Anith
>

Saturday, February 25, 2012

delete tables automatically

How can I delete tables in a SQLServer Database automatically (at the moment I just do it using Micorosft SQl Management Studio Express manually)

But its important that I can do that automatically, the best thing would be if I can do that from a .NET programm.

thanks in advance,

mulata

Does Automatically means just sending a query from you program? DELETE FROM TABLENAME

|||

yes, but how can I implement that in my .NET program?

The Database should simply be cleared totally, so all tables should be deleted.

|||

You would need to explain a little bit more rather than one liners. Do you need to delete all the tables or some of them or just one of them?

You could write a stored proc to drop all the tables and just call the proc from your .NET code.

|||

okay, I just want to delete all tables in a database.

Im sorry but I have no idea how I can write such a proc, which I can call from my .NET code.

It would be great if someone can give me an example of such a proc.

Actually I think what the proc has to do, is just connect to the database, and the make a simple call, but I dont know what there is to do in detail.

thanks in advance

|||

SqlConnection connection =

new

SqlConnection (ConfigurationSettings.AppSettings[

"ConnectionString"]);

try

{

connection.Open ();

SqlCommand cmd =

new SqlCommand ("delete from (select * from sys.tablenames)" )

cmd.ExecuteNonQuery ();

}

finally

{

connection.Close ();

}

|||

Depending on your business requirements if you dont need the data ever, you might look into truncatng the tables. DELETE'ing can bloat the logs. TRUNCATE is a non-logged operation.

Read up the documentation regarding DELETE, TRUNCATE and it wil lhelp you decide which one worls best for you.

CREATE PROC dbo.prcDeleteAllTables

AS

BEGIN

TRUNCATE TABLE tableA

END

Sunday, February 19, 2012

delete records in the destination file in SSIS

How do I delete records in the destination file in SSIS using BI Development
Studio? Thanks.I mean I am running a daily task and I want to delete the records in destination DB or xls file before I export to this file. How can I do the delete task?|||Execute SQL Task for tables.

For Excel, I honestly don't know, but you might end up using a Script Task, where you use the Excel Object Model to empty the excel sheet.|||truncate table [table]. for sql

Tuesday, February 14, 2012

Delete multiple tables?

SQL Server 2005:
How can I select and delete multiple tables in Management Studio?
Olav"Olav" <x@.y.com> wrote in message
news:%23nm2%23laXGHA.1204@.TK2MSFTNGP04.phx.gbl...
> SQL Server 2005:
> How can I select and delete multiple tables in Management Studio?
> Olav
>
Do you mean DROP the tables or do you mean DELETE the data from tables?
/* Delete ALL data from 3 tables */
DELETE FROM table1 ;
DELETE FROM table2 ;
DELETE FROM table3 ;
/* Drop 3 tables */
DROP TABLE table1 ;
DROP TABLE table2 ;
DROP TABLE table3 ;
Make sure you have a backup before you try these!
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||I did mean from the GUI...
Seems like all the DBAs only work in a command line.
Olav
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:envtF9aXGHA.752@.TK2MSFTNGP02.phx.gbl...
> "Olav" <x@.y.com> wrote in message
> news:%23nm2%23laXGHA.1204@.TK2MSFTNGP04.phx.gbl...
>> SQL Server 2005:
>> How can I select and delete multiple tables in Management Studio?
>> Olav
> Do you mean DROP the tables or do you mean DELETE the data from tables?
> /* Delete ALL data from 3 tables */
> DELETE FROM table1 ;
> DELETE FROM table2 ;
> DELETE FROM table3 ;
> /* Drop 3 tables */
> DROP TABLE table1 ;
> DROP TABLE table2 ;
> DROP TABLE table3 ;
> Make sure you have a backup before you try these!
> --
> David Portas, SQL Server MVP
> Whenever possible please post enough code to reproduce your problem.
> Including CREATE TABLE and INSERT statements usually helps.
> State what version of SQL Server you are using and specify the content
> of any error messages.
> SQL Server Books Online:
> http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
> --
>|||"Olav" <x@.y.com> wrote in message
news:uo72tPbXGHA.1204@.TK2MSFTNGP04.phx.gbl...
>I did mean from the GUI...
> Seems like all the DBAs only work in a command line.
>
All the DBAs I know do. I would only recommend the GUI for development - not
on production servers.
If you want to drop multiple tables you can in fact do it from the GUI.
Select the tables node in the Object Explorer, then press F7 for the summary
view. You can now use shift+click to multi-select the tables, then hit
DELETE and click the button to drop them.
I don't think you can delete from more than one table without writing a
script.
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||On Wed, 12 Apr 2006 00:04:36 +0200, Olav wrote:
>I did mean from the GUI...
Hi Olav,
Use click, shift-click, and ctrl-click to select the tables to delete;
Right-click one of the selected tables;
Click "delete".
>Seems like all the DBAs only work in a command line.
Indeed. The GUI has some bugs, some strange behaviour, and lacks some of
the finer control possibilities that the command line gives.
Once you've leared to use the SQL Statements, you'll find yourself using
the GUI less and less.
--
Hugo Kornelis, SQL Server MVP