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

Thursday, March 29, 2012

Adding a restricted role to SQL Server 2005

I have a database and I want to grant an external user access to only one
view in my database. Using SQL Studio I generated these scripts and ran
them.
Once I did that I logged into the database as [loginExternalApp] and was
happy that I could not see any of the raw tables. But I found that I could
SELECT from all of the views in my database, not just the one I granted the
SELECT to.
What did I miss? I thought by default that the new role would have no
permissions for anything that I did not grant. It doesn't seem right that I
would need to specifically deny access to all of the views.
Any thoughts would be welcome.
Richard Speiss
Here is the script that I ran
USE [master]
GO
CREATE LOGIN [loginExternalApp] WITH PASSWORD=N'password',
DEFAULT_DATABASE=[TestDB], CHECK_EXPIRATION=OFF
GO
USE [TestDB]
GO
CREATE USER [userExternalApp] FOR LOGIN [loginExternalApp]
GO
CREATE ROLE [roleExternalApp]
GO
EXEC sp_addrolemember N'roleExternalApp', N'useExternalApp'
GO
GRANT SELECT ON [dbo].[vTestView] TO [roleExternalApp]
GO
Hi Richard,
Verify the permissions granted to the public role. Every user is a member of
the public role and has access to the objects granted to it.
Right-click any of these views in Management Studio, select Properties and
Permissions. See if permissions have been granted to public.
Also, you are not talking about catalog views, right?
Hope this helps,
Ben Nevarez
"Richard Speiss" wrote:

> I have a database and I want to grant an external user access to only one
> view in my database. Using SQL Studio I generated these scripts and ran
> them.
> Once I did that I logged into the database as [loginExternalApp] and was
> happy that I could not see any of the raw tables. But I found that I could
> SELECT from all of the views in my database, not just the one I granted the
> SELECT to.
> What did I miss? I thought by default that the new role would have no
> permissions for anything that I did not grant. It doesn't seem right that I
> would need to specifically deny access to all of the views.
> Any thoughts would be welcome.
> Richard Speiss
>
> Here is the script that I ran
> USE [master]
> GO
> CREATE LOGIN [loginExternalApp] WITH PASSWORD=N'password',
> DEFAULT_DATABASE=[TestDB], CHECK_EXPIRATION=OFF
> GO
> USE [TestDB]
> GO
> CREATE USER [userExternalApp] FOR LOGIN [loginExternalApp]
> GO
> CREATE ROLE [roleExternalApp]
> GO
> EXEC sp_addrolemember N'roleExternalApp', N'useExternalApp'
> GO
> GRANT SELECT ON [dbo].[vTestView] TO [roleExternalApp]
> GO
>
>
|||Thanks, those views are granting 'public' accessibility (user views, not
catalog views)
I don't see an easy way to disable the 'public' role though or to get my
[userExternalApp] to not be part of 'public'.
Is there any way to disable the public role or do I need to explicitly
revoke permissions to public on each view (and/or table, etc)?
Thanks again
Richard
"Ben Nevarez" <bnevarez@.no.spam.please.sunamerica.com> wrote in message
news:449C85C5-A8D8-49F5-8480-80584D1E91CD@.microsoft.com...[vbcol=seagreen]
> Hi Richard,
> Verify the permissions granted to the public role. Every user is a member
> of
> the public role and has access to the objects granted to it.
> Right-click any of these views in Management Studio, select Properties and
> Permissions. See if permissions have been granted to public.
> Also, you are not talking about catalog views, right?
> Hope this helps,
> Ben Nevarez
>
>
> "Richard Speiss" wrote:

Adding a restricted role to SQL Server 2005

I have a database and I want to grant an external user access to only one
view in my database. Using SQL Studio I generated these scripts and ran
them.
Once I did that I logged into the database as [loginExternalApp] and was
happy that I could not see any of the raw tables. But I found that I could
SELECT from all of the views in my database, not just the one I granted the
SELECT to.
What did I miss? I thought by default that the new role would have no
permissions for anything that I did not grant. It doesn't seem right that I
would need to specifically deny access to all of the views.
Any thoughts would be welcome.
Richard Speiss
Here is the script that I ran
USE [master]
GO
CREATE LOGIN [loginExternalApp] WITH PASSWORD=N'password',
DEFAULT_DATABASE=[TestDB], CHECK_EXPIRATION=OFF
GO
USE [TestDB]
GO
CREATE USER [userExternalApp] FOR LOGIN [loginExternalApp]
GO
CREATE ROLE [roleExternalApp]
GO
EXEC sp_addrolemember N'roleExternalApp', N'useExternalApp'
GO
GRANT SELECT ON [dbo].[vTestView] TO [roleExternalApp]
GOHi Richard,
Verify the permissions granted to the public role. Every user is a member of
the public role and has access to the objects granted to it.
Right-click any of these views in Management Studio, select Properties and
Permissions. See if permissions have been granted to public.
Also, you are not talking about catalog views, right?
Hope this helps,
Ben Nevarez
"Richard Speiss" wrote:
> I have a database and I want to grant an external user access to only one
> view in my database. Using SQL Studio I generated these scripts and ran
> them.
> Once I did that I logged into the database as [loginExternalApp] and was
> happy that I could not see any of the raw tables. But I found that I could
> SELECT from all of the views in my database, not just the one I granted the
> SELECT to.
> What did I miss? I thought by default that the new role would have no
> permissions for anything that I did not grant. It doesn't seem right that I
> would need to specifically deny access to all of the views.
> Any thoughts would be welcome.
> Richard Speiss
>
> Here is the script that I ran
> USE [master]
> GO
> CREATE LOGIN [loginExternalApp] WITH PASSWORD=N'password',
> DEFAULT_DATABASE=[TestDB], CHECK_EXPIRATION=OFF
> GO
> USE [TestDB]
> GO
> CREATE USER [userExternalApp] FOR LOGIN [loginExternalApp]
> GO
> CREATE ROLE [roleExternalApp]
> GO
> EXEC sp_addrolemember N'roleExternalApp', N'useExternalApp'
> GO
> GRANT SELECT ON [dbo].[vTestView] TO [roleExternalApp]
> GO
>
>|||Thanks, those views are granting 'public' accessibility (user views, not
catalog views)
I don't see an easy way to disable the 'public' role though or to get my
[userExternalApp] to not be part of 'public'.
Is there any way to disable the public role or do I need to explicitly
revoke permissions to public on each view (and/or table, etc)?
Thanks again
Richard
"Ben Nevarez" <bnevarez@.no.spam.please.sunamerica.com> wrote in message
news:449C85C5-A8D8-49F5-8480-80584D1E91CD@.microsoft.com...
> Hi Richard,
> Verify the permissions granted to the public role. Every user is a member
> of
> the public role and has access to the objects granted to it.
> Right-click any of these views in Management Studio, select Properties and
> Permissions. See if permissions have been granted to public.
> Also, you are not talking about catalog views, right?
> Hope this helps,
> Ben Nevarez
>
>
> "Richard Speiss" wrote:
>> I have a database and I want to grant an external user access to only one
>> view in my database. Using SQL Studio I generated these scripts and ran
>> them.
>> Once I did that I logged into the database as [loginExternalApp] and was
>> happy that I could not see any of the raw tables. But I found that I
>> could
>> SELECT from all of the views in my database, not just the one I granted
>> the
>> SELECT to.
>> What did I miss? I thought by default that the new role would have no
>> permissions for anything that I did not grant. It doesn't seem right
>> that I
>> would need to specifically deny access to all of the views.
>> Any thoughts would be welcome.
>> Richard Speiss
>>
>> Here is the script that I ran
>> USE [master]
>> GO
>> CREATE LOGIN [loginExternalApp] WITH PASSWORD=N'password',
>> DEFAULT_DATABASE=[TestDB], CHECK_EXPIRATION=OFF
>> GO
>> USE [TestDB]
>> GO
>> CREATE USER [userExternalApp] FOR LOGIN [loginExternalApp]
>> GO
>> CREATE ROLE [roleExternalApp]
>> GO
>> EXEC sp_addrolemember N'roleExternalApp', N'useExternalApp'
>> GO
>> GRANT SELECT ON [dbo].[vTestView] TO [roleExternalApp]
>> GO
>>

Tuesday, March 27, 2012

Adding a new column of a UDT type fails on "invalid data type"

Hi all,

A strange thing happened to me a few days ago - I tried to modify a table, using the SQL server 2005 management studio, in order to add a new column to an existing table. I've entered the column's name and selected one of my UDTs for the column type. When I pressed "enter", I got the following message "invalid data type" !

Needless to say that shouldn't have happen, didn't happen it the previous version (CTP) and for some reason it works on other computers having the same version !

BTW, the database is sql server 2000.

Any ideas what this works on other computers but not on mine ?

Should I re-install the SQL server ? or the framework ?

Thanks,

Ido.

I'm still getting the error - currently on 2 out of 3 computers.

Any ideas ?

Ido.

sql

Sunday, March 25, 2012

Adding a data connection in Visual Studio

Not sure if I should add this in this forum or in a VS forum, but here goes.

I have a Visual Studio project setup using VB.Net 2005 RTM. I have a SQL2000 data connection set up and it is working. We have just added a SQL2000 database that is on the same server as a named instance. When I go to add the 2000 SQL data connection all I can see is the name of the Server and the 2005 databases. Both the SQL2005 and the SQL2000 are on a box cleverly called SERVER. In the "Add Connection" dialog box I enter Server as the server name and then when I click on the dropdown for the databases I just see the SQL2005 database. The 2000 instance name is SQL2000 so I entered \\Server\SQL2000 as the server name but that didn't get me anything. Any suggestions?

Thanks...

To connect to a named instance, you specify the server name in the connection dialog as <servername>\<instancename>. So in your environment, you would enter SERVER\SQL2000. Remove the leading backslashes and you should be ok.

jeff.

Adding a data connection in Visual Studio

Not sure if I should add this in this forum or in a VS forum, but here goes.

I have a Visual Studio project setup using VB.Net 2005 RTM. I have a SQL2000 data connection set up and it is working. We have just added a SQL2000 database that is on the same server as a named instance. When I go to add the 2000 SQL data connection all I can see is the name of the Server and the 2005 databases. Both the SQL2005 and the SQL2000 are on a box cleverly called SERVER. In the "Add Connection" dialog box I enter Server as the server name and then when I click on the dropdown for the databases I just see the SQL2005 database. The 2000 instance name is SQL2000 so I entered \\Server\SQL2000 as the server name but that didn't get me anything. Any suggestions?

Thanks...

To connect to a named instance, you specify the server name in the connection dialog as <servername>\<instancename>. So in your environment, you would enter SERVER\SQL2000. Remove the leading backslashes and you should be ok.

jeff.

Tuesday, March 20, 2012

Add-In Support For Management Studio

Is there add-in support for SQL Server 2005 Management Studio?

I want to build a script management add-in that is callable from the popup menu of the query window. I haven't been able to find anything on building add-ins for Management Studio on MSDN or the web. Did I miss something? Or is SDK/add-in support not available yet for Mangement Studio?

Thanks.

- Grant

Grant,

We do not current support third-party add-ins in Management Studio, though we don't explicitly lock this down. There are a few people out there who have figured out how get their add-in to surface. If you decide to go this route there is no guarantee that we won't break you in a service pack or future release.

Cheers,
Dan

Add-in for SQL Server Mnagement Studio 2005

Hi,
I notice that a few third party SQL Server tool developers (RedGate
for example) have started to sell utilities that appear as add-ins
to
SQL Server Management Studio 2005 (with additional menu's and
dialogs).
I cant find any documentation on how you do this. Is it an
unsupported hack ? If so, can anyone point me in the right direction
on how I would work out how to do this.
(Sorry for the cross post, I posted the same message in
microsoft.public.sqlserver.server by mistake).
Thanks in advance,
Matt
Asked and answered in .server. Please refrain from multiposting.

Adam Machanic
SQL Server MVP - http://sqlblog.com
Author, "Expert SQL Server 2005 Development"
http://www.apress.com/book/bookDisplay.html?bID=10220
<matt_randle@.yahoo.com> wrote in message
news:1183902073.740953.145580@.22g2000hsm.googlegro ups.com...
> Hi,
> I notice that a few third party SQL Server tool developers (RedGate
> for example) have started to sell utilities that appear as add-ins
> to
> SQL Server Management Studio 2005 (with additional menu's and
> dialogs).
>
> I cant find any documentation on how you do this. Is it an
> unsupported hack ? If so, can anyone point me in the right direction
> on how I would work out how to do this.
> (Sorry for the cross post, I posted the same message in
> microsoft.public.sqlserver.server by mistake).
> Thanks in advance,
>
> Matt
>
|||Adam Machanic (amachanic@.IHATESPAMgmail.com) writes:
> Asked and answered in .server. Please refrain from multiposting.
Hey, he did after all say:
[vbcol=seagreen]
And this groups is certainly the appropriate one for the topic.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
|||Ok. Thanks for your reply (in the other group). If I can work out
how to do it, ill put up a blog post explaining it. I notice that it
will be a supported feature in the next release of SSMS though so may
just wait for that.
Thanks.
On 8 Jul, 16:09, "Adam Machanic" <amacha...@.IHATESPAMgmail.com> wrote:
> Asked and answered in .server. Please refrain from multiposting.
> --
> Adam Machanic
> SQL Server MVP -http://sqlblog.com
> Author, "Expert SQL Server 2005 Development"http://www.apress.com/book/bookDisplay.html?bID=10220
> <matt_ran...@.yahoo.com> wrote in message
> news:1183902073.740953.145580@.22g2000hsm.googlegro ups.com...
>

Sunday, March 11, 2012

Add sdf file to my project when my sources are on remote server

I have an application that runs on a PDA and manage a database (.sdf) file I use C# with visual studio 5.0.

What I want to do is to add the database file (.sdf) to my project files and open a connection to it.

The problem is that all my source file are stored on remote machine and not locally on my machine and the .sdf file is also stored with the project source files.

When I try to add the file to the project I get the following error fro the data source configuration wizard :

"An error occured while retrieving the information from the database"

DRIVE_REMOTE

Parameter Name : N:\

I get the same error also when I try to open a new connection to the file from the server explorer. When i copy the file to drive "C" I can open a connection to it with no errors.


Software engineer

Hello,

Remotely opening an sdf file (SSC database) is not supported. From desktop to device (DB on a device) access is possible, but, I don't think the other way is.

Thanks

Udaya.

Add role to Analysis Services Database

Does anyone know if there is a way to use a SSIS task to add a role to SSAS cube? At the moment I use Management Studio, Right Click "Roles" under the cube and go through New Role wizard, but I'd like to be able to include this in a SSIS package instead.

Thanks

Richard

You can do it through the Script task, employing the AMO (Analysis Management Objects) library. I recommend creating the role in SSMS first but instead of submitting the change to the system, clicking the Script button at the top of the New Role dialog box to view the XMLA\ASSL script it creates. The script can be a guide for your AMO development (as AMO is just a wrapper for the XMLA\ASSL languages).

Good luck,

Bryan

|||

Following along with what Bryan had mentioned you could script a role using Management Studio to use as a template then use and expression variable and an Analysis Services Execute DDL Task in SSIS to accomplish this as an ongoing solution. The Analysis Services Execute DDL Task will allow you to customize and execute the role creation/modification command and avoid having to use the script task.

Hope that helps!

|||

Thanks! Wow. Cool. Kind of got it to work but don't know quite how!

In SSMS scripting the role worked nicely and was able to run it in a query window and it did exactly what was needed.

I'm pretty useless at VB.NET so trying the Script Task in SSIS, I hit design script, added AMO as a reference and pasted the SSMS script where it says "Add your code here" inside of Public Sub Main(). Of course it doesn't work that simply. But is there a really simple answer to what I need or am I going to have to go off and learn some VB.NET ?

So then I tried Execute DDL task, and muddled my way around it. I save the original script as a .xmla file in the file system. Then in DDL task under DDL selected File Connection as SourceType and connected to this file. Executed task and it did what was needed.

I guess this is good enough as it works, but I wouldn't mind understanding better what I am doing!!

Thanks

Richard

|||

Here is a code sample from a past project where we created a role for each entry in a table. (Just sharing that last part so you understand the database query in the code.)

Code Snippet

' Microsoft SQL Server Integration Services Script Task

' Write scripts using Microsoft Visual Basic

' The ScriptMain class is the entry point of the Script Task.

Imports System

Imports System.Data

Imports System.Data.SqlClient

Imports System.Math

Imports Microsoft.SqlServer.Dts.Runtime

Imports Microsoft.AnalysisServices

Public Class ScriptMain

Public Sub Main()

Dim server As New Microsoft.AnalysisServices.Server

Try

' CONNECT TO THE SQL SERVER ANALYSIS SERVICES (SSAS) SERVER

server.Connect("localhost")

' THE SSAS DATABASE TO CONNECT TO

Dim database As New Microsoft.AnalysisServices.Database

database = server.Databases.FindByName(Dts.Variables("AnalysisServicesDatabaseName").Value.ToString)

' GET A LIST OF ROLES TO CREATE

' Connection String comes from the 'METADATA' Connection Manager

Dim myConnection As New SqlConnection(Dts.Connections.Item(0).ConnectionString.ToString())

Dim myCommand As SqlCommand = New SqlCommand("SELECT ID FROM dbo.Roles (NOLOCK) WHERE ID > 0", myConnection)

myConnection.Open()

' FILL THE DATAREADER

Dim dr As SqlDataReader = myCommand.ExecuteReader(CommandBehavior.CloseConnection)

' LOOP THROUGH THE DATAREADER AND BUILD A ROLE

If (dr.HasRows) Then

While (dr.Read())

CreateRole("Role for ID ", dr("ID").ToString, database)

End While

End If

' CLOSE THE DATAREADER

dr.Close()

' CLOSE THE SQL SERVER DB CONNECTION

myConnection.Close()

Dts.TaskResult = Dts.Results.Success

Catch ex As Exception

Dts.Events.FireError(1, ex.TargetSite.ToString, ex.Message, "", 0)

Finally

' DISCONNECT THE SSAS SERVER

server.Disconnect()

End Try

Dts.TaskResult = Dts.Results.Success

End Sub

Private Sub CreateRole(ByVal rolePrefix As String, ByVal dsNumber As String, ByVal asDatabase As Database)

Try

' WILL CREATE A ROLE IN THE ASSIGNED DB WITH THE NAME AND KEY VALUE

Dim newRole As Role

' CREATE THE NEW ROLES NAME

newRole = asDatabase.Roles.Add(rolePrefix + " " + dsNumber)

newRole.Description = "Role for " + rolePrefix + " " + dsNumber

newRole.Update()

Catch ex As Exception

Throw New Exception(ex.Message.ToString())

End Try

End Sub

End Class

Saturday, February 25, 2012

Add into 2 tables (VS 2005)

Hi, not sure if I've posted at the right area but here goes:

I'm working on a project using Visual Studio 2005 and SQL express server for the database.

Since I'm using VS 05, I use datasources to select, insert, delete, update from my db.

Question is, how do i insert, delete, update from 2 tables using datasource? is it even allowed?

If it's not allowed, are there any solutions other than using the codebehind?

Please help. Thank you.

hi galovesongs,

you can you any of these two solutions

1. on the vs.net

Making use of system.transaction

you can put two of your delete, insert, update inside a transaction

placing two statement in a transaction context

is the best way to go.

pls find a four page article on this link

http://www.devx.com/vb/Door/10608

2. on the database

you can make use of the trigger

i moved the thread here. for better opinions

Add Interactivity in exported Excel:Web report

Hi,

Specs:

I am using SSAS 2005, Excel 2003 (Office 2003 professional with sp2)

I browse the cube in SSAS 2005 BI studio and then export it to Excel.

This excel file provides interactivity, meaning that I double-click on a expandable cell , then excel issues a mdx query and retrieves the values.

Issues:

1. When I save this excel file, it displays that it is a read-only version and still allows me to save the excel file in the following formats: excel, web page (html and mhtml), xml file. Also it displays a checkbox for "Add Interactivity".

The saved web page (html or mhtml) or xml files do not provide interractivity. the reports are not able to expand cells or issue mdx queries. they allow to write on cells, but no double click.

How can I provide this?

I would want to save them as web pages, and then publish them to the web server.

2. The excel olap report that I exported yesterday, (excel 2003 file). like I mentioned before , give interactivity. but after I checked the same report after a day.

They are displaying the following error on double clicking or clicking on a drop down:

"xml for analysis parser: The xxxxxxx session id cannot be found. Either the session does not exist or it has already expired."

and clicking on 'Ok' it displays this message:

"Errors in the oledb provider. An error occured while loading the connection dialog box for prompting."

3. Do these excel olap reports provide the actions implemented in the cube?

I have created some drillthrough actions in the cube. how can I invoke them from the exported excel olap report?

We are planning to move from proclarity due to many of its rigidness. I feel that a software tool must provide for as much as customization as possible. If customization is not built in then it must atleast provide libbraries to write custom code and add on or modify existing funtionality. something similar to sharepoint.

although sharepoint from the face front seems rigid, it provides a lot of customizations. and as a last resort, if does not provide a built in customization method for something, you can pretty much hack into it and define whatever you want.

for example, in proclarity I want to allow multi select in the dropdown? Not possible at all. If I want users to double click and perform a defined 'action' , Not possible, proclarity displays all actions of all cells in a tab! if there are 100 actions , then users must search and select!

If i want the contents of one dropdown to depend on another using mdx. Not possible in proclarity.

I have a list of inconsistencies, which might not be the general usage for everybody, but in the world of software, How much can you really generalize?

Please do help in the excel questions....

Regards

Vijay,

1&2. When you save excel file, you have to find there publish button, and not use Save button. I do not have Excel 2003 in front ofme, but in Excel 2000, from Menu you have to choose "Save As Webpage" then "Publish", select Pivot Table then you click on "Add Interactivity with :" and select "Pivot table functionality". This will give you interactivity and no issues with session

3. No actions are implemented by default in excel. Microsoft has a code on their pages that you have to use to make drilltrough work.

Vidas Matelis

Add Interactivity in exported Excel:Web report

Hi,

Specs:

I am using SSAS 2005, Excel 2003 (Office 2003 professional with sp2)

I browse the cube in SSAS 2005 BI studio and then export it to Excel.

This excel file provides interactivity, meaning that I double-click on a expandable cell , then excel issues a mdx query and retrieves the values.

Issues:

1. When I save this excel file, it displays that it is a read-only version and still allows me to save the excel file in the following formats: excel, web page (html and mhtml), xml file. Also it displays a checkbox for "Add Interactivity".

The saved web page (html or mhtml) or xml files do not provide interractivity. the reports are not able to expand cells or issue mdx queries. they allow to write on cells, but no double click.

How can I provide this?

I would want to save them as web pages, and then publish them to the web server.

2. The excel olap report that I exported yesterday, (excel 2003 file). like I mentioned before , give interactivity. but after I checked the same report after a day.

They are displaying the following error on double clicking or clicking on a drop down:

"xml for analysis parser: The xxxxxxx session id cannot be found. Either the session does not exist or it has already expired."

and clicking on 'Ok' it displays this message:

"Errors in the oledb provider. An error occured while loading the connection dialog box for prompting."

3. Do these excel olap reports provide the actions implemented in the cube?

I have created some drillthrough actions in the cube. how can I invoke them from the exported excel olap report?

We are planning to move from proclarity due to many of its rigidness. I feel that a software tool must provide for as much as customization as possible. If customization is not built in then it must atleast provide libbraries to write custom code and add on or modify existing funtionality. something similar to sharepoint.

although sharepoint from the face front seems rigid, it provides a lot of customizations. and as a last resort, if does not provide a built in customization method for something, you can pretty much hack into it and define whatever you want.

for example, in proclarity I want to allow multi select in the dropdown? Not possible at all. If I want users to double click and perform a defined 'action' , Not possible, proclarity displays all actions of all cells in a tab! if there are 100 actions , then users must search and select!

If i want the contents of one dropdown to depend on another using mdx. Not possible in proclarity.

I have a list of inconsistencies, which might not be the general usage for everybody, but in the world of software, How much can you really generalize?

Please do help in the excel questions....

Regards

Vijay,

1&2. When you save excel file, you have to find there publish button, and not use Save button. I do not have Excel 2003 in front ofme, but in Excel 2000, from Menu you have to choose "Save As Webpage" then "Publish", select Pivot Table then you click on "Add Interactivity with :" and select "Pivot table functionality". This will give you interactivity and no issues with session

3. No actions are implemented by default in excel. Microsoft has a code on their pages that you have to use to make drilltrough work.

Vidas Matelis

Add Images to table of SQL Server 2005

Dear All,
How can I assign an image to an image-field in a SQL Server 2005
Express with the tooling of Microsoft (I have Visual Studio 2005 Team
edition). I cannot find a way.
Further I tried to write an small program with an DataGridView, but
here I can fill in all other fields except the image field. So how can
I get images in the database?
Thanks in advance, FrankSee if this helps:
http://support.microsoft.com/defaul...b;en-us;Q316887
--
HTH,
SriSamp
Email: srisamp@.gmail.com
Blog: http://blogs.sqlxml.org/srinivassampath
URL: http://www32.brinkster.com/srisamp
<frank.van.der.schoot@.relitech.nl> wrote in message
news:1145355355.271404.288750@.t31g2000cwb.googlegroups.com...
> Dear All,
> How can I assign an image to an image-field in a SQL Server 2005
> Express with the tooling of Microsoft (I have Visual Studio 2005 Team
> edition). I cannot find a way.
> Further I tried to write an small program with an DataGridView, but
> here I can fill in all other fields except the image field. So how can
> I get images in the database?
> Thanks in advance, Frank
>

Friday, February 24, 2012

add domain login from management studio

We have a SQL Server 2005 SP2 server that also functions as a
secondary domain controller in active directory. Everything works
extremely well except for 1 bug that was found today. Currently
windows authentication is the only method. When creating a new sql
login either physically at the server or through a remote desktop
connection the user is found in the domain and works just fine.
However when trying to do the same process using management studio
from a desktop connecting to the sql instance as soon as you try to
find the user in the domain you get this error: "The program cannot
open the required dialog box because it cannot determine whether the
computer name "COMPNAME" is joined to a domain."
I have sysadmin privileges on the sql server and if I use my login
name on the server physically I am able to create logins.
Any help would be greatly appreciated.
Thanks
MattI've previously posted a bug to connect.microsoft.com about this. Please go
there
(https://connect.microsoft.com/SQLSe...=126
183) and let them know of your problem.
--
Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration /
Microsoft Office SharePoint Server 2007: Configuration)
MCITP (dbadmin, dbdev)
"Matt Ziegler" wrote:

> We have a SQL Server 2005 SP2 server that also functions as a
> secondary domain controller in active directory. Everything works
> extremely well except for 1 bug that was found today. Currently
> windows authentication is the only method. When creating a new sql
> login either physically at the server or through a remote desktop
> connection the user is found in the domain and works just fine.
> However when trying to do the same process using management studio
> from a desktop connecting to the sql instance as soon as you try to
> find the user in the domain you get this error: "The program cannot
> open the required dialog box because it cannot determine whether the
> computer name "COMPNAME" is joined to a domain."
> I have sysadmin privileges on the sql server and if I use my login
> name on the server physically I am able to create logins.
> Any help would be greatly appreciated.
> Thanks
> Matt
>|||The problem that you are having is that when the SQL GUI opens the dialog to
select a user, it defaults to the local machine. Because the machine is
running as a domain controller it has no local accounts, and no local accoun
t
database.
Please go to connect.microsoft.com
(https://connect.microsoft.com/SQLSe...=126
183) and post additional information reguarding the issue.
--
Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration /
Microsoft Office SharePoint Server 2007: Configuration)
MCITP (dbadmin, dbdev)
"Matt Ziegler" wrote:

> We have a SQL Server 2005 SP2 server that also functions as a
> secondary domain controller in active directory. Everything works
> extremely well except for 1 bug that was found today. Currently
> windows authentication is the only method. When creating a new sql
> login either physically at the server or through a remote desktop
> connection the user is found in the domain and works just fine.
> However when trying to do the same process using management studio
> from a desktop connecting to the sql instance as soon as you try to
> find the user in the domain you get this error: "The program cannot
> open the required dialog box because it cannot determine whether the
> computer name "COMPNAME" is joined to a domain."
> I have sysadmin privileges on the sql server and if I use my login
> name on the server physically I am able to create logins.
> Any help would be greatly appreciated.
> Thanks
> Matt
>

Add connection error: 40

Hi i just reinstalled windows, and installed visual studio .net 2005 and the Sql server.

But when im trying to add connection, select my computer at Server

name, type a databasename then pressing OK i get this message:

An error has occured while estabilishing a connection to the server.

When connection to SQL server 2005, this faliure may be caused by the

fact that under the default settings SQL Server does not allow remote

connections. (provider: Names pipes provider, error: 40 - Could not

open a connection to SQL Server)

Does anyone know what todo?

hermanTry this: open the SQL Server Configuration Manager, expand SQL Server 2005 Network Configuration, highlight protocols for MSSQLSERVER and enable TCIP/IP.

Mike

Thursday, February 16, 2012

Add a new data source to a SQL Server Compact Edition

I have installed SQL Server 2005 CE on my computer, but when I try to add a data connection to a CE database in Visual Studio 2005, I cannot find the option "SQL Server 2005 Combact Edition". Why?

Hi,

see this here: http://img366.imageshack.us/img366/555/untitledph0.jpg
-Jens.

|||I have the same issue. I install the SQL compact framework runtime, SDK, and VS2K5 components but the option is never listed in the potential data sources for any project. I can create as many SQL server, SQL server express, or Access databases as I want, but the option for the Compact Edition just isn't listed.|||Hi,

I face the exactly the same problem. Have anyone found the solution to this?
thanks.

regards,
TY|||Hi,

Finally i got the problem fixed. Seem like there are some name conflict within the VS2005 for the Mobile Edition and Compact Edition. Just need to install the VS2005 SP1 all those problem will automatic fixed.
thanks.

regards,
Tze Yang

Add a new data source to a SQL Server Compact Edition

I have installed SQL Server 2005 CE on my computer, but when I try to add a data connection to a CE database in Visual Studio 2005, I cannot find the option "SQL Server 2005 Combact Edition". Why?

Hi,

see this here: http://img366.imageshack.us/img366/555/untitledph0.jpg
-Jens.

|||I have the same issue. I install the SQL compact framework runtime, SDK, and VS2K5 components but the option is never listed in the potential data sources for any project. I can create as many SQL server, SQL server express, or Access databases as I want, but the option for the Compact Edition just isn't listed.|||Hi,

I face the exactly the same problem. Have anyone found the solution to this?
thanks.

regards,
TY
|||Hi,

Finally i got the problem fixed. Seem like there are some name conflict within the VS2005 for the Mobile Edition and Compact Edition. Just need to install the VS2005 SP1 all those problem will automatic fixed.
thanks.

regards,
Tze Yang

Monday, February 13, 2012

Ad: Problems Creating Instance in SQL 2005 management studio

Hello all,
Thanks in advance for any help you can provide.
I am having a problem creating a new NS instance using SQL 2005 management studio.
I am using the database element in my instance and application xml files like this,
in order to create the NS application in an existing database.
<Database>
<DatabaseName>%databasename%</DatabaseName>
<SchemaName>%schemaname%</SchemaName>
</Database>
the problem that I am having is that if I encounter an error somewhere in the process of creating this new instance the instance name and schema name I specified are still bound somewhere, and if I correct for the error and try to create the instance again, I receive a new error saying that there is already an instance with my instance name, or using the schema name.
If I try to list versions it tells me there are no instances, yet if I try to add a new instance it tells me there is already an instance using my instance name.
I have tried searching master database tables and views for anywhere where it might be stored, also tried poking around most of management studio and the registry, and just can not seem to find where it is remembering that I had tried to create this instance before.
It is like it is partially creating the instance, running into an error, and then not rolling back its changes somewhere.

Any help would be very much appreciated

-Derek-

Web Services Integration Manager

TempWorks Software

Si Vis Pacem, Para Bellum.

"Those who profess to favor freedom, and yet depreciate agitation, are men who want crops without plowing up the ground. They want rain without thunder and lightning. They want the ocean without the awful roar of its many waters. Power concedes nothing without demand. It never did and it never will." - Frederick Douglass

additional error information.
I tried to remove the database and restore from a backup, and yet it still believe the instance name is in use.
I notice it seems to be checking the NS InstanceMetaData for existing instances on this server...
"Microsoft.SqlServer.NotificationServices.Common.InstanceMetadata.CheckInstanceNameInUse"
anyone know where this metadata is ?

===================================

The specified name is used by another Notification Services instance on the server. Specify a different instance name.
Instance Name: TWNSinstance
Server Name: derekxps (Microsoft.SqlServer.NotificationServices)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=NSEventStrings&EvtID=DuplicateInstanceName&LinkId=20476

Program Location:

at Microsoft.SqlServer.NotificationServices.Common.InstanceMetadata.CheckInstanceNameInUse(SqlConnection sqlConnection, NSInstance instance)
at Microsoft.SqlServer.NotificationServices.Common.InstanceMetadata.Add(NSInstance instance)
at Microsoft.SqlServer.NotificationServices.Common.NSDatabaseCreator.Create(NSDBState dbState, SqlDatabaseAttributes databaseAttributes, List`1 createdStates)
at Microsoft.SqlServer.NotificationServices.Common.InstanceCompiler.CreateDatabaseInfrastructure(Instance instance, NSSecureString argumentKey, NSInstance& nsInstance, Dictionary`2& nsApplications)
at Microsoft.SqlServer.NotificationServices.Common.InstanceCompiler.Create(Instance instance, NSSecureString argumentKey, Boolean uiReporting)
at Microsoft.SqlServer.NotificationServices.Common.InstanceCompiler.Create(NSSecureString sqlUserName, NSSecureString sqlPassword, String configFile, NSSecureString argumentKey, StringDictionary substitutions, Boolean uiReporting, String enforcedSqlServerSystem)
at Microsoft.SqlServer.Management.NotificationServicesUI.CreateInstanceGeneral.PerformCreate()|||

Hi Derek -

SQLNS 2005 stores its metadata in the MSDB database. Run this script in SSMS and see if your failed instance/application are listed.

USE MSDB

GO

SELECT*FROM NS90.NSInstanceInfo

SELECT*FROM NS90.NSApplicationInfo

HTH..

Joe

|||Thanks Joe,
I did find the instance names and schema names that it had "eaten" in there. cleared them and was able to install with the instance name I wanted.
Thanks for your help!

-Derek-

Ad: Problems Creating Instance in SQL 2005 management studio

Hello all,

Thanks in advance for any help you can provide.

I am having a problem creating a new NS instance using SQL 2005 management

studio.

I am using the database element in my instance and application xml files like

this,

in order to create the NS application in an existing database.

<Database>

<DatabaseName>%databasename%</DatabaseName>

<SchemaName>%schemaname%</SchemaName>

</Database>

the problem that I am having is that if I encounter an error somewhere in the

process of creating this new instance the instance name and schema name I

specified are still bound somewhere, and if I correct for the error and try to

create the instance again, I receive a new error saying that there is already

an instance with my instance name, or using the schema name.

If I try to list versions it tells me there are no instances, yet if I try to

add a new instance it tells me there is already an instance using my instance

name.

I have tried searching master database tables and views for anywhere

where it might be stored, also tried poking around most of management studio

and the registry, and just can not seem to find where it is remembering that I

had tried to create this instance before.

It is like it is partially creating the instance, running into an error, and

then not rolling back its changes somewhere.
Any help would be very much appreciated

-Derek-

Web Services

Integration Manager

TempWorks Software

Si Vis Pacem, Para Bellum.

"Those who profess to favor freedom, and yet depreciate agitation,

are men who want crops without plowing up the ground. They want rain without

thunder and lightning. They want the ocean without the awful roar of its

many waters. Power concedes nothing without demand. It never did and it

never will." - Frederick Douglass

additional error information.
I tried to remove the database and restore from a backup, and yet it still believe the instance name is in use.
I notice it seems to be checking the NS InstanceMetaData for existing instances on this server...
"Microsoft.SqlServer.NotificationServices.Common.InstanceMetadata.CheckInstanceNameInUse"
anyone know where this metadata is ?

===================================

The specified name is used by another Notification Services instance on the server. Specify a different instance name.
Instance Name: TWNSinstance
Server Name: derekxps (Microsoft.SqlServer.NotificationServices)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=NSEventStrings&EvtID=DuplicateInstanceName&LinkId=20476

Program Location:

at Microsoft.SqlServer.NotificationServices.Common.InstanceMetadata.CheckInstanceNameInUse(SqlConnection sqlConnection, NSInstance instance)
at Microsoft.SqlServer.NotificationServices.Common.InstanceMetadata.Add(NSInstance instance)
at Microsoft.SqlServer.NotificationServices.Common.NSDatabaseCreator.Create(NSDBState dbState, SqlDatabaseAttributes databaseAttributes, List`1 createdStates)
at Microsoft.SqlServer.NotificationServices.Common.InstanceCompiler.CreateDatabaseInfrastructure(Instance instance, NSSecureString argumentKey, NSInstance& nsInstance, Dictionary`2& nsApplications)
at Microsoft.SqlServer.NotificationServices.Common.InstanceCompiler.Create(Instance instance, NSSecureString argumentKey, Boolean uiReporting)
at Microsoft.SqlServer.NotificationServices.Common.InstanceCompiler.Create(NSSecureString sqlUserName, NSSecureString sqlPassword, String configFile, NSSecureString argumentKey, StringDictionary substitutions, Boolean uiReporting, String enforcedSqlServerSystem)
at Microsoft.SqlServer.Management.NotificationServicesUI.CreateInstanceGeneral.PerformCreate()|||

Hi Derek -

SQLNS 2005 stores its metadata in the MSDB database. Run this script in SSMS and see if your failed instance/application are listed.

USE MSDB

GO

SELECT * FROM NS90.NSInstanceInfo

SELECT * FROM NS90.NSApplicationInfo

HTH..

Joe

|||Thanks Joe,
I did find the instance names and schema names that it had "eaten" in there. cleared them and was able to install with the instance name I wanted.
Thanks for your help!

-Derek-

Ad: Answer Worked!

Hello all,
Thanks in advance for any help you can provide.
I am having a problem creating a new NS instance using SQL 2005 management studio.
I am using the database element in my instance and application xml files like this,
in order to create the NS application in an existing database.
<Database>
<DatabaseName>%databasename%</DatabaseName>
<SchemaName>%schemaname%</SchemaName>
</Database>
the problem that I am having is that if I encounter an error somewhere in the process of creating this new instance the instance name and schema name I specified are still bound somewhere, and if I correct for the error and try to create the instance again, I receive a new error saying that there is already an instance with my instance name, or using the schema name.
If I try to list versions it tells me there are no instances, yet if I try to add a new instance it tells me there is already an instance using my instance name.
I have tried searching master database tables and views for anywhere where it might be stored, also tried poking around most of management studio and the registry, and just can not seem to find where it is remembering that I had tried to create this instance before.
It is like it is partially creating the instance, running into an error, and then not rolling back its changes somewhere.

Any help would be very much appreciated

-Derek-

Web Services Integration Manager

TempWorks Software

Si Vis Pacem, Para Bellum.

"Those who profess to favor freedom, and yet depreciate agitation, are men who want crops without plowing up the ground. They want rain without thunder and lightning. They want the ocean without the awful roar of its many waters. Power concedes nothing without demand. It never did and it never will." - Frederick Douglass

additional error information.
I tried to remove the database and restore from a backup, and yet it still believe the instance name is in use.
I notice it seems to be checking the NS InstanceMetaData for existing instances on this server...
"Microsoft.SqlServer.NotificationServices.Common.InstanceMetadata.CheckInstanceNameInUse"
anyone know where this metadata is ?

===================================

The specified name is used by another Notification Services instance on the server. Specify a different instance name.
Instance Name: TWNSinstance
Server Name: derekxps (Microsoft.SqlServer.NotificationServices)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=NSEventStrings&EvtID=DuplicateInstanceName&LinkId=20476

Program Location:

at Microsoft.SqlServer.NotificationServices.Common.InstanceMetadata.CheckInstanceNameInUse(SqlConnection sqlConnection, NSInstance instance)
at Microsoft.SqlServer.NotificationServices.Common.InstanceMetadata.Add(NSInstance instance)
at Microsoft.SqlServer.NotificationServices.Common.NSDatabaseCreator.Create(NSDBState dbState, SqlDatabaseAttributes databaseAttributes, List`1 createdStates)
at Microsoft.SqlServer.NotificationServices.Common.InstanceCompiler.CreateDatabaseInfrastructure(Instance instance, NSSecureString argumentKey, NSInstance& nsInstance, Dictionary`2& nsApplications)
at Microsoft.SqlServer.NotificationServices.Common.InstanceCompiler.Create(Instance instance, NSSecureString argumentKey, Boolean uiReporting)
at Microsoft.SqlServer.NotificationServices.Common.InstanceCompiler.Create(NSSecureString sqlUserName, NSSecureString sqlPassword, String configFile, NSSecureString argumentKey, StringDictionary substitutions, Boolean uiReporting, String enforcedSqlServerSystem)
at Microsoft.SqlServer.Management.NotificationServicesUI.CreateInstanceGeneral.PerformCreate()|||

Hi Derek -

SQLNS 2005 stores its metadata in the MSDB database. Run this script in SSMS and see if your failed instance/application are listed.

USE MSDB

GO

SELECT*FROM NS90.NSInstanceInfo

SELECT*FROM NS90.NSApplicationInfo

HTH..

Joe

|||Thanks Joe,
I did find the instance names and schema names that it had "eaten" in there. cleared them and was able to install with the instance name I wanted.
Thanks for your help!

-Derek-