Showing posts with label object. Show all posts
Showing posts with label object. 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 SQL Server: SSIS Pipeline performance object in perfmon for 64-bit Server

I can't find 'SQL Server: SSIS Pipeline' performance object in performance monitor on a 64-bit SQL Server. I see it on a 32-bit. Does anybody know why?

Thanks

The 'SQL Server: SSIS Pipeline' performance objects in perfmon don't work in x64. They simply don't appear when viewed from either an x64 machine or a x86 machine.

However, if you login to the x64 machine locally and use the 32 bit version of perfmon (C\WINDOWS\SysWOW64\perfmon.exe), you can see them, but even that workaround is not very useful when you have a significant number of SSIS machines you'd like monitored.

Thursday, March 22, 2012

Cant find my UDF

Sometimes the simplest things are the most difficult... I'm creating a
UDF as below, then executing it but all I get is that the object does not exist. I must be missing something very basic here...

CREATE function dbo.GetColumnLength(@.vcTableName varchar(50), @.vcColumnName varchar(50)) returns smallint
as
begin
declare @.intLength as smallint
select @.intLength=sysC.prec from syscolumns sysC, sysobjects sysO
where sysC.Id = sysO.Id AND sysO.xtype ='U' And
sysO.Name = @.vcTableName AND
sysC.Name = @.vcColumnName
return @.intLength
End
GO
select top 2 * from player, dbo.GetColumnLength('playerdetails','email')Odd. Can you see the UDF in Enterprise Manager?|||select top 2 * from player, dbo.GetColumnLength('playerdetails','email')

Check the above statement.
I think it should be ...
select top 2 *,dbo.GetColumnLength('playerdetails','email') from player

And yes it just working fine ...
Joydeep|||Odd.

Odd?

Didn't you just answer this interview question a short while ago?

It's not retuning a table so it can't be in the FROM clause, and in any event, what you're doing doesn't make much sense.

Just what is it you are trying to accomplish?|||What I meant was, "Odd" that I didn't notice he had the function in his WHERE clause... :)

Still odd that he would recieve an error stating that the object doesn't exist...

Maybe what he wants is this:
select top 2 *, dbo.GetColumnLength('playerdetails','email') from player|||Thanks... I know I was tired at work today, but this mistake was just too much ;-)|||The code I posted was just an example, it's not the final UDF. It was simply just the only UDF code I had at hand.

Just as a principle, I should be able to have a UDF call in the table list, shouldn't I ?|||Yes, if the UDF returns a table rather than a scalar result.

can't find maintenance plan wizard in MSS2005

Hello,
I use sql server 2005 standard edition, sp1 installed on win2003server.
I can't find the maintenance plan wizard in the object explorer in the
management-studio.
In documentation I found out, that the user connection must be done via
windows authentication and you have to
be a role-member of sysadmin (what does this mean exactly?).
Furthermore databases must have a compatibility of 80 (MSS2000) or
higher.
I met all conditions, but I still can't use the wizard.
Any ideas how to make the wizard 'visible' or is there a command line
statement to call it?
Thanks for any help!In SSMS open Management and right click on Maintenance Plans. The
second options is the manitenance plan wizard.
Markus|||MarkusB wrote:
> In SSMS open Management and right click on Maintenance Plans. The
> second options is the manitenance plan wizard.
> Markus
Already the item 'Maintenance Plans' under Management is missing !!!
Only under the subitem Legacy there is a item 'Database Maintenance
Plans'.
But rightclicking there doesn't show the wizard-item.
anymore ideas?|||keltchen wrote on 7 Aug 2006 03:58:42 -0700:

> MarkusB wrote:
> Already the item 'Maintenance Plans' under Management is missing !!!
> Only under the subitem Legacy there is a item 'Database Maintenance
> Plans'.
> But rightclicking there doesn't show the wizard-item.
> anymore ideas?
You did what I did - didn't install SQL Server Integration Services. The
Maintenance Plan Wizard (and the interface to plans from SMSS) is part of
SSIS. Install SSIS from the SQL Server CD and you should get it working.
Dan

can't find maintenance plan wizard in MSS2005

Hello,
I use sql server 2005 standard edition, sp1 installed on win2003server.
I can't find the maintenance plan wizard in the object explorer in the
management-studio.
In documentation I found out, that the user connection must be done via
windows authentication and you have to
be a role-member of sysadmin (what does this mean exactly?).
Furthermore databases must have a compatibility of 80 (MSS2000) or
higher.
I met all conditions, but I still can't use the wizard.
Any ideas how to make the wizard 'visible' or is there a command line
statement to call it?
Thanks for any help!In SSMS open Management and right click on Maintenance Plans. The
second options is the manitenance plan wizard.
Markus|||MarkusB wrote:
> In SSMS open Management and right click on Maintenance Plans. The
> second options is the manitenance plan wizard.
> Markus
Already the item 'Maintenance Plans' under Management is missing !!!
Only under the subitem Legacy there is a item 'Database Maintenance
Plans'.
But rightclicking there doesn't show the wizard-item.
anymore ideas?|||keltchen wrote on 7 Aug 2006 03:58:42 -0700:
> MarkusB wrote:
>> In SSMS open Management and right click on Maintenance Plans. The
>> second options is the manitenance plan wizard.
>> Markus
> Already the item 'Maintenance Plans' under Management is missing !!!
> Only under the subitem Legacy there is a item 'Database Maintenance
> Plans'.
> But rightclicking there doesn't show the wizard-item.
> anymore ideas?
You did what I did - didn't install SQL Server Integration Services. The
Maintenance Plan Wizard (and the interface to plans from SMSS) is part of
SSIS. Install SSIS from the SQL Server CD and you should get it working.
Dan

Sunday, March 11, 2012

Cant delete user table

I have 4 user tables that show up in Enterprise Manager as SYSTEM tables.
The type and xtype in sysobjects are both U. They show up in object browser
under user tables. When I try to delete them I get the following message:
You tried to delete one or more system objects. They were not deleted.
Anyone have any ideas as to what is going on here and how I can delete these?
Can you mention the name of these tables?
Thanks
GYK
"Lyle" wrote:

> I have 4 user tables that show up in Enterprise Manager as SYSTEM tables.
> The type and xtype in sysobjects are both U. They show up in object browser
> under user tables. When I try to delete them I get the following message:
> You tried to delete one or more system objects. They were not deleted.
> Anyone have any ideas as to what is going on here and how I can delete these?
|||Yes, the table names are:
conflict_pubInvHist_Head_Det_Invoice_History_Detai l
conflict_pubInvHist_Head_Det_Invoice_History_Heade r
conflict_PubInvoice_Head_Det_Invoice_History_Detai l
conflict_PubInvoice_Head_Det_Invoice_History_Heade r
Lyle
"GYK" wrote:
[vbcol=seagreen]
> Can you mention the name of these tables?
> Thanks
> GYK
> "Lyle" wrote:
|||Yes, the table names are:
conflict_pubInvHist_Head_Det_Invoice_History_Detai l
conflict_pubInvHist_Head_Det_Invoice_History_Heade r
conflict_PubInvoice_Head_Det_Invoice_History_Detai l
conflict_PubInvoice_Head_Det_Invoice_History_Heade r
Lyle
"GYK" wrote:
[vbcol=seagreen]
> Can you mention the name of these tables?
> Thanks
> GYK
> "Lyle" wrote:
|||Yes, the table names are:
conflict_pubInvHist_Head_Det_Invoice_History_Detai l
conflict_pubInvHist_Head_Det_Invoice_History_Heade r
conflict_PubInvoice_Head_Det_Invoice_History_Detai l
conflict_PubInvoice_Head_Det_Invoice_History_Heade r
Lyle
"GYK" wrote:
[vbcol=seagreen]
> Can you mention the name of these tables?
> Thanks
> GYK
> "Lyle" wrote:

Cant delete user table

I have 4 user tables that show up in Enterprise Manager as SYSTEM tables.
The type and xtype in sysobjects are both U. They show up in object browser
under user tables. When I try to delete them I get the following message:
You tried to delete one or more system objects. They were not deleted.
Anyone have any ideas as to what is going on here and how I can delete these?Can you mention the name of these tables?
Thanks
GYK
"Lyle" wrote:
> I have 4 user tables that show up in Enterprise Manager as SYSTEM tables.
> The type and xtype in sysobjects are both U. They show up in object browser
> under user tables. When I try to delete them I get the following message:
> You tried to delete one or more system objects. They were not deleted.
> Anyone have any ideas as to what is going on here and how I can delete these?|||Yes, the table names are:
conflict_pubInvHist_Head_Det_Invoice_History_Detail
conflict_pubInvHist_Head_Det_Invoice_History_Header
conflict_PubInvoice_Head_Det_Invoice_History_Detail
conflict_PubInvoice_Head_Det_Invoice_History_Header
Lyle
"GYK" wrote:
> Can you mention the name of these tables?
> Thanks
> GYK
> "Lyle" wrote:
> > I have 4 user tables that show up in Enterprise Manager as SYSTEM tables.
> > The type and xtype in sysobjects are both U. They show up in object browser
> > under user tables. When I try to delete them I get the following message:
> >
> > You tried to delete one or more system objects. They were not deleted.
> >
> > Anyone have any ideas as to what is going on here and how I can delete these?|||Yes, the table names are:
conflict_pubInvHist_Head_Det_Invoice_History_Detail
conflict_pubInvHist_Head_Det_Invoice_History_Header
conflict_PubInvoice_Head_Det_Invoice_History_Detail
conflict_PubInvoice_Head_Det_Invoice_History_Header
Lyle
"GYK" wrote:
> Can you mention the name of these tables?
> Thanks
> GYK
> "Lyle" wrote:
> > I have 4 user tables that show up in Enterprise Manager as SYSTEM tables.
> > The type and xtype in sysobjects are both U. They show up in object browser
> > under user tables. When I try to delete them I get the following message:
> >
> > You tried to delete one or more system objects. They were not deleted.
> >
> > Anyone have any ideas as to what is going on here and how I can delete these?|||Yes, the table names are:
conflict_pubInvHist_Head_Det_Invoice_History_Detail
conflict_pubInvHist_Head_Det_Invoice_History_Header
conflict_PubInvoice_Head_Det_Invoice_History_Detail
conflict_PubInvoice_Head_Det_Invoice_History_Header
Lyle
"GYK" wrote:
> Can you mention the name of these tables?
> Thanks
> GYK
> "Lyle" wrote:
> > I have 4 user tables that show up in Enterprise Manager as SYSTEM tables.
> > The type and xtype in sysobjects are both U. They show up in object browser
> > under user tables. When I try to delete them I get the following message:
> >
> > You tried to delete one or more system objects. They were not deleted.
> >
> > Anyone have any ideas as to what is going on here and how I can delete these?

Cant delete user table

I have 4 user tables that show up in Enterprise Manager as SYSTEM tables.
The type and xtype in sysobjects are both U. They show up in object browser
under user tables. When I try to delete them I get the following message:
You tried to delete one or more system objects. They were not deleted.
Anyone have any ideas as to what is going on here and how I can delete these
?Can you mention the name of these tables?
Thanks
GYK
"Lyle" wrote:
[vbcol=seagreen]
> I have 4 user tables that show up in Enterprise Manager as SYSTEM tables.
> The type and xtype in sysobjects are both U. They show up in object brows
er
> under user tables. When I try to delete them I get the following message:
> You tried to delete one or more system objects. They were not deleted.
> Anyone have any ideas as to what is going on here and how I can delete these?[/vbc
ol]|||Yes, the table names are:
conflict_pubInvHist_Head_Det_Invoice_His
tory_Detail
conflict_pubInvHist_Head_Det_Invoice_His
tory_Header
conflict_PubInvoice_Head_Det_Invoice_His
tory_Detail
conflict_PubInvoice_Head_Det_Invoice_His
tory_Header
Lyle
"GYK" wrote:
[vbcol=seagreen]
> Can you mention the name of these tables?
> Thanks
> GYK
> "Lyle" wrote:
>|||Yes, the table names are:
conflict_pubInvHist_Head_Det_Invoice_His
tory_Detail
conflict_pubInvHist_Head_Det_Invoice_His
tory_Header
conflict_PubInvoice_Head_Det_Invoice_His
tory_Detail
conflict_PubInvoice_Head_Det_Invoice_His
tory_Header
Lyle
"GYK" wrote:
[vbcol=seagreen]
> Can you mention the name of these tables?
> Thanks
> GYK
> "Lyle" wrote:
>|||Yes, the table names are:
conflict_pubInvHist_Head_Det_Invoice_His
tory_Detail
conflict_pubInvHist_Head_Det_Invoice_His
tory_Header
conflict_PubInvoice_Head_Det_Invoice_His
tory_Detail
conflict_PubInvoice_Head_Det_Invoice_His
tory_Header
Lyle
"GYK" wrote:
[vbcol=seagreen]
> Can you mention the name of these tables?
> Thanks
> GYK
> "Lyle" wrote:
>

Wednesday, March 7, 2012

Cant create object using sp_OACreate

All, when trying to use the sp_oacreate by "EXEC @.hr = master.dbo.sp_OACreate 'FileSize.clsFileSize', @.object
OUT", I am having the following error being returned:
hr=0x80070008, source=ODSOLE Extended Procedure,
Description=Not enough storage is available to process
this command. This command works in a procedure most of
the time and when it starts occuring, the node is usually
failed over to resolve the problem. We are using Windows
2000 clustering, SQL 2000. TIA.Hello Lee,
Thank you for using MSDN Newsgroup!
From your description, I understand that when you use sp_oacreate to create
an instance of the OLE object, sometimes you will receive the error
message, but when this random issue is failed over, it can be resolved.
Have I fully understood you? If there is anything I misunderstood, please
feel free to let me know.
However, I need to mention that such an intermittent issue is complex to
troubleshoot in newsgroups. It's hard (even impossible) to reproduce it and
address its causes. So if the issue is urgent on your side, it is
recommended that you contact Microsoft Product Support Service (PSS) via:
http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS
Based on my experience, this issue may be caused by some unexpected
resources leak, especially a memory leak or something related to some
components on your side.
=================First of all, please read the following article to see if it makes sense:
198891 INF: Enabling DLL-Based COM Object Execution Outside SQL Server
http://support.microsoft.com/?id=198891
282229 FIX: SP_OA Procedures Leak Memory and Cause Various Errors
http://support.microsoft.com/?id=282229
=================Secondly, not having enough storage/memory available will also cause the
sp_OACreate failing with that error. In this case, we can try to increase
the memory space to make more memory available to non-SQL Server memory
consumers.
"-g" is an optional SQL Server startup parameter that can be used to
increase the size of the MemToLeave area. The default -g memory size is
128MB in SQL Server 7.0 and 256MB in SQL Server 2000. You can increase the
size of the MemToLeave area by an additional 128MB by adding -g256 (SQL
7.0) or -g384 (SQL 2000) as a server startup parameter. This setting will
take effect the next time the SQL Server service is started. Startup
parameters are added in the "General" tab of the Server Properties dialog
in Enterprise Manager.
=================Furthermore, I suggest you use VBScript to check if you can successfully
create the object. When the error occurs, do not fail it over and use the
VBScript to create the object. If it can be created, the problem may be
located in the server side. Otherwise, it may relate to some component
(such as the 'FileSize.clsFileSize').
I'm unsure of the root cause of this random issue and hope the provided
suggestion and information will be useful for your problem troubleshooting
or resolution production. If you have any concerns on this issue, please
feel free to let me know.
=================Last but not the least, for additional information about the way the Sp_OA
stored procedure is implemented, please reference the following article in
case you can work out the possible workaround:
180780 INF: How Sp_OA Procedures Extension to SQL Server Is Implemented
http://support.microsoft.com/?id=180780
Best regards,
Billy Yao
Microsoft Online Support|||Thank you for your comments. We are still having these
issues. I have created the VB to run the dll's method
outside of SQL during an incident. It proved that we could
in fact still call the dll, just not inside SQL using
sp_oacreate. Also other sp_oacreates did work fine, like
those calling the 'filesystemobject'.
Could it be that this particular dll is being held in SQL
memory and becomes corrupt? Then it does not work until it
is forced out of memory and reloaded, like on startup? We
are still searching for answers here.
-John
>--Original Message--
>Hello Lee,
>Thank you for using MSDN Newsgroup!
>From your description, I understand that when you use
sp_oacreate to create
>an instance of the OLE object, sometimes you will receive
the error
>message, but when this random issue is failed over, it
can be resolved.
>Have I fully understood you? If there is anything I
misunderstood, please
>feel free to let me know.
>However, I need to mention that such an intermittent
issue is complex to
>troubleshoot in newsgroups. It's hard (even impossible)
to reproduce it and
>address its causes. So if the issue is urgent on your
side, it is
>recommended that you contact Microsoft Product Support
Service (PSS) via:
>http://support.microsoft.com/default.aspx?scid=fh;EN-
US;CNTACTMS
>
>Based on my experience, this issue may be caused by some
unexpected
>resources leak, especially a memory leak or something
related to some
>components on your side.
>=================>First of all, please read the following article to see if
it makes sense:
>198891 INF: Enabling DLL-Based COM Object Execution
Outside SQL Server
>http://support.microsoft.com/?id=198891
>282229 FIX: SP_OA Procedures Leak Memory and Cause
Various Errors
>http://support.microsoft.com/?id=282229
>=================>Secondly, not having enough storage/memory available will
also cause the
>sp_OACreate failing with that error. In this case, we can
try to increase
>the memory space to make more memory available to non-SQL
Server memory
>consumers.
>"-g" is an optional SQL Server startup parameter that can
be used to
>increase the size of the MemToLeave area. The default -g
memory size is
>128MB in SQL Server 7.0 and 256MB in SQL Server 2000. You
can increase the
>size of the MemToLeave area by an additional 128MB by
adding -g256 (SQL
>7.0) or -g384 (SQL 2000) as a server startup parameter.
This setting will
>take effect the next time the SQL Server service is
started. Startup
>parameters are added in the "General" tab of the Server
Properties dialog
>in Enterprise Manager.
>=================>Furthermore, I suggest you use VBScript to check if you
can successfully
>create the object. When the error occurs, do not fail it
over and use the
>VBScript to create the object. If it can be created, the
problem may be
>located in the server side. Otherwise, it may relate to
some component
>(such as the 'FileSize.clsFileSize').
>I'm unsure of the root cause of this random issue and
hope the provided
>suggestion and information will be useful for your
problem troubleshooting
>or resolution production. If you have any concerns on
this issue, please
>feel free to let me know.
>=================>Last but not the least, for additional information about
the way the Sp_OA
>stored procedure is implemented, please reference the
following article in
>case you can work out the possible workaround:
>180780 INF: How Sp_OA Procedures Extension to SQL Server
Is Implemented
>http://support.microsoft.com/?id=180780
>
>Best regards,
>Billy Yao
>Microsoft Online Support
>.
>|||John,
Thank you for your update!
I have little idea on this radom issue. Does it always fail to call the
dll/component in SQL using sp_oacreate, and does it always succeed to call
in VB. It seems a memory leak occurs when you perform a sp_oacreate, and it
may also related to that 'FileSize.clsFileSize' I mentioned before.
Since you can use the VB to call the dll, I recommend you use that VB to
run the dll's mothod outside of SQL and then call the VB executable file in
SQL, which is an appropriate workaround you can try.
Let us see if this help solves your problem. If there is anything more I
can do to assist you, please feel free to post it in the group.
Best regards,
Billy Yao
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.

cant create object on sql server

When i try to deploy my project or the cube within it i first i get a message 'The server content appears out of date'

then in the error list it tells me 'user does not have permission to create object on [servername] or object does not exist.

Why is this?

Should i create a database first in sql managment studio with a particular name, the name of the project for example. I have tried different impersonation modes...

What login account does analysis services run under when it tries to connect to deploy?

Does it try to create an analysis services database?

Any advise or pointers would be greatly appreciated. Thanks alot.

Jules

The project deployment in BI Dev Studio is happening under your account. You need to have administrative rights ( in many cases ) to deploy your project.

By default all local machine Administrators are also administrators of Analysis Server.

Check check your project properties to see which server you deploy your project to.

You can also open SQL Management studio to see the state your database after your deployed it to Analysis Server.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

Sunday, February 12, 2012

Can't connect to linked SQL server: Cannot initialize the data source object of OLE DB provider

I find this most perplexing.

I have two servers, DEV and PROD. Now my DEV server works just great, I can connect to the linked server, query, etc... all is well.

So I'm setting up my PROD server and when I go to add the linked server I get:

Cannot initialize the data source object of OLE DB provider "SQLNCLI".... and Unable to complete login process due to delay in opening server connection.

Now I am running SQL Server 2005 and connecting to an SQL 2000 server.

The odd part is that this works just fine on DEV.

When I go to create the linked server I set:

Linked Server: "LinkedServerName"

Server Type: "SQL Server"

and that's it.

I go to Security and enter my DOMAIN\USER.ACCOUNT and then enter the login creds for the linked server.

When I click "OK" I get the above mentioned error code.

Any thoughts?

Please see if http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=990327&SiteID=1 could be useful for you.|||

Thanks, I'll check that out.

This whole thing is very odd as I even saved the working LinkedServer as TSQL script then executed it on the PROD server and with the EXACT same information for the linked server it fails to work.

I'll read up on the link you provided and keep my fingers crossed.

No in my case I'm not having an issue with impersonation. The credentials are all configured the same on both servers, yet my DEV server works while PROD fails...

Here is the error message I receive when I try to test the linked server connection:

"The test connection to the linked server failed."

Cannot initialize the data source object of OLE DB provider "SQLNCLI" for linked server "MaxersServer".
OLE DB provider "SQLNCLI" for linked server "MaxersServer" returned message "Unable to complete login process due to delay in opening server connection". (.Net SqlClient Data Provider)