Wednesday, March 21, 2012
Database error number 105
Database error number 105
[Macromedia][SQLServer JDBC Driver][SQLServer]Unclosed quotation mark before the character string 'kellyc'.
It almost seems as if somehow ColdFusion is introducing the problem. The server is MX, I similarly constructed Insert Statements that are working.
Here is the code...
From my Action Page...Its the first query that is failing.
<cftransaction action="begin">
<cftry>
<cfmodule template = "../queries/CaseMgmtQueries.cfm"
queryname = "AddCase"
CaseName = "#form.CaseName#"
Version = "#form.CaseVersion#"
Desc = "#form.CaseDescription#"
Start = "#form.CaseStartDate#"
End = "#form.CaseEndDate#">
<cfmodule template = "../queries/CaseMgmtQueries.cfm"
queryname = "qGetMaxCase"
CaseName = "#form.CaseName#">
<cfmodule template = "../queries/CaseMgmtQueries.cfm"
queryname = "AddCaseStatus"
CaseID = "#qGetMaxCase.NewCaseID#"
Status = "#form.CaseStatus#">
<cfset HaveError = False>
<cfcatch type="Database">
<cftransaction action="rollback">
<cfset HaveError = True>
<cf_dbErrorDisplay errno = #cfcatch.NativeErrorCode# detail = #cfcatch.Detail#>
</cfcatch>
</cftry>
</cftransaction>
And then from my queries page...
<cfif queryname is "AddCase">
<CFQUERY NAME="AddCase" DATASOURCE=#variables.DSN#>
Insert into CaseInfo
(CaseName, CaseDescription, CaseVersion, CaseStartDate, CaseEndDate)
Values ('#PreserveSingleQuotes(attributes.CaseName)#',
'#Attributes.Desc#',
'#Attributes.Version#',
'#Attributes.Start#',
'#Attributes.End#')
</CFQUERY>
</cfif>
This is producing a query that in the debug dump looks like...
Insert into CaseInfo
(CaseName, CaseDescription, CaseVersion, CaseStartDate, CaseEndDate)
Values ('kellyc', 'test', '1.1', '12/10/2003', '12/11/2003')
Which inserts correctly using Query Analyzer.
The main thing that is different about this insert from other inserts that are functioning in the program is the use of transactin processing.
Any help would be most appreciated!
KellyCKellyC,
I'm afraid I don't know a thing about ColdFusion, but here is what I would try: start up SQL Profiler and run a trace on your application. You can probably use the default settings for the trace unless it is a production server and in heavy use (in which case it's a pain to find the specific transaction you're looking for).
You can then identify the format of the T-SQL Statement (or SP) that is being used and test changes in your code to make corrections.
Regards,
hmscott|||i'm betting it's a coldfusion problem
see http://www.dbforums.com/showthread.php?threadid=974731
kelly, please don't cross-post
rudy|||Sorry Rudy,
I didn't realize it was bad form, since not everyone is subsribed to the same forums, and I don't really know if the problem is ColdFusion or SQL related at this point.
hmscott,
I have sent in a request to the DBA to try running the Profiler... I am now in the waiting zone. If it turns up something I will post that here.
Thanks for the suggestion.
KellyC|||Sorry for the crosspost again, but thought I would post my resolution here as well...
OK, as it often turns out, the problem is not always what it seems from the lovely and informative error messages. The unclosed quote was actually in the second query in the transaction. This came to light for me when I started playing with trying to submit a string with a single quote in it and noticed ColdFusion MX does not display the text of an unsucessful query in the debug. (Personally I consider this a deficiency of MX in case any Macromedia folks want my 2 cents).
So... long story short I realized it wasn't the insert query that was throwing the error and fixed the offending query and it now works like a charm.
Thanks again,
KellyC|||Nice of you to post the resolution. This is not meant to be an "I told you so," but it definitely points out an instance where SQL Profiler could have helped to narrow down the cause. Congrats for solving the problem.
Regards,
hmscott
database engine giving problems
i installed sql server 2005 but i am unable to connect to the database engine. An error message appears saying :
===================================
Cannot connect to mssqlserver.
===================================
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. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=53&LinkId=20476
Error Number: 53
Severity: 20
State: 0
Program Location:
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorer.ValidateConnection(UIConnectionInfo ci, IServerType server)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()
I am using win xp x64 edition
Hi,
sounds like the old proble, you either have a typo in your connectionstring / server name (and eventually port or instance name) or you have to enable remote connections to access your server.
http://www.sqlserver2005.de/SharedFiles/remoteconnection.jpg
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
Sunday, March 11, 2012
Database diagrams
I'm trying to view a SQL 2000 Diagram that was created by my colleage. When
I click on "Design Diagram" it appears blank (ie it does show any of the
table links). However if I create a diagram I can view that and my colleage I
can view the diagram that I've created and my colleage can also view it.
Any ideas.
TIA
Dwight
Dwight,
Did you apply Visual Studio Service Pack 6?
If so, this has happened to many people. I don't know if
there is a knowledge base article or supported fix for the
issue. Others have reported working around the issue by
installing an older version of mdt2df.dll
-Sue
On Mon, 10 Jan 2005 03:47:03 -0800, Dwight
<Dwight@.discussions.microsoft.com> wrote:
>Hi
>I'm trying to view a SQL 2000 Diagram that was created by my colleage. When
>I click on "Design Diagram" it appears blank (ie it does show any of the
>table links). However if I create a diagram I can view that and my colleage I
>can view the diagram that I've created and my colleage can also view it.
>Any ideas.
>TIA
>Dwight
|||Hi Sue,
Yes I have install VS SP6. I'll see if I can find an old version of
mdt2df.dll and reinstall it.
Thanks
"Sue Hoegemeier" wrote:
> Dwight,
> Did you apply Visual Studio Service Pack 6?
> If so, this has happened to many people. I don't know if
> there is a knowledge base article or supported fix for the
> issue. Others have reported working around the issue by
> installing an older version of mdt2df.dll
> -Sue
> On Mon, 10 Jan 2005 03:47:03 -0800, Dwight
> <Dwight@.discussions.microsoft.com> wrote:
>
>
Thursday, March 8, 2012
Database diagrams
I'm trying to view a SQL 2000 Diagram that was created by my colleage. When
I click on "Design Diagram" it appears blank (ie it does show any of the
table links). However if I create a diagram I can view that and my colleage
I
can view the diagram that I've created and my colleage can also view it.
Any ideas.
TIA
DwightDwight,
Did you apply Visual Studio Service Pack 6?
If so, this has happened to many people. I don't know if
there is a knowledge base article or supported fix for the
issue. Others have reported working around the issue by
installing an older version of mdt2df.dll
-Sue
On Mon, 10 Jan 2005 03:47:03 -0800, Dwight
<Dwight@.discussions.microsoft.com> wrote:
>Hi
>I'm trying to view a SQL 2000 Diagram that was created by my colleage. When
>I click on "Design Diagram" it appears blank (ie it does show any of the
>table links). However if I create a diagram I can view that and my colleage
I
>can view the diagram that I've created and my colleage can also view it.
>Any ideas.
>TIA
>Dwight|||Hi Sue,
Yes I have install VS SP6. I'll see if I can find an old version of
mdt2df.dll and reinstall it.
Thanks
"Sue Hoegemeier" wrote:
> Dwight,
> Did you apply Visual Studio Service Pack 6?
> If so, this has happened to many people. I don't know if
> there is a knowledge base article or supported fix for the
> issue. Others have reported working around the issue by
> installing an older version of mdt2df.dll
> -Sue
> On Mon, 10 Jan 2005 03:47:03 -0800, Dwight
> <Dwight@.discussions.microsoft.com> wrote:
>
>
Database diagrams
I'm trying to view a SQL 2000 Diagram that was created by my colleage. When
I click on "Design Diagram" it appears blank (ie it does show any of the
table links). However if I create a diagram I can view that and my colleage I
can view the diagram that I've created and my colleage can also view it.
Any ideas.
TIA
DwightDwight,
Did you apply Visual Studio Service Pack 6?
If so, this has happened to many people. I don't know if
there is a knowledge base article or supported fix for the
issue. Others have reported working around the issue by
installing an older version of mdt2df.dll
-Sue
On Mon, 10 Jan 2005 03:47:03 -0800, Dwight
<Dwight@.discussions.microsoft.com> wrote:
>Hi
>I'm trying to view a SQL 2000 Diagram that was created by my colleage. When
>I click on "Design Diagram" it appears blank (ie it does show any of the
>table links). However if I create a diagram I can view that and my colleage I
>can view the diagram that I've created and my colleage can also view it.
>Any ideas.
>TIA
>Dwight|||Hi Sue,
Yes I have install VS SP6. I'll see if I can find an old version of
mdt2df.dll and reinstall it.
Thanks
"Sue Hoegemeier" wrote:
> Dwight,
> Did you apply Visual Studio Service Pack 6?
> If so, this has happened to many people. I don't know if
> there is a knowledge base article or supported fix for the
> issue. Others have reported working around the issue by
> installing an older version of mdt2df.dll
> -Sue
> On Mon, 10 Jan 2005 03:47:03 -0800, Dwight
> <Dwight@.discussions.microsoft.com> wrote:
> >Hi
> >
> >I'm trying to view a SQL 2000 Diagram that was created by my colleage. When
> >I click on "Design Diagram" it appears blank (ie it does show any of the
> >table links). However if I create a diagram I can view that and my colleage I
> >can view the diagram that I've created and my colleage can also view it.
> >
> >Any ideas.
> >
> >TIA
> >Dwight
>
Database Diagram in MSSMSE
after creating database in MICROSOFT SQL SERVER MANAGEMNET STUDIO EXPRESS, when i right click on diagram node, a menu appears with these 2 options :
1- working with sql server diagrams
2- refresh
how can i make a new diagram unless there is no such thing there?
I do not have the management tools for express loaded but you should be able to do it. When you do go to the database and expand it there is a diagram node. When you first expand this the engine should ask you if you want it to create the objects. You select yes then you are able to right click and create a new diagram. The other option is to use visual stuido 2005 to work with the digrams.
database diagram
this mean and what should i do? tnx
This database does not have a valid dbo user or you do not have permissions
to impersonate the dbo user, so database diagramming is not available.
Ensure the dbo account is valid and ensure that you have impersonate
permission on the dbo account.
Message posted via http://www.droptable.com
when i executed sp_helpdb, i found out that the owner is incorrect. so, how
will i change it?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums.aspx/sql-server/200703/1
|||sp_changedbowner
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"yshie via droptable.com" <u32884@.uwe> wrote in message news:6fffe869c5ee4@.uwe...
> when i executed sp_helpdb, i found out that the owner is incorrect. so, how
> will i change it?
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums.aspx/sql-server/200703/1
>
|||exec sp_changedbowner 'login'
what will i put in the login name? computer name?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums.aspx/sql-server/200703/1
|||exec sp_changedbowner 'login'
what will i put in the login name? computer name?
another thing...
i remembered changing my computer name. and what i see in the dbo owner is
the previous computer name. so, how will i change it to current name?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums.aspx/sql-server/200703/1
|||It is documented in Books Online. Here is a quote (200 BOL):
New Information - SQL Server 2000 SP3.
Changes the owner of the current database.
Syntax
sp_changedbowner [ @.loginame = ] 'login'
[ , [ @.map = ] remap_alias_flag ]
Arguments
[@.loginame =] 'login'
Is the login ID of the new owner of the current database. login is sysname, with no default. login
must be an already existing Microsoft? SQL Server? login or Microsoft Windows NT? user. login cannot
become the owner of the current database if it already has access to the database through an
existing alias or user security account within the database. To avoid this, drop the alias or user
within the current database first.
[@.map =] remap_alias_flag
Is the value true or false, which indicates whether existing aliases to the old database owner (dbo)
are mapped to the new owner of the current database or dropped. remap_alias_flag is varchar(5), with
a default of NULL, indicating that any existing aliases to the old dbo are mapped to the new owner
of the current database. false indicates that existing aliases to the old database owner are
dropped.
Return Code Values
0 (success) or 1 (failure)
Remarks
After sp_changedbowner is executed, the new owner is known as the dbo user inside the database. The
dbo has implied permissions to perform all activities in the database.
The owner of the master, model, or tempdb system databases cannot be changed.
To display a list of the valid login values, execute the sp_helplogins stored procedure.
Executing sp_changedbowner with only the login parameter changes database ownership to login and
maps the aliases of users who were previously aliased to dbo to the new database owner.
Permissions
Only members of the sysadmin fixed server role can execute sp_changedbowner.
Examples
This example makes the user Albert the owner of the current database and maps existing aliases to
the old database owner to Albert.
EXEC sp_changedbowner 'Albert'
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"yshie via droptable.com" <u32884@.uwe> wrote in message news:700044dbf3878@.uwe...
> exec sp_changedbowner 'login'
> what will i put in the login name? computer name?
> another thing...
> i remembered changing my computer name. and what i see in the dbo owner is
> the previous computer name. so, how will i change it to current name?
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums.aspx/sql-server/200703/1
>
|||what is login? im sorry but im a newbie. i don't know what to put in 'login'.
pls explain it in the easiest way? i thought it was the computer name.
Message posted via http://www.droptable.com
|||A login is similar to what you login to windows with. But this is a SQL Server login. I suggest you
study below topic in Books Online:
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/5d43fefc-5aa4-43d7-aedb-7808659449c5.htm
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"yshie via droptable.com" <u32884@.uwe> wrote in message news:700cc635c361b@.uwe...
> what is login? im sorry but im a newbie. i don't know what to put in 'login'.
> pls explain it in the easiest way? i thought it was the computer name.
> --
> Message posted via http://www.droptable.com
>
|||how will i run that link? on internet browser? nothing happens. ty
Message posted via http://www.droptable.com
|||It is a link to be used in the documentation (SQL Server Books Online) that comes with SQL Server.
That documentation is also available as a separate download:
http://www.microsoft.com/downloads/details.aspx?FamilyId=BE6A2C5D-00DF-4220-B133-29C1E0B6585F&displaylang=en
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"yshie via droptable.com" <u32884@.uwe> wrote in message news:700e8fec996e3@.uwe...
> how will i run that link? on internet browser? nothing happens. ty
> --
> Message posted via http://www.droptable.com
>
database diagram
this mean and what should i do? tnx
This database does not have a valid dbo user or you do not have permissions
to impersonate the dbo user, so database diagramming is not available.
Ensure the dbo account is valid and ensure that you have impersonate
permission on the dbo account.
Message posted via http://www.droptable.comwhen i executed sp_helpdb, i found out that the owner is incorrect. so, how
will i change it?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200703/1|||sp_changedbowner
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"yshie via droptable.com" <u32884@.uwe> wrote in message news:6fffe869c5ee4@.uwe...green">
> when i executed sp_helpdb, i found out that the owner is incorrect. so, ho
w
> will i change it?
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200703/1
>|||exec sp_changedbowner 'login'
what will i put in the login name? computer name?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200703/1|||exec sp_changedbowner 'login'
what will i put in the login name? computer name?
another thing...
i remembered changing my computer name. and what i see in the dbo owner is
the previous computer name. so, how will i change it to current name?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200703/1|||It is documented in Books Online. Here is a quote (200 BOL):
New Information - SQL Server 2000 SP3.
Changes the owner of the current database.
Syntax
sp_changedbowner [ @.loginame = ] 'login'
[ , [ @.map = ] remap_alias_flag ]
Arguments
[@.loginame =] 'login'
Is the login ID of the new owner of the current database. login is sysname,
with no default. login
must be an already existing Microsoft? SQL Server? login or Microsoft Win
dows NT? user. login cannot
become the owner of the current database if it already has access to the dat
abase through an
existing alias or user security account within the database. To avoid this,
drop the alias or user
within the current database first.
[@.map =] remap_alias_flag
Is the value true or false, which indicates whether existing aliases to the
old database owner (dbo)
are mapped to the new owner of the current database or dropped. remap_alias_
flag is varchar(5), with
a default of NULL, indicating that any existing aliases to the old dbo are m
apped to the new owner
of the current database. false indicates that existing aliases to the old da
tabase owner are
dropped.
Return Code Values
0 (success) or 1 (failure)
Remarks
After sp_changedbowner is executed, the new owner is known as the dbo user i
nside the database. The
dbo has implied permissions to perform all activities in the database.
The owner of the master, model, or tempdb system databases cannot be changed
.
To display a list of the valid login values, execute the sp_helplogins store
d procedure.
Executing sp_changedbowner with only the login parameter changes database ow
nership to login and
maps the aliases of users who were previously aliased to dbo to the new data
base owner.
Permissions
Only members of the sysadmin fixed server role can execute sp_changedbowner.
Examples
This example makes the user Albert the owner of the current database and map
s existing aliases to
the old database owner to Albert.
EXEC sp_changedbowner 'Albert'
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"yshie via droptable.com" <u32884@.uwe> wrote in message news:700044dbf3878@.uwe...green">
> exec sp_changedbowner 'login'
> what will i put in the login name? computer name?
> another thing...
> i remembered changing my computer name. and what i see in the dbo owner is
> the previous computer name. so, how will i change it to current name?
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200703/1
>|||what is login? im sorry but im a newbie. i don't know what to put in 'login'
.
pls explain it in the easiest way? i thought it was the computer name.
Message posted via http://www.droptable.com|||A login is similar to what you login to windows with. But this is a SQL Serv
er login. I suggest you
study below topic in Books Online:
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/5d43fefc-5aa4-43d7-aedb-7808
659449c5.htm
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"yshie via droptable.com" <u32884@.uwe> wrote in message news:700cc635c361b@.uwe...green">
> what is login? im sorry but im a newbie. i don't know what to put in 'logi
n'.
> pls explain it in the easiest way? i thought it was the computer name.
> --
> Message posted via http://www.droptable.com
>|||how will i run that link? on internet browser? nothing happens. ty
Message posted via http://www.droptable.com|||It is a link to be used in the documentation (SQL Server Books Online) that
comes with SQL Server.
That documentation is also available as a separate download:
http://www.microsoft.com/downloads/...&displaylang=en
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"yshie via droptable.com" <u32884@.uwe> wrote in message news:700e8fec996e3@.uwe...green">
> how will i run that link? on internet browser? nothing happens. ty
> --
> Message posted via http://www.droptable.com
>
Wednesday, March 7, 2012
database diagram
this mean and what should i do? tnx
This database does not have a valid dbo user or you do not have permissions
to impersonate the dbo user, so database diagramming is not available.
Ensure the dbo account is valid and ensure that you have impersonate
permission on the dbo account.
--
Message posted via http://www.sqlmonster.comwhen i executed sp_helpdb, i found out that the owner is incorrect. so, how
will i change it?
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200703/1|||sp_changedbowner
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"yshie via SQLMonster.com" <u32884@.uwe> wrote in message news:6fffe869c5ee4@.uwe...
> when i executed sp_helpdb, i found out that the owner is incorrect. so, how
> will i change it?
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200703/1
>|||exec sp_changedbowner 'login'
what will i put in the login name? computer name?
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200703/1|||exec sp_changedbowner 'login'
what will i put in the login name? computer name?
another thing...
i remembered changing my computer name. and what i see in the dbo owner is
the previous computer name. so, how will i change it to current name?
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200703/1|||It is documented in Books Online. Here is a quote (200 BOL):
New Information - SQL Server 2000 SP3.
Changes the owner of the current database.
Syntax
sp_changedbowner [ @.loginame = ] 'login'
[ , [ @.map = ] remap_alias_flag ]
Arguments
[@.loginame =] 'login'
Is the login ID of the new owner of the current database. login is sysname, with no default. login
must be an already existing Microsoft® SQL Server� login or Microsoft Windows NT® user. login cannot
become the owner of the current database if it already has access to the database through an
existing alias or user security account within the database. To avoid this, drop the alias or user
within the current database first.
[@.map =] remap_alias_flag
Is the value true or false, which indicates whether existing aliases to the old database owner (dbo)
are mapped to the new owner of the current database or dropped. remap_alias_flag is varchar(5), with
a default of NULL, indicating that any existing aliases to the old dbo are mapped to the new owner
of the current database. false indicates that existing aliases to the old database owner are
dropped.
Return Code Values
0 (success) or 1 (failure)
Remarks
After sp_changedbowner is executed, the new owner is known as the dbo user inside the database. The
dbo has implied permissions to perform all activities in the database.
The owner of the master, model, or tempdb system databases cannot be changed.
To display a list of the valid login values, execute the sp_helplogins stored procedure.
Executing sp_changedbowner with only the login parameter changes database ownership to login and
maps the aliases of users who were previously aliased to dbo to the new database owner.
Permissions
Only members of the sysadmin fixed server role can execute sp_changedbowner.
Examples
This example makes the user Albert the owner of the current database and maps existing aliases to
the old database owner to Albert.
EXEC sp_changedbowner 'Albert'
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"yshie via SQLMonster.com" <u32884@.uwe> wrote in message news:700044dbf3878@.uwe...
> exec sp_changedbowner 'login'
> what will i put in the login name? computer name?
> another thing...
> i remembered changing my computer name. and what i see in the dbo owner is
> the previous computer name. so, how will i change it to current name?
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200703/1
>|||what is login? im sorry but im a newbie. i don't know what to put in 'login'.
pls explain it in the easiest way? i thought it was the computer name.
--
Message posted via http://www.sqlmonster.com|||A login is similar to what you login to windows with. But this is a SQL Server login. I suggest you
study below topic in Books Online:
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/5d43fefc-5aa4-43d7-aedb-7808659449c5.htm
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"yshie via SQLMonster.com" <u32884@.uwe> wrote in message news:700cc635c361b@.uwe...
> what is login? im sorry but im a newbie. i don't know what to put in 'login'.
> pls explain it in the easiest way? i thought it was the computer name.
> --
> Message posted via http://www.sqlmonster.com
>|||how will i run that link? on internet browser? nothing happens. ty
--
Message posted via http://www.sqlmonster.com|||It is a link to be used in the documentation (SQL Server Books Online) that comes with SQL Server.
That documentation is also available as a separate download:
http://www.microsoft.com/downloads/details.aspx?FamilyId=BE6A2C5D-00DF-4220-B133-29C1E0B6585F&displaylang=en
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"yshie via SQLMonster.com" <u32884@.uwe> wrote in message news:700e8fec996e3@.uwe...
> how will i run that link? on internet browser? nothing happens. ty
> --
> Message posted via http://www.sqlmonster.com
>|||ok, tnx! u know what i did? i change my computer name on its previous name.
now, database diagram works. how i wish no error will come up because of what
i did..
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200704/1