How to change collation at Database level

Hi ,
I need to change one of my  database collation . Actually the server collation and database collation is differently . I dont want to change server level collation. I want to change only database collation . Please let me know the various methods are
available for this activity. Please suggest me how to proceed ..........
Thanks in advance ....... :)
Regards
Pradeep

Hi Eeland,
Yes .... you are absolutely correct . Actually this is production server also . Before going to implement i need to prepare a document , what are  the steps i will follow. If you have free time  ...... please help me.
Regards
Pradeep
You can use script as below
DECLARE @Query varchar(max)
SELECT @Query = COALESCE(@Query + ';','') + 'ALTER TABLE ' + TABLE_NAME + ' ALTER COLUMN ' + COLUMN_NAME + ' ' + DATA_TYPE + '(' + CASE WHEN CHARACTER_MAXIMUM_LENGTH = -1 THEN 'max' ELSE (CAST(CHARACTER_MAXIMUM_LENGTH AS varchar(5)) END + ') ' + CASE WHEN IS_NULLABLE = 'YES' THEN ' NULL ' ELSE ' NOT NULL ' END + ' COLLATE <new collationname here>'
WHERE DATA_TYPE IN ('text','ntext','varchar','char','nvarchar','nchar')
PRINT (@QUERY)
--EXEC (@QUERY)
But I second Erlands suggestion. First see the generated code and checkk it carefully before applying to prod environment
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Similar Messages

  • How to change the transaction isolation level of a CMP?

    How to change the transaction isolation level of a CMP from SUN's Deployment Tool? So far I can't find any entry for this setting.

    Anuradha W wrote:
    That means, currently the only way tospecify the transaction level is through
    weblogic-ejb-jar.xml deployment descriptor?
    for WLS-generated code, yes.Somewhat related to this question, we have written a standalone testcase to reproduce this issue we have been having. Basically, the issue is that even though we configure the isolation level to a non-default one in the deployment descriptor, the connections returned by the datasource seem to be having the default (which is Read Committed). The DBMS is DB2.
    weblogic-ejb-jar.xml has the following set:
    <isolation-level>TransactionRepeatableRead</isolation-level>
    And we printed the isolation level of the connection returned from a method in the EJB, but the isolation level is still the default. I can share the code to reproduce the problem if you want to take a look at it. Please let me know how I can get that across to you.
    Thanks,
    AnuradhaIf you are using our JDBC driver for DB2, or can switch to it,
    just for a test, there is some debug I'd like from you.
    Joe

  • How to change host for database target?

    Hi 2All!
    We've just moved our production database to a new server.
    How to change hostname on this database target for continuing to collect information about this database without deleting or creating additional targets?
    EMGC 11gR1.
    Thanks!

    ..so agent was installed on new host ?
    or you now need to install the agent ?
    I don´t know a way to change hostname only new discovery credentials on host.
    *T                                                                                                                                                                                                                                                                                                                                   

  • How to Change SID at SAP level

    Hi Teachies
    I had backup and restored the development system by brtools,
    I want to change the SID at SAP level , i have to note to change SID at Databse level .
    What are the changes we need to do at SAP level.
    ENV : Solaries, oracle 10g , ECC
    Thank You
    Haroon

    A SID can´t be "changed", you will need to do a system copy according to
    http://service.sap.com/systemcopy
    Basically - install the system with a different SID and import the database backup.
    It´s not possible to change a SID after installation.
    Markus

  • How to change the default database charset to ISO8859-1?

    Hi all,
    I have created a table with a nvarchar field to store string, may i now how to change the default NLS charset to ISO88591 charset?
    Thanks in advance.
    chin.

    Thank you!
    I will try later!
    But,who can tell me more detail !
    thx

  • How to Change Crystal Report database name from visual basic code?

    Hi all,
    I have created a Crystal Report (CR)  with .NET VB. I also have developd some UDTs for that pusrpose and everything is OK.
    However I cannot use the same CR in another Company which has the same UDTs. I have not found how Connect to Company (in other words change the DB the report reads).
    Any Idea?
    Thanks,
    Vangelis
    Edited by: Vangelis Kanellopoulos on Jul 19, 2008 6:07 PM
    Edited by: Vangelis Kanellopoulos on Jul 20, 2008 10:27 AM
    Edited by: Vangelis Kanellopoulos on Jul 20, 2008 10:28 AM

    Hi Vangelis,
    Here's a simple VB class that has functions for setting the login details for the report and passing parameters.
    Option Strict Off
    Option Explicit On
    Public Class CrystalFunctions
        Enum ParamType As Integer
            Int
            Text
        End Enum
        Public Shared Sub SetCrystalLogin(ByVal sUser As String, ByVal sPassword As String, ByVal sServer As String, ByVal sCompanyDB As String, _
               ByRef oRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument)
            Dim oDB As CrystalDecisions.CrystalReports.Engine.Database = oRpt.Database
            Dim oTables As CrystalDecisions.CrystalReports.Engine.Tables = oDB.Tables
            Dim oLogonInfo As CrystalDecisions.Shared.TableLogOnInfo
            Dim oConnectInfo As CrystalDecisions.Shared.ConnectionInfo = New CrystalDecisions.Shared.ConnectionInfo()
            oConnectInfo.DatabaseName = sCompanyDB
            oConnectInfo.ServerName = sServer
            oConnectInfo.UserID = sUser
            oConnectInfo.Password = sPassword
            ' Set the logon credentials for all tables
            For Each oTable As CrystalDecisions.CrystalReports.Engine.Table In oTables
                oLogonInfo = oTable.LogOnInfo
                oLogonInfo.ConnectionInfo = oConnectInfo
                oTable.ApplyLogOnInfo(oLogonInfo)
            Next
            ' Check for subreports
            Dim oSections As CrystalDecisions.CrystalReports.Engine.Sections
            Dim oSection As CrystalDecisions.CrystalReports.Engine.Section
            Dim oRptObjs As CrystalDecisions.CrystalReports.Engine.ReportObjects
            Dim oRptObj As CrystalDecisions.CrystalReports.Engine.ReportObject
            Dim oSubRptObj As CrystalDecisions.CrystalReports.Engine.SubreportObject
            Dim oSubRpt As New CrystalDecisions.CrystalReports.Engine.ReportDocument
            oSections = oRpt.ReportDefinition.Sections
            For Each oSection In oSections
                oRptObjs = oSection.ReportObjects
                For Each oRptObj In oRptObjs
                    If oRptObj.Kind = CrystalDecisions.Shared.ReportObjectKind.SubreportObject Then
                        ' This is a subreport so set the logon credentials for this report's tables
                        oSubRptObj = CType(oRptObj, CrystalDecisions.CrystalReports.Engine.SubreportObject)
                        ' Open the subreport
                        oSubRpt = oSubRptObj.OpenSubreport(oSubRptObj.SubreportName)
                        oDB = oSubRpt.Database
                        oTables = oDB.Tables
                        For Each oTable As CrystalDecisions.CrystalReports.Engine.Table In oTables
                            oLogonInfo = oTable.LogOnInfo
                            oLogonInfo.ConnectionInfo = oConnectInfo
                            oTable.ApplyLogOnInfo(oLogonInfo)
                        Next
                    End If
                Next
            Next
        End Sub
        Public Shared Sub SetCrystalParams(ByVal sFieldName As String, ByVal iDataType As ParamType, ByVal sVal As String, ByRef oRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument)
            Dim oFieldDefs As CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinitions
            Dim oFieldDef As CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinition
            Dim oParamVals As CrystalDecisions.Shared.ParameterValues
            Dim oDiscreteVal As CrystalDecisions.Shared.ParameterDiscreteValue
            oFieldDefs = oRpt.DataDefinition.ParameterFields
            oFieldDef = oFieldDefs(sFieldName)
            oParamVals = oFieldDef.CurrentValues
            oParamVals.Clear()
            oDiscreteVal = New CrystalDecisions.Shared.ParameterDiscreteValue()
            Select Case iDataType
                Case ParamType.Int
                    oDiscreteVal.Value = System.Convert.ToInt32(sVal)
                Case ParamType.Text
                    oDiscreteVal.Value = sVal
            End Select
            oParamVals.Add(oDiscreteVal)
            oFieldDef.ApplyCurrentValues(oParamVals)
        End Sub
    End Class
    And here's how you would use them:
    ' Create an instance of the Crystal report
    _rptCrystal = New CrystalDecisions.CrystalReports.Engine.ReportDocument()
    _rptCrystal.Load(_oSBO.AddonPath + "\Reports\MyReport.rpt")
    ' Call SetCrystalLogin to see the logon information for all report tables
    CrystalFunctions.SetCrystalLogin(sUser, sPassword, _oSBO.SboCompany.Server, _oSBO.SboCompany.CompanyDB, _rptCrystal)
    ' Set my report parameter value
    CrystalFunctions.SetCrystalParams("MyParam", CrystalFunctions.ParamType.Int, 999, _rptCrystal)
    ' Print the report straight to the printer                          
    _rptCrystal.PrintToPrinter(1, False, 0, 0)
    The other way to approach this solution would be to base your Crystal report on a .NET dataset rather than a database connection. However, as you've already written your report, the code above is going to be simpler to implement.
    Kind Regards,
    Owen

  • How to Change Appearance of "Top-Level" Wiki Server Pages?

    In Mountain Lion Server t is easy enough to change the appearance of our Wikis, Personal pages and their attached blogs - simply by going to "Wiki Settings...->Appearance" or "My Settings...->Appearance". This allows us to change the background pattern on pages, add a custom texture to headers, and select from a handful of preset colour schemes.
    It would be nice to have that level of control over the appearance of all the pages in my Wiki, but there seem to be a handful of default, top-level pages in the wiki whose appearance cannot be easily controlled anywhere. These include the "Home" Page, the "All Activity", "All Wikis" and "All People" pages.
    Is there a way to change the background and apply different colour schemes to these pages, too?

    Tom
    Anything is possible in the portal, however, out of the box functionality will not let you do this. Therefore you would have to create your own method of doing this.
    What you could do, would be to have some form of UI that would allow the users to see what TLN entries they have, and let them arrange it however they choose. This information could potentially be stored in the /userhome folder in KM for their preferences. Then, have your own TLN iview, which retrieves the navigation entries from the navigation service, and then retrieve the personalised order from the configuration in the /userhome folder.
    It simply depends on how much development expertise you have, and how much time and effort you wish to spend on this.
    I hope this gives some kind of ideas
    D

  • How to change value in database using oracle form

    - i have a table called mobilephone with quantity column
    - i already created a list of quantity inside my form with elements 1-5
    - what i want is when i press a button inside my form it will automatically deduct the value i chose from list to the database
    - for example if my quantity inside the table is 10, when i chose 2 in the list it will become 8 in the table

    Hi,
    I agree with Roel, but it might not be enough for you. This depends on the usage, and more specifically the number of concurrent users that might do the same kind of transactions.
    If user1 has selected 5 phones, and at the same time user2 has selected 6 phones, then only at the moment they hit the "Apply Changes" or "Create" button, will they know whether they the number of phones they require are actually available.
    If this scenario is highly unlikely to occur, I would go with the trigger as Roel indicated. If it is likely to occur, you might want to consider using Javascript to immediately check the availability through a database function call. This will require some database changes, that I could elaborate on. But I will wait until you indicate that this is indeed what you need.
    Good Luck!
    Remco

  • How to change content repository database

    I'm migrating a test environment from a single-server to use a separate machine for the contentdb data. I can't find how to point the contentdb middle-tier application at the new database and install the contentdb schema.
    Can anyone give me some guidance?
    Stuart

    Thanks for the help.<br><br>
    The database I'm trying to run up against is v.10.2.0.1 (MS Windows). When I try to select it from the list on OID, I get the following message from OUI. "The database you have selected is not supported for the Content DB install. Please the database which is 10.1 or higher version."<br><br>
    I note in installation guide that "Oracle Content DB requires an Oracle Database version 10.2.0.2 or 10.1.0.5", but neither of these seems to be available for a windows platform. Our previous single-server implementation used a database v 10.1.0.2 which worked OK.<br><br>
    I note also in Re: How To Guide: for installing Content DB 10.2 on 3 hosts a comment that "Content DB will install against any 10.2.x database."<br><br>
    Right now I can't move ahead with installation of the new middle-tier instance. Any suggestions?<br><br>
    kind regards<br>
    Stuart

  • How to change NLS_NUMERIC_CHARACTERS parameter for OWB SQLLDR mapping

    Hi,
    How to change the NLS_NUMERIC_CHARACTERS database paramater for my SQLLDR mapping?
    I have an input flat file which has numeric data with ',' as decimal separator means NLS_NUMERIC_CHARACTERS setting as ',.'
    However in my target oracle schema, the decimal separator is '.' which has NLS parameter set as NLS_NUMERIC_CHARACTERS='.,'
    My OWB version is 10.2.
    When I checked the configuration parameters of the sql loader mapping and the flat file operator, There is facility to change language, but not NLS_NUMERIC_CHARACTERS setting.
    I do not want to change the NLS_NUMERIC_CHARACTERS setting in my database as there are many other projects which will get impacted.
    We got a work around as below using external table & premap procedure. But as I have many mappings already developed, It is not possible to use this workaround.
    - I can use premapping procedure with external tables to populate.
    - NLS_NUMERIC_CHARACTERS setting can be changed using procedure for that particular session.
    Is there a way to change NLS_NUMERIC_CHARACTERS setting only for that particular mapping/mapping session?
    Thanks,
    SriGP

    At this moment , this is not possible . You can see metalink note ID 268906.1.
    It says:
    Currently, external tables always use the setting of NLS_NUMERIC_CHARACTERS
    +at the database level.+
    Cheers
    Marisol

  • How to change date format in OBIEE

    Hello
    I have a need to change the date column to a varchar column in OBIEE..
    The date column stores data in the format of 'YYYY/MM/DD', I need to change this to a varchar column with this format 'YYYYMM'..
    Since I am pointing directly at the transactional database, I can't make any changes at the database level, so I will have to do it in OBIEE layer, any ideas how it could be done?
    Many thanks in advance!

    hi user,
    Refer : http://varanasisaichand.blogspot.com/2010/01/how-to-change-data-format-to-our-custom.html
    http://varanasisaichand.blogspot.com/2010/05/evaluate-function.html
    Thanks,
    Saichand.v

  • Change default Calendar sharing level

    Hi.
    I'm trying to find a way of how to change the default sharing level of new users calenders. I have looked at the sharing policies but it seems to me that those are only for sharing outside the organization, at least I can't find a way of how to get these
    working inside the organization.
    Can anyone tell me if there is a way for me to set the default sharing level of all newly created users calenders automatically?
    Best
    Thomas

    Hi,
    By default, when we create a new user inside organization, Exchange will apply the default sharing policy to this new user automatically. We can check the default sharing policy by the following steps.
    Logon EAC, navigate to organization > sharing.
    Under Individual Sharing, select the default sharing a policy, and then click
    Edit.
    In sharing policy, check the box of Make this policy my default sharing policy.
    You can use the same way to edit the default sharing policy.
    Modify, disable, or remove a sharing policy
    https://technet.microsoft.com/en-us/library/jj657460%28v=exchg.150%29.aspx?f=255&MSPPError=-2147217396
    Apply a sharing policy to mailboxes
    https://technet.microsoft.com/en-us/library/jj657501(v=exchg.150).aspx
    Best Regards.

  • Database Level Tracing or Instance Level Tracing

    Hello,
    How do I know whether database level tracing or instance level tracing is enabled ? This is on 10g R2
    Thanks,
    R

    I amnot sure that I have heard about instance level tracing but normally tracing is enabled either through sql_trace parameter set in the parameter file or through some trace event. So you need to check your parameter file for any such setting.
    HTH
    Aman....

  • How to change the profile value in the pl/sql code without making change in the database

    How to change the profile value in the pl/sql code without making change in the database.

    I have program ,where if the profiles 'printer and nunber of copies ' are set at the user level, by default when the report completes the O/p will be sent to the printer mentioned in the set-up. but what user wants is
    if these Profiles are set for the user running this program automatic printing should not be done.

  • How to track any change at sharepoint site level

    Hi,
    I want to achieve is,
    create an event receiver or workflow for a SharePoint Site so that any change made @ site level or site collection level which in turn may include any change at any list,library, everything @ site/site collection level----a mail should get fired to a certain
    sharepoint group(Administrative).
    I found that  we can do this with "Change Log" but how?
    Is it a list or library or what else?
    How could i fire a mail when a new item gets added to it?

    As an aside, you're asking for SharePoint to send an email to your administrators every time for every change. Given the number of changes in a typical SharePoint farm, this approach can lead to your administrators being flooded with emails. Some mail transfer
    agents also have protections against this sort of activity and could drop mails to prevent your administrators from being spammed.
    You should consider this if you plan to use these mails for auditing purposes. Another approach would be to log these changes to a database to ensure you don't lose anything.
    SharePoint already has built-in auditing capabilities that you could leverage as well; most 3rd party SharePoint administrative suites include audit reporting.
    Jason Warren
    @jaspnwarren
    jasonwarren.ca
    habaneroconsulting.com/Insights

Maybe you are looking for

  • How can I stop Safari from opening new windows unless I want them?

    Since Safari 5.02, there is no box to check in the General Preferences to stop Safari from opening a new window when I click on a link. My expectation is to only go to a new window when I want to do it. Most of my searches go down a rabbit hole and I

  • Why does iPhoto convert my pics to low res?

    I use an elderly MacBook (November 2007 model) with the edition of iPhoto that came with the computer. When I take photos with my digital camera and import them into iPhoto for editing, it always lowers the resolution. My original files are 300 dpi w

  • SQL 2008 and 2014 side by side

    Hi I have 2008 std (instance DB-SERVER) and 2014 std (instance DB-SERVER\SQL2K14) on the same machine side by side. I am trying to configure tcp/ip for the 2014 to be able to access it remotely over LAN. In Configuration Manager for tcp/ip setup I ha

  • Spry Fly out menu

    Hi, I have Dreamweaver cs3 and creating a site with multiple frames. In one frame I want menu drop down list with click-able items to open in another frame. With limited space how do you get the menu drop down list flow over the other frame? I believ

  • Runtime report designing VS 2008

    Hi.. Can anybody please guide how to implement the requirement of end user report desiging in the our application exe using Crystal Reports 2008? Regards, Vibhuti