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

Tuesday, March 27, 2012

Cant get diagrams to work in SQL Management Studio

I can't get diagrams to work in SQL Management Studio. When I try to open that folder in the object browser, I get:
"Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects."
That's great, but what exactly constitutes a "valid login" and who or what is it supposed to be?
If you follow the first set of steps, click the button with theellipsis next to the owner textbox, and you'll get a list of validlogins that you can choose an owner from. Then save it, andyou should be ready to go.
|||But other than myself (the one it's already set to), there are no otheraccounts other than system accounts. How is me being an owner not goodenough?
|||Huh. Well, if you go to the Security node for your SQL Serverinstance, and look at the Logins, is your account in there? If itis, and you're still getting the error, you might try changing the DBowner to another account, save it, and then change it back toyourself.
|||Tried all of the above. No joy. I am the owner, or so it says.
This is seriously annoying, and in true MS documentation fashion, the docs are not helpful.
|||Was this database by any chance restored from another machine? Maybe a machine on another domain? Or have there been changes tothe domain since the database was created? That's the last thingthat I can think of...That even though the account *looks* to be thesame on the surface, that underneath, it's got a different SID than theaccount that's been granted access to the SQL Server instance. Ifthat's the case, then the remedy would be to delete your accountentirely from list of the database's users, and then re-add it. If that's not the solution, hopefully someone else will have a tip,'cause I'm out of ideas.
|||The database was upgraded from the old 2000 Dev Edition to the 2005 DevEdition. I ended up scripting the database, nuking it, and recreatingit since there was nothing critical about the actual data. All is wellnow. It was still annoying. :)
|||

Solution, you need to go:

Properties of your database
Options
Compatibility level and here select SQL Server 2005
Click OK
Go to Database Diagrams and it will ask you if you want to create it , put yes and you will get your diagrams.
Hope it helps.
Sorry for my english im from Argentine.

|||I think it had to do with the compatibility level. I had the same with a restored 2000 database on 2005. Couldn't access the diagrams. But after setting the compatibility level (properties of database then the options page) to SQL Server 2005 (90), I was able to access them. (some didn't work though)
gr Rc

Sunday, March 25, 2012

Can't find the server management studio

hey,

i did the installation, everything went well.

when i want to start the server management studio it isn't in the program files listed.

is there something i can do about it. i did the installation three times now and it didn't change a thing.

all comments are welcome

greetz

TjAnNeHi,

seems you did not insta′ll the client components. If you have another edition than SQL Server Express

(because this does not come with any clients components, unless you install the SQL Server Express Advanced Edition, but as for the non.-Advanced edition you can download the Express Management Studio from here: http://msdn.microsoft.com/vstudio/express/sql/download/)

you can simply rerun the installer and select the client components as well. If this does not solve the problem, please provide some more details about the edition of SQL Server and the SP level.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

During the setup screen process you can choose custom installation and select 'entire feature to be installed on hard drive'. That takes care the installation of required components of tools.

Also explain the steps you are taking to install the tools in this case.

|||I've the developper edition 2005

in fact there're no clients to check

service pack 2

where can i find these

TjAnNE|||the problem is solved
i installed the client and everything works fine,

thx for the tip

TjAnNesql

Cant find SQL Server Management Studio

I can't find theSQL Server Management Studio anywhere. I've installed SQL server 2005 developer edition and choosed every component from the list but it isn't in the start->program->SQL server 2005 menu, there's only a couple of configuration managers.

Where can I find it, or am I missing something?

Copy all the files to your hard drive and rerun setup and choose repair to select all components management studio is under management tools. And I don't know what the configuration managers do but they are not related to management studio. Hope this helps.

|||

or, tryhttp://www.microsoft.com/downloads/details.aspx?familyid=57856CDD-DA9B-4AD0-9A8A-F193AE8410AD&displaylang=en#filelist

where I googled it. Seems as it doesn't install in some packages of SQLExpress.

hope this helps. - itagens

Can't find Report Builder

I've installed SQL Server 2005 Developer Edition along with Visual Studio 2005. The SQL management consol indicates that Reporting Services is running, but I can't seem to find the Report Builder for the life of me. Is it integrated into Visual Studio somewhere?Report Builder is a ClickOnce app that is installed and run from the web. If you go to the web interface for SSRS you should see a button towards the top of the web page that will launch Report Builder.sql

Thursday, March 22, 2012

Can't find PInvoke DLL 'sqlceme30.dll'.

Hi all,

i am creating one database file <name>.sdf using SQL CE in visual studio 2005 IDE, and its giving this error "Can't find PInvoke DLL 'sqlceme30.dll'." at run-time whenever i am initialising the the SqlCeEngine. what could be the problem ? i have already installed "sql.phone.wce5.armv4i.CAB" file on my emulator from path "C:\Program Files\Microsoft SQL Server Compact Edition\v3.1\SDK\bin\Client\v2.0\wce500\armv4i".

can anybody help me ?

Thanks

I am using the WM5 emulator for some development, and I have had the same problem

I first tried copying and installing the cabs from this folder with no success

C:\Program Files\Microsoft SQL Server Compact Edition\v3.1\SDK\bin\wce500\armv4i

I then copied all of the dll to the emulator \windows\system directory using the remote file viewer and this has got me going.

The development system, does not detect the dependencies.

They should fix this so that the proper files are all included

Can't find Business Intelligence Projects

I am learning Reporting Servcies. I installed Visual
Studio.NET 2003 and can't find 'Business Intelligence
Projects' when I click on 'New Project'. Can someone
please help?After installing VS you have to install RS. Consider RS to be an add in to
VS.
Bruce L-C
"Jenn" <anonymous@.discussions.microsoft.com> wrote in message
news:266701c49f4b$b33b7b80$a501280a@.phx.gbl...
> I am learning Reporting Servcies. I installed Visual
> Studio.NET 2003 and can't find 'Business Intelligence
> Projects' when I click on 'New Project'. Can someone
> please help?|||Microsoft Reporting Services(MSRS) requires that you have installed the MSRS
client. After doing so you should see Business Intelligence Projects in .Net
2003.
"Jenn" wrote:
> I am learning Reporting Servcies. I installed Visual
> Studio.NET 2003 and can't find 'Business Intelligence
> Projects' when I click on 'New Project'. Can someone
> please help?
>

Tuesday, March 20, 2012

Can't execute sp in vb.net

Hellou
I'm trying to execute simple sp with 5 input parmeters from vb.net. This sp works great when it is run from SQL Server management studio, but when I want to execute it from vb.net, I allways get this error:
"Syntax error, permission violation, or other nonspecific error"
Here's the code:

Cnn.Open("...")

Comm.ActiveConnection = Cnn

Comm.CommandType = ADODB.CommandTypeEnum.adCmdStoredProc

Comm.CommandText = "spSklVnos-Prenos" 'that's thename of the sp

RetParam.Direction = ADODB.ParameterDirectionEnum.adParamOutput

RetParam.Type = ADODB.DataTypeEnum.adInteger

Comm.Parameters.Append(RetParam)

P1.Direction = ADODB.ParameterDirectionEnum.adParamInput

P1.Type = ADODB.DataTypeEnum.adVarChar

P1.Size = 1

P1.Value = LocParA

Comm.Parameters.Append(P1)

P2.Direction = ADODB.ParameterDirectionEnum.adParamInput

P2.Type = ADODB.DataTypeEnum.adInteger

P2.Value = LocPar1

Comm.Parameters.Append(P2)

P3.Direction = ADODB.ParameterDirectionEnum.adParamInput

P3.Type = ADODB.DataTypeEnum.adInteger

P3.Value = LocPar2

Comm.Parameters.Append(P3)

P4.Direction = ADODB.ParameterDirectionEnum.adParamInput

P4.Type = ADODB.DataTypeEnum.adInteger

P4.Value = LocPar3

Comm.Parameters.Append(P4)

P5.Direction = ADODB.ParameterDirectionEnum.adParamInput

P5.Type = ADODB.DataTypeEnum.adInteger

P5.Value = PrevzemIDx

Comm.Parameters.Append(P5)

Comm.Execute()

Am I missing something?
Thanks for any suggestion.
Dido

Your syntax looks fine to me, but I'm not a VB.NET expert. Make sure your datatypes for the parameters match the stored procedure exactly. You might try asking this question on the VB forums, since it doesn't seem to be related to SSIS.

Cant enter user&password for Integration Services

I'm about to start using Integration Services in Mgmt Studio 2005.

But, when I try to register a server for Integration Services,
the option for choosing between Windows authentication and SQL Server
authentication is greyed out, and it's set to Windows.
My domain user is automatically filled in, but greyed out. I can't enter
my password since this field is also greyed out.
Is this some installation problem? (Connection to a Database Engine works fine.)SSIS doesn't support sql auth (at least not from SSMS). there is only windows auth.

SSAS is the same way.|||My next problem is that I can't make my domain account connect
without making it a member of the server's local Administrators group.

I read this article:

http://msdn2.microsoft.com/en-us/library/aa337083.aspx

which describes how to fix this. I gave my users all kind of rights
for the MsDtsServer component and restarted the Integration Services service on the server, but it doesn't help. What can be missing?|||I had to add my user to the Distributed DCOM Users group, and
the Users group had to get full access to the MsDtsServer component.
Now it works.

Monday, March 19, 2012

Can''t deploy managed assembly to Katmai

Hi!

When I create a managed assembly database project inside Visual Studio 2005 and want to change the database connection to a Katmai server, I get the following error message:

"This server version is not supported. You must have Microsoft SQL Server 2005 Beta 2 or later."

Is this a bug inside Katmai or Visual Studio 2005?

Thanks

Klaus Aschenbrenner

http://www.csharp.at

http://www.csharp.at/blog

Hi Klaus!

That is a bug/feature/something in the VS deployment project :-). You can either deploy manually or use my deployment project from inside VS.

Niels

Can''t deploy managed assembly to Katmai

Hi!

When I create a managed assembly database project inside Visual Studio 2005 and want to change the database connection to a Katmai server, I get the following error message:

"This server version is not supported. You must have Microsoft SQL Server 2005 Beta 2 or later."

Is this a bug inside Katmai or Visual Studio 2005?

Thanks

Klaus Aschenbrenner

http://www.csharp.at

http://www.csharp.at/blog

Hi Klaus!

It's a VS thing. You can either deploy manually, or use my deployment project from within VS to deploy.

Niels
|||

Hi Klaus,

This is a known issue with Visual Studio 2005 / 2008 beta. This will be fixed in a future release of Visual Studio.

As suggested by Neils, you can build your assembly through Visual Studio and deploy it using CREATE ASSEMBLY/CREATE FUNCTION statements from management studio.

Let me know if you need more information.

Thanks,

-Vineet

Wednesday, March 7, 2012

Can't create fulltextcatalogs

Hello
I have a strange problem. I'm trying to create some fulltext catalogs using
management studio 2005, and it works great. But on one table I have a
composite key (?) PRIMARY KEY(A,B), and when I rightclick table and pick
create new fulltext catalog and press next it says that no indexes are
avalible :(
Howto solve this? Mess with the table and set just A or B as primary key?
doesn't feel right to do that.
/Lassefull text indexes can't be created on composite keys. Create a unique index
on another column or add an identity column and create a unique index on
that column.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Lasse Edsvik" <lasse@.nospam.com> wrote in message
news:e%23O6ppAnGHA.964@.TK2MSFTNGP05.phx.gbl...
> Hello
> I have a strange problem. I'm trying to create some fulltext catalogs
> using
> management studio 2005, and it works great. But on one table I have a
> composite key (?) PRIMARY KEY(A,B), and when I rightclick table and pick
> create new fulltext catalog and press next it says that no indexes are
> avalible :(
> Howto solve this? Mess with the table and set just A or B as primary key?
> doesn't feel right to do that.
> /Lasse
>

Can't create databases in Management Studio

I seem to be having a number of problems using managment studio (MS) against my locally installed SQL 2005 Standard Edition. E.g. when I create a default database using MS it says...

TITLE: Microsoft SQL Server Management Studio

Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476


ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

The server could not load DCOM. (Microsoft SQL Server, Error: 7404)

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

However, the hyperlinks are less than helpful. I also get problems doing various maintance work from MS. I don't think its a database engine problem 'cause I can do all the work via TSQL DDL but the interface is so much easier to use (or should be). BTW it's running on XP Pro (firewall problem?).

I've also found an Event Log entry but don't know what it's asking me to enable...

Event Type: Error
Event Source: MSSQLSERVER
Event Category: (2)
Event ID: 17102
Date: 06/02/2006
Time: 20:12:06
User: N/A
Computer: TITAN
Description:
Failed to initialize Distributed COM (CoInitializeEx returned 80010119). Heterogeneous queries and remote procedure calls are disabled. Check the DCOM configuration using Component Services in Control Panel.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

|||

Finally sorted it out. It was the NVidia client to the motherboards Hardware Firewall that was causing the problem. I had to remove that to get IE7 working and now SQL Server is creating databases!

|||

I am getting all those exact same error messages when creating a database. My IE 7 is working just fine however. Can you tell me what you had to do to disable an nVidia motherboard hardware firewall thing? I've never heard of that, it sounds like it is worth a try at this point.

npack@.hotmail.com

|||Sure, you need to uninstall the nVidia firewall software.

Can't create databases in Management Studio

I seem to be having a number of problems using managment studio (MS) against my locally installed SQL 2005 Standard Edition. E.g. when I create a default database using MS it says...

TITLE: Microsoft SQL Server Management Studio

Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476


ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

The server could not load DCOM. (Microsoft SQL Server, Error: 7404)

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

However, the hyperlinks are less than helpful. I also get problems doing various maintance work from MS. I don't think its a database engine problem 'cause I can do all the work via TSQL DDL but the interface is so much easier to use (or should be). BTW it's running on XP Pro (firewall problem?).

I've also found an Event Log entry but don't know what it's asking me to enable...

Event Type: Error
Event Source: MSSQLSERVER
Event Category: (2)
Event ID: 17102
Date: 06/02/2006
Time: 20:12:06
User: N/A
Computer: TITAN
Description:
Failed to initialize Distributed COM (CoInitializeEx returned 80010119). Heterogeneous queries and remote procedure calls are disabled. Check the DCOM configuration using Component Services in Control Panel.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

|||

Finally sorted it out. It was the NVidia client to the motherboards Hardware Firewall that was causing the problem. I had to remove that to get IE7 working and now SQL Server is creating databases!

|||

I am getting all those exact same error messages when creating a database. My IE 7 is working just fine however. Can you tell me what you had to do to disable an nVidia motherboard hardware firewall thing? I've never heard of that, it sounds like it is worth a try at this point.

npack@.hotmail.com

|||Sure, you need to uninstall the nVidia firewall software.

Can't Create Asymmetric Key

I'm trying to get my first clr stored procedure going.
I believe I was able to create the clr stored procedure in visual studio,
set 'clr enabled' on the server, create an assembly, create an sp based on
the external name, and finally EXEC it from T-SQL to call it. When I call it
,
I get the System.Security.HostProtectionException below.
I read the documentation, and decided I needed to create an asymmetric key
to give myself permission to execute the clr stored procedure. I tried the
following in SS Management Studio:
CREATE ASYMMETRIC KEY SQLCLRTestKey FROM EXECUTABLE FILE =
'D:\ClrStoredProcedures\ClrStoredProcedu
res.dll'
This generates the following error:
Msg 15208, Level 16, State 1, Line 1
The certificate, asymmetric key, or private key file does not exist or has
invalid format.
Any suggestions on how to create the asymmetric key? The error seems to be
saying that I can't create the key because I don't already have one.
Thanks
--
Randy
Msg 6522, Level 16, State 1, Procedure sp_DotNetFunSProcPrint, Line 0
A .NET Framework error occurred during execution of user defined routine or
aggregate 'sp_DotNetFunSProcPrint':
System.Security.HostProtectionException: Attempted to perform an operation
that was forbidden by the CLR host.
The protected resources (only available with full trust) were: All
The demanded resources were: UI
System.Security.HostProtectionException:
at
System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm
,
PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh,
SecurityAction action, Object demand, IPermission permThatFailed)
at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object
assemblyOrString, PermissionSet granted, PermissionSet refused,
RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission
permThatFailed)
at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet
grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle
rmh, Object assemblyOrString, SecurityAction action, Boolean throwException)
at
System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs,
PermissionSet grants, PermissionSet refused, PermissionSet demands,
RuntimeMethodHandle rmh, Assembly asm, SecurityAction action)
at ClrStoredProcedures.TestClrStoredProcedure.PrintMessage(String Message)
.Hi Randy,
Welcome to use MSDN Managed Newsgroup Support.
From your description, my understanding is: you want to create a CLR stored
procedure and get the System.Security.HostProtectionException error.
If I misunderstood your concern, please feel free to point it out.
Based on my experience, the System.Security.HostProtectionException error
most related to your CLR code.
Please first try to follow the step in the SQL 2005 Books Online to create
a CLR stored procedure and deploy it to the database to check if this issue
is related to your code.
http://msdn2.microsoft.com/en-us/library/ms255336.aspx
If you can successfully deploy the stored procedure, would you please post
your CLR stored procedure here so that I could provide further assistance?
If you have installed Visual Studio 2005, you can create a SQL Server
Project and create a CLR stored procedure and then Deploy it to your
database. You may try this method to check if this issue appeared.
Sincerely,
Wei Lu
Microsoft Online Community Support
========================================
==========
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.|||Hello randy1200,

> I believe I was able to create the clr stored procedure in visual
> studio, set 'clr enabled' on the server, create an assembly, create an
> sp based on the external name, and finally EXEC it from T-SQL to call
> it. When I call it, I get the System.Security.HostProtectionException
> below.
Here's the URL for an article I wrote to help with this kind of thing. Its
the same idea the BOL covers, but in more tutorial fashion.
http://www.sqljunkies.com/WebLog/kt...op.com/ktegels/|||You first make a assembly using CREATE ASSEMBLY statement.
And your guery must modify FROM clause.
ASSEMBLY Assembly_Name
"randy1200"?? ??? ??:

> I'm trying to get my first clr stored procedure going.
> I believe I was able to create the clr stored procedure in visual studio,
> set 'clr enabled' on the server, create an assembly, create an sp based on
> the external name, and finally EXEC it from T-SQL to call it. When I call
it,
> I get the System.Security.HostProtectionException below.
> I read the documentation, and decided I needed to create an asymmetric key
> to give myself permission to execute the clr stored procedure. I tried the
> following in SS Management Studio:
> CREATE ASYMMETRIC KEY SQLCLRTestKey FROM EXECUTABLE FILE =
> 'D:\ClrStoredProcedures\ClrStoredProcedu
res.dll'
> This generates the following error:
> Msg 15208, Level 16, State 1, Line 1
> The certificate, asymmetric key, or private key file does not exist or has
> invalid format.
> Any suggestions on how to create the asymmetric key? The error seems to be
> saying that I can't create the key because I don't already have one.
> Thanks
> --
> Randy
>
> Msg 6522, Level 16, State 1, Procedure sp_DotNetFunSProcPrint, Line 0
> A .NET Framework error occurred during execution of user defined routine o
r
> aggregate 'sp_DotNetFunSProcPrint':
> System.Security.HostProtectionException: Attempted to perform an operation
> that was forbidden by the CLR host.
> The protected resources (only available with full trust) were: All
> The demanded resources were: UI
> System.Security.HostProtectionException:
> at
> System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly a
sm,
> PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh,
> SecurityAction action, Object demand, IPermission permThatFailed)
> at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Obje
ct
> assemblyOrString, PermissionSet granted, PermissionSet refused,
> RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission
> permThatFailed)
> at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSe
t
> grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle
> rmh, Object assemblyOrString, SecurityAction action, Boolean throwExceptio
n)
> at
> System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs
,
> PermissionSet grants, PermissionSet refused, PermissionSet demands,
> RuntimeMethodHandle rmh, Assembly asm, SecurityAction action)
> at ClrStoredProcedures.TestClrStoredProcedure.PrintMessage(String Messa
ge)
> .
>

Saturday, February 25, 2012

Can't create a new publication

Hi,
I'm trying to create a publication in a SQL Server 2005 server. I
right clicked on Replication tab in management studio and selected
'New Publication'. The management studio waits for a long time and
then nothing happens. It does not start any 'New Publication' wizard
nor does it report any error. Could you please let me know if there
are any server settings that need to be enabled before configuring
Publications.
Thanks and Regards,
Thyagu.D
Does anything appear in the sql server log, or the windows log? What happens
if you run sp_adddistributor and sp_adddistributiondb directly?
Cheers,
Paul Ibison
|||You probably have some locking going on from a previous replication process.
Issue calls to sp_who2 or select * from sysprocesses where blocked<>0 order
by waittime desc to see if you can see these processes and kill them.
You might also want to try to create they publication by using replication
stored procedures.
Try sp_replicationdboption 'MyDatabase', 'published', true for a start.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Thyagu" <tdelli@.gmail.com> wrote in message
news:1184566869.270526.315190@.e16g2000pri.googlegr oups.com...
> Hi,
> I'm trying to create a publication in a SQL Server 2005 server. I
> right clicked on Replication tab in management studio and selected
> 'New Publication'. The management studio waits for a long time and
> then nothing happens. It does not start any 'New Publication' wizard
> nor does it report any error. Could you please let me know if there
> are any server settings that need to be enabled before configuring
> Publications.
> Thanks and Regards,
> Thyagu.D
>
|||On Jul 16, 2:14 pm, Paul Ibison <Paul.Ibi...@.Pygmalion.Com> wrote:
> Does anything appear in the sql server log, or the windows log? What happens
> if you run sp_adddistributor and sp_adddistributiondb directly?
> Cheers,
> Paul Ibison
This worked. Thanks!
Regards,
Thyagu.D

Friday, February 24, 2012

Can't connect using sa login and don't have any other administrator logins

I connected successfully in SQL Server Management studio using the 'sa' login and changed the authentication mode to Windows NT because I could not connect using my windows login but now I can't get any connection at all because 'sa' is no longer trusted.

I changed the loginmode registry setting to 2 and rebooted my PC but this has made no difference.

Can anyone help me get the 'sa' login back?

Unless you explicitly removed the default privileges (members of sysadmin) to builtin\Administrators, you should be able to connect to SQL Server using a Windows account that is member of the machine administrator s group.

NOTE: If you are using Windows Vista, you probably have UAC enabled, and you will need to use a full administrator token before connecting to SQL Server in the way I described above. You can use the right-click menu in Windows to “Run as Administrator” in order to get an unrestricted token before connecting to SQL Server.

Let us know if this information helped.

-Raul Garcia

SDE/T

SQL Server Engine

|||

I am on Windows XP, the engine is SQL Server 2000 and I am using SQL Server 2005 Management Studio. The problem started when I upgraded the software we are developing to the latest version which I suspect may have removed the existing SQL Server logins which did have full rights. It also changed the login mode from Windows Authentication to System Administration. My big mistake was to change the mode back to Windows Authentication in SQL Server Management Studio before checking the other logins and it was then that the problems started. My windows username has administrative rights but I still couldn't connect to the server using windows login.

I tried just now changing the LoginMode in the registry back to 1 and starting windows again but I still can't log in with 'sa'. I did notice that the default user registry key is set to 'guest' but don't know if that makes any difference.

I think that I may have to resort to re-installing SQL Server 2005. I would prefer not to do that but It doesn't really matter if I lose my local database as I do have a copy of it elsewhere.

Can you think of any other solutions?

|||

Try switching the LoginMode value in the registry to 2 (if I remember correctly, 2 should mean "Mixed mode"), restart SQL Server and try to connect with the SA login again.

-Raul Garcia

SDE/T

SQL Server Engine

|||

Thanks, that worked perfectly.

FYI...

The reason it didn't work the first time is that I changed it in registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.2\MSSQLServer\LoginMode

which I assume is the key for SQL Server Management Studio 2005 but I didn't realise that there was another key, i.e.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\LoginMode

which would be for the SQL Server 2000 engine.

Anyway, I have learned my lesson now and am going to add my windows login.

Can't connect using management studio while using remote desktop connection on lan.

I get the error message:

An error has occurred while establishing a connection to the server.

When connecting to SQL Server 2005, this failure may be caused by the

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

connections.

I am not able to find this setting. Could someone please inform me of where to look and maybe what to do?

Thanks in advance.

Start/Programs/Microsoft SQL Server 2005/Configuration Tools/SQL Server Surface Area Configuration Manager/
Click Surface Area Configuration for Services and Connections
Click Database Engines / Remote connections
Select Local and Remote connections and one of the 3 choices below

also make sure the Allow Remote Connection to This Server option is checked on the
Server Properties/Connections page

|||

lkh wrote:

Start/Programs/Microsoft SQL Server 2005/Configuration Tools/SQL Server Surface Area Configuration Manager/
Click Surface Area Configuration for Services and Connections
Click Database Engines / Remote connections
Select Local and Remote connections and one of the 3 choices below

also make sure the Allow Remote Connection to This Server option is checked on the
Server Properties/Connections page

I have found the settings within the configuration tools up to the part where you mention the 3 choices below with success.

The part:
also make sure the Allow Remote Connection to This Server option is checked on the
Server Properties/Connections page

Is that from within the same configuration area or elsewhere?
Thanks so much.|||In Object Explorer in SQL Server Management Studio (SSMS) right click the server, click properties.|||

lkh wrote:

In Object Explorer in SQL Server Management Studio (SSMS) right click the server, click properties.

I'm sorry, there is nothing listed under object explorer pane. I see a default server under database engine in the registered servers pane.

Maybe because I haven't been able to connect yet? I'm not sure where else to look. I'm prolly goofed atm.

Maybe I'll have to do this the normal way and actually connect locally on that computer, then set that setting you mention.

I was hoping I could avoid having to do that, but I will if I have to.|||

right-click the default server, then click Connect/Object Explorer

SQL Server service also has to be started

|||Thanks so much for the help, the second part is already set to allow remote connections.
Turns out the problem I was having was due to my logging in as the second admin account on that pc. I could swear I installed it from that user account but it's acting like I can only connect to SQL via the original account on the pc.
Can't put my finger on it as it's been too long since the install.

Thanks for the help, all's good for now.|||Are you connecting with server\instance?

Sunday, February 19, 2012

Cant connect to SQL server at work from home project

HI All,

i have copied a project from work i am working on and have created the same project at home in visual studio.net - everything is the same as it is at my work - for some reason though i cannot connect to the servers from my home project

can anyone help me with this - i get the message "SQL Server does not exist or access denied"

my web config has exactly the same set up with a key in appSettings as

<add key="My_Connection" value="User ID=myID;Password=myPassword;Initial Catalog=myCatalog;Data Source=xx.xx.xx.xx" />

can anyone tell me why i would not be able to even see my work database from home?

thanks in advance

GilesbAre you trying to point to the databases that are at work or new ones that you have created at home?

If they are at home have you checked to ensure that all the correct logins have been recreated?

If you are pointing to databases at work then it is likely that you can't access from outside of the work network.|||Few things u need to check.
1) Is there a firewall protecting your "Work" LAN? If yes, ask your system administrator to open the SQL port in your firewall and be sure to ask your system administrator to set a rules to restrict for your IP address or connecting by VPN.
2) You ve to configure your connection through Client utility. Specify a server name and External network IP address. That will direct your application to call external IP address.|||Sounds like someone where you work might actually know what they're doing. You shouldn't be able to connect unless connected by VPN. If you can, then you have bigger problems then the fact you copied your work project to a home computer. If you have permissions to work from home, have the network admins grant you remote user access and set you up to use the VPN. If not, either work more hours at work, or explain to your bosses why you can't work from home.|||Thanks for your help guys but i dont think i would need a VPN to merely access a database just to "login" as it were - basically i have an asp.net project that runs fine when testing at work - servers are at work, but when i run it from home i cant get a connection - should be just like running the site from home and hooking in to the database right ?

I am fairly new to the database scene - will ask someone at wotk whether any special configuration is required

thanks once again to all that replied

Gilesb|||Okie, yes and at the same time a resounding no!

If your home computer were part of the work network then yes, it would be exactly the same but it is not. If you VPN in to the work network then yes, you would be part of the same network.

To put a sql server onto your network with open ports to the real world is asking for trouble (yeah, there are probably ways of making sure it is mostly secure, but only mostly...). I'd estimate 90% of SQL Servers are safely hidden behind firewalls to prevent anything other then the machines on the internal network connecting to it.

Cant connect to SQL Server 2005 in Visual Studio, only SQLExpress works?

Hi all,

I'm having a big problem here. I can't seem to connect to a database of MSSQL Server 2005... Here is what I've did:

1. Under the Server Explorer>Data Connections. Right click and choose "Add Connection..."

2. Data Source was "Microsoft SQL Server Database File". Click OK.

3. I browse to the database in the MSSQL.2/MSSQL/Data folder.

4. Click on the "Advanced" button, and change the default DataSource from .\SQLEXPRESS to .\MSSQLSERVER. Click OK

5. Received this error:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default setting SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 25 - Connection string is not valid)

Only .\SQEXPRESS that I was able to connect to... i've tried the solution from Microsoft, opened SQL Server 2005 Surface Area Configuration and enabled "Local and remote connections", checked the option "Using both TCP/IP and named pipes" but it didn't help. This is frustrating because I can't get the Membership provider, login to work on my host. Please help.


Thank you very much,

Kenny.

Hi Kenny,

xuanvu:

Click on the "Advanced" button, and change the default DataSource from .\SQLEXPRESS to .\MSSQLSERVER. Click OK

is there named instance MSSQLSERVER on your host/machine

xuanvu:

Data Source was "Microsoft SQL Server Database File". Click OK.

wondering what did you chose while creating connection for SQLExpress was it Sql Server Database file or SQL Server. could you try to use SQL Server option for .\MSSQLServer?

thanks,

satish.

|||

Yeap the problem lies in the SQL Server instance name... I was able to connect to the database now, but here is the problem that I've been battled for a whole week without success... Reading countless forum for a solution but none seems to work.

Here is the problem that I've posted: http://forums.asp.net/t/1131239.aspx

Thanks,

Kenny.

Can't connect to sql server 2005 database using vb 2005 express

I've used Sql Server 2000 and Visual Studio 2003 for a few years. I've started a new position and they have access to Sql Server 2005 Standard and Visual Basic 2005 Express which I'd like to use for a new project. So I installed Sql Server 2005 and then VB 2005 Express on my workstation. I didn't choose the Sql Server option for VB Express because I already had Sql Server 2005 Standard installed with a simple database created. I created a simple vb project that justs connects to the database but I get the following error.

Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0000, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

I looked at permissions in the database and it looks ok. I'm the db owner and I'm using Windows Auth. My connection string is

"Data Source=MySystem;initial catalog=AdventureWorks;integrated security=true;"

I thought I'd look at the starter kit to get some ideas about what the problem is, but when I started the movie starter kit project, it was upset that I didn't have Sql Server 2005 EXPRESS installed. Yea, but I do have Sql Server 2005 Standard installed.

Any help will be greatly appreciated. Thanks.

If you're using Vista, make sure you add your account into SQL Server explicitly. Also check the SQL Server Surface Area Configuration tool to ensure your server accepts remote connections. Then make sure the server is listening on all ports using SQL Server Configuration Manager. There's a great tutorial in Books Online for connecting to SQL Server you can use to walk you through it.

Buck Woody