Is there any easy way to rename a SQL Server database?
I tried exporting to a new database but it's not transferring everything.
Thanks,
RyanWhat about sp_renamedb ? IF users are connected you should consider using
the
ALTER DATABASE <Nameofthedb> SET
SINGLE_USER with rollback immediate
sp_renamedb <Nameofthedb>,<NewNameofthedb>
ALTER DATABASE <DBNAME> Set MULTI_USER
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Ryan Langton" <langton@.ci.manhattan.ks.us> schrieb im Newsbeitrag
news:%23LaOUWLfFHA.1480@.TK2MSFTNGP10.phx.gbl...
> Is there any easy way to rename a SQL Server database?
> I tried exporting to a new database but it's not transferring everything.
> Thanks,
> Ryan
>|||sp_renamedb
Changes the name of a database.
Syntax
sp_renamedb [ @.dbname = ] 'old_name' ,
[ @.newname = ] 'new_name'
Examples
This example changes the name of the accounting database to financial.
EXEC sp_renamedb 'accounting', 'financial'
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Ryan Langton" <langton@.ci.manhattan.ks.us> wrote in message
news:%23LaOUWLfFHA.1480@.TK2MSFTNGP10.phx.gbl...
> Is there any easy way to rename a SQL Server database?
> I tried exporting to a new database but it's not transferring everything.
> Thanks,
> Ryan
>|||... and as of SQL server 2000, you can also rename a database using ALTER D
ATABASE.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> wrote in message
news:etm1rbLfFHA.3124@.TK2MSFTNGP12.phx.gbl...
> sp_renamedb
> Changes the name of a database.
> Syntax
> sp_renamedb [ @.dbname = ] 'old_name' ,
> [ @.newname = ] 'new_name'
>
> Examples
> This example changes the name of the accounting database to financial.
> EXEC sp_renamedb 'accounting', 'financial'
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
> www.experts-exchange.com - experts compete for points to answer your quest
ions
>
> "Ryan Langton" <langton@.ci.manhattan.ks.us> wrote in message
> news:%23LaOUWLfFHA.1480@.TK2MSFTNGP10.phx.gbl...
>|||Hi ,
SP_RENAMEDB is fine to rename a database. But as Tibor pointed out it is
always recommended to use the
ALTER DATABASE statement to rename a database in sql 2000.
How to remove connections
--
Alter database pubs set single_user with rollback IMMEDIATE
Rename the database
--
Alter database pubs modify name = pubs1
Set multi user
--
Alter database pubs1 set multi_user
Thanks
Hari
SQL Server MVP
"Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote in
message news:uv5EOZLfFHA.2472@.TK2MSFTNGP15.phx.gbl...
> What about sp_renamedb ? IF users are connected you should consider using
> the
> ALTER DATABASE <Nameofthedb> SET
> SINGLE_USER with rollback immediate
> sp_renamedb <Nameofthedb>,<NewNameofthedb>
> ALTER DATABASE <DBNAME> Set MULTI_USER
>
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "Ryan Langton" <langton@.ci.manhattan.ks.us> schrieb im Newsbeitrag
> news:%23LaOUWLfFHA.1480@.TK2MSFTNGP10.phx.gbl...
>sql
Showing posts with label exporting. Show all posts
Showing posts with label exporting. Show all posts
Wednesday, March 28, 2012
Renaming a Database
Is there any easy way to rename a SQL Server database?
I tried exporting to a new database but it's not transferring everything.
Thanks,
Ryan
What about sp_renamedb ? IF users are connected you should consider using
the
ALTER DATABASE <Nameofthedb> SET
SINGLE_USER with rollback immediate
sp_renamedb <Nameofthedb>,<NewNameofthedb>
ALTER DATABASE <DBNAME> Set MULTI_USER
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Ryan Langton" <langton@.ci.manhattan.ks.us> schrieb im Newsbeitrag
news:%23LaOUWLfFHA.1480@.TK2MSFTNGP10.phx.gbl...
> Is there any easy way to rename a SQL Server database?
> I tried exporting to a new database but it's not transferring everything.
> Thanks,
> Ryan
>
|||sp_renamedb
Changes the name of a database.
Syntax
sp_renamedb [ @.dbname = ] 'old_name' ,
[ @.newname = ] 'new_name'
Examples
This example changes the name of the accounting database to financial.
EXEC sp_renamedb 'accounting', 'financial'
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Ryan Langton" <langton@.ci.manhattan.ks.us> wrote in message
news:%23LaOUWLfFHA.1480@.TK2MSFTNGP10.phx.gbl...
> Is there any easy way to rename a SQL Server database?
> I tried exporting to a new database but it's not transferring everything.
> Thanks,
> Ryan
>
|||... and as of SQL server 2000, you can also rename a database using ALTER DATABASE.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> wrote in message
news:etm1rbLfFHA.3124@.TK2MSFTNGP12.phx.gbl...
> sp_renamedb
> Changes the name of a database.
> Syntax
> sp_renamedb [ @.dbname = ] 'old_name' ,
> [ @.newname = ] 'new_name'
>
> Examples
> This example changes the name of the accounting database to financial.
> EXEC sp_renamedb 'accounting', 'financial'
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
> www.experts-exchange.com - experts compete for points to answer your questions
>
> "Ryan Langton" <langton@.ci.manhattan.ks.us> wrote in message
> news:%23LaOUWLfFHA.1480@.TK2MSFTNGP10.phx.gbl...
>
|||Hi ,
SP_RENAMEDB is fine to rename a database. But as Tibor pointed out it is
always recommended to use the
ALTER DATABASE statement to rename a database in sql 2000.
How to remove connections
Alter database pubs set single_user with rollback IMMEDIATE
Rename the database
Alter database pubs modify name = pubs1
Set multi user
Alter database pubs1 set multi_user
Thanks
Hari
SQL Server MVP
"Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote in
message news:uv5EOZLfFHA.2472@.TK2MSFTNGP15.phx.gbl...
> What about sp_renamedb ? IF users are connected you should consider using
> the
> ALTER DATABASE <Nameofthedb> SET
> SINGLE_USER with rollback immediate
> sp_renamedb <Nameofthedb>,<NewNameofthedb>
> ALTER DATABASE <DBNAME> Set MULTI_USER
>
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "Ryan Langton" <langton@.ci.manhattan.ks.us> schrieb im Newsbeitrag
> news:%23LaOUWLfFHA.1480@.TK2MSFTNGP10.phx.gbl...
>
I tried exporting to a new database but it's not transferring everything.
Thanks,
Ryan
What about sp_renamedb ? IF users are connected you should consider using
the
ALTER DATABASE <Nameofthedb> SET
SINGLE_USER with rollback immediate
sp_renamedb <Nameofthedb>,<NewNameofthedb>
ALTER DATABASE <DBNAME> Set MULTI_USER
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Ryan Langton" <langton@.ci.manhattan.ks.us> schrieb im Newsbeitrag
news:%23LaOUWLfFHA.1480@.TK2MSFTNGP10.phx.gbl...
> Is there any easy way to rename a SQL Server database?
> I tried exporting to a new database but it's not transferring everything.
> Thanks,
> Ryan
>
|||sp_renamedb
Changes the name of a database.
Syntax
sp_renamedb [ @.dbname = ] 'old_name' ,
[ @.newname = ] 'new_name'
Examples
This example changes the name of the accounting database to financial.
EXEC sp_renamedb 'accounting', 'financial'
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Ryan Langton" <langton@.ci.manhattan.ks.us> wrote in message
news:%23LaOUWLfFHA.1480@.TK2MSFTNGP10.phx.gbl...
> Is there any easy way to rename a SQL Server database?
> I tried exporting to a new database but it's not transferring everything.
> Thanks,
> Ryan
>
|||... and as of SQL server 2000, you can also rename a database using ALTER DATABASE.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> wrote in message
news:etm1rbLfFHA.3124@.TK2MSFTNGP12.phx.gbl...
> sp_renamedb
> Changes the name of a database.
> Syntax
> sp_renamedb [ @.dbname = ] 'old_name' ,
> [ @.newname = ] 'new_name'
>
> Examples
> This example changes the name of the accounting database to financial.
> EXEC sp_renamedb 'accounting', 'financial'
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
> www.experts-exchange.com - experts compete for points to answer your questions
>
> "Ryan Langton" <langton@.ci.manhattan.ks.us> wrote in message
> news:%23LaOUWLfFHA.1480@.TK2MSFTNGP10.phx.gbl...
>
|||Hi ,
SP_RENAMEDB is fine to rename a database. But as Tibor pointed out it is
always recommended to use the
ALTER DATABASE statement to rename a database in sql 2000.
How to remove connections
Alter database pubs set single_user with rollback IMMEDIATE
Rename the database
Alter database pubs modify name = pubs1
Set multi user
Alter database pubs1 set multi_user
Thanks
Hari
SQL Server MVP
"Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote in
message news:uv5EOZLfFHA.2472@.TK2MSFTNGP15.phx.gbl...
> What about sp_renamedb ? IF users are connected you should consider using
> the
> ALTER DATABASE <Nameofthedb> SET
> SINGLE_USER with rollback immediate
> sp_renamedb <Nameofthedb>,<NewNameofthedb>
> ALTER DATABASE <DBNAME> Set MULTI_USER
>
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "Ryan Langton" <langton@.ci.manhattan.ks.us> schrieb im Newsbeitrag
> news:%23LaOUWLfFHA.1480@.TK2MSFTNGP10.phx.gbl...
>
Renaming a Database
Is there any easy way to rename a SQL Server database?
I tried exporting to a new database but it's not transferring everything.
Thanks,
RyanWhat about sp_renamedb ? IF users are connected you should consider using
the
ALTER DATABASE <Nameofthedb> SET
SINGLE_USER with rollback immediate
sp_renamedb <Nameofthedb>,<NewNameofthedb>
ALTER DATABASE <DBNAME> Set MULTI_USER
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"Ryan Langton" <langton@.ci.manhattan.ks.us> schrieb im Newsbeitrag
news:%23LaOUWLfFHA.1480@.TK2MSFTNGP10.phx.gbl...
> Is there any easy way to rename a SQL Server database?
> I tried exporting to a new database but it's not transferring everything.
> Thanks,
> Ryan
>|||sp_renamedb
Changes the name of a database.
Syntax
sp_renamedb [ @.dbname = ] 'old_name' ,
[ @.newname = ] 'new_name'
Examples
This example changes the name of the accounting database to financial.
EXEC sp_renamedb 'accounting', 'financial'
--
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Ryan Langton" <langton@.ci.manhattan.ks.us> wrote in message
news:%23LaOUWLfFHA.1480@.TK2MSFTNGP10.phx.gbl...
> Is there any easy way to rename a SQL Server database?
> I tried exporting to a new database but it's not transferring everything.
> Thanks,
> Ryan
>|||... and as of SQL server 2000, you can also rename a database using ALTER DATABASE.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> wrote in message
news:etm1rbLfFHA.3124@.TK2MSFTNGP12.phx.gbl...
> sp_renamedb
> Changes the name of a database.
> Syntax
> sp_renamedb [ @.dbname = ] 'old_name' ,
> [ @.newname = ] 'new_name'
>
> Examples
> This example changes the name of the accounting database to financial.
> EXEC sp_renamedb 'accounting', 'financial'
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
> www.experts-exchange.com - experts compete for points to answer your questions
>
> "Ryan Langton" <langton@.ci.manhattan.ks.us> wrote in message
> news:%23LaOUWLfFHA.1480@.TK2MSFTNGP10.phx.gbl...
>> Is there any easy way to rename a SQL Server database?
>> I tried exporting to a new database but it's not transferring everything.
>> Thanks,
>> Ryan
>|||Hi ,
SP_RENAMEDB is fine to rename a database. But as Tibor pointed out it is
always recommended to use the
ALTER DATABASE statement to rename a database in sql 2000.
How to remove connections
--
Alter database pubs set single_user with rollback IMMEDIATE
Rename the database
--
Alter database pubs modify name = pubs1
Set multi user
--
Alter database pubs1 set multi_user
Thanks
Hari
SQL Server MVP
"Jens Süßmeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote in
message news:uv5EOZLfFHA.2472@.TK2MSFTNGP15.phx.gbl...
> What about sp_renamedb ? IF users are connected you should consider using
> the
> ALTER DATABASE <Nameofthedb> SET
> SINGLE_USER with rollback immediate
> sp_renamedb <Nameofthedb>,<NewNameofthedb>
> ALTER DATABASE <DBNAME> Set MULTI_USER
>
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "Ryan Langton" <langton@.ci.manhattan.ks.us> schrieb im Newsbeitrag
> news:%23LaOUWLfFHA.1480@.TK2MSFTNGP10.phx.gbl...
>> Is there any easy way to rename a SQL Server database?
>> I tried exporting to a new database but it's not transferring everything.
>> Thanks,
>> Ryan
>
I tried exporting to a new database but it's not transferring everything.
Thanks,
RyanWhat about sp_renamedb ? IF users are connected you should consider using
the
ALTER DATABASE <Nameofthedb> SET
SINGLE_USER with rollback immediate
sp_renamedb <Nameofthedb>,<NewNameofthedb>
ALTER DATABASE <DBNAME> Set MULTI_USER
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"Ryan Langton" <langton@.ci.manhattan.ks.us> schrieb im Newsbeitrag
news:%23LaOUWLfFHA.1480@.TK2MSFTNGP10.phx.gbl...
> Is there any easy way to rename a SQL Server database?
> I tried exporting to a new database but it's not transferring everything.
> Thanks,
> Ryan
>|||sp_renamedb
Changes the name of a database.
Syntax
sp_renamedb [ @.dbname = ] 'old_name' ,
[ @.newname = ] 'new_name'
Examples
This example changes the name of the accounting database to financial.
EXEC sp_renamedb 'accounting', 'financial'
--
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Ryan Langton" <langton@.ci.manhattan.ks.us> wrote in message
news:%23LaOUWLfFHA.1480@.TK2MSFTNGP10.phx.gbl...
> Is there any easy way to rename a SQL Server database?
> I tried exporting to a new database but it's not transferring everything.
> Thanks,
> Ryan
>|||... and as of SQL server 2000, you can also rename a database using ALTER DATABASE.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> wrote in message
news:etm1rbLfFHA.3124@.TK2MSFTNGP12.phx.gbl...
> sp_renamedb
> Changes the name of a database.
> Syntax
> sp_renamedb [ @.dbname = ] 'old_name' ,
> [ @.newname = ] 'new_name'
>
> Examples
> This example changes the name of the accounting database to financial.
> EXEC sp_renamedb 'accounting', 'financial'
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
> www.experts-exchange.com - experts compete for points to answer your questions
>
> "Ryan Langton" <langton@.ci.manhattan.ks.us> wrote in message
> news:%23LaOUWLfFHA.1480@.TK2MSFTNGP10.phx.gbl...
>> Is there any easy way to rename a SQL Server database?
>> I tried exporting to a new database but it's not transferring everything.
>> Thanks,
>> Ryan
>|||Hi ,
SP_RENAMEDB is fine to rename a database. But as Tibor pointed out it is
always recommended to use the
ALTER DATABASE statement to rename a database in sql 2000.
How to remove connections
--
Alter database pubs set single_user with rollback IMMEDIATE
Rename the database
--
Alter database pubs modify name = pubs1
Set multi user
--
Alter database pubs1 set multi_user
Thanks
Hari
SQL Server MVP
"Jens Süßmeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote in
message news:uv5EOZLfFHA.2472@.TK2MSFTNGP15.phx.gbl...
> What about sp_renamedb ? IF users are connected you should consider using
> the
> ALTER DATABASE <Nameofthedb> SET
> SINGLE_USER with rollback immediate
> sp_renamedb <Nameofthedb>,<NewNameofthedb>
> ALTER DATABASE <DBNAME> Set MULTI_USER
>
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "Ryan Langton" <langton@.ci.manhattan.ks.us> schrieb im Newsbeitrag
> news:%23LaOUWLfFHA.1480@.TK2MSFTNGP10.phx.gbl...
>> Is there any easy way to rename a SQL Server database?
>> I tried exporting to a new database but it's not transferring everything.
>> Thanks,
>> Ryan
>
Wednesday, March 7, 2012
removing hyperlinks when exporting
Is there a way to have hyperlinks in the data be removed when exporting (to
excel or other formats), so that they are not available once exported?I have the same question so I'm bumping this one. I do not want hyperlinks in
the exported Excel, it is driving my users nuts!
Many thanks
kh
"Chriss G" wrote:
> Is there a way to have hyperlinks in the data be removed when exporting (to
> excel or other formats), so that they are not available once exported?
>
>
excel or other formats), so that they are not available once exported?I have the same question so I'm bumping this one. I do not want hyperlinks in
the exported Excel, it is driving my users nuts!
Many thanks
kh
"Chriss G" wrote:
> Is there a way to have hyperlinks in the data be removed when exporting (to
> excel or other formats), so that they are not available once exported?
>
>
Saturday, February 25, 2012
Removing Columns and/or Rows on Export
I have a Report I need to hide subtotals and total and include detail only when I am exporting to excel. So, is there a way to capture that it is exporting to Excel? Possibly a way to capture the rs:Format=Excel?
Hello,
I don't think you'll be able to do this, but you could always create a report parameter that would hold the RenderMethod. Then, you can change the formatting of your report based on this value to display how you want.
Jarret
|||True, but I was hoping I might be able to accomplish it without having to have a user go though the step of chosing, since they are already choosing to export to excel.|||YOu can′t change the output based on a different rendering format, as already mentioned you would have to make a parametrized report, discarding some fields in the case of a specific parameters OR design another report which has the wanted output format.
Jens K. Suessmeyer.
http://www.sqlserver2005.de
That was what I was affraid of, just wanted more experienced minds to confirm it for me.
Thanks for the help.
Subscribe to:
Posts (Atom)