Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. shanghai2004

    to know the space used for all user tables in all databases

    Dear Expert, By using stored procedure sp_spaceused, I created an sql script to list the spaces used by all tables in a particular database. Now my boss asks me to modify the script to a stored procedure so it can list the spaces used by all tables in any given database. I created a stored...
  2. shanghai2004

    old transaction logs backup was not removed

    Hi, Expert I have a database backup plan. It does all user databases backups and transaction logs backups. The databases full backups are scheduled at 11:30pm daily. The transaction logs backups are scheduled at 12:00pm daily. Both backup files older than 2 days will be removed. The databases...
  3. shanghai2004

    is it possible to change a database owner

    Dear Expert, Is it possible to change a database owner to sa? I created a new database by restoring from a database backup. The owner of the existing database is sa. But the owner of the new database is ATHENA\Administrator. (Here ATHENA is the server name). How do I make the new database to...
  4. shanghai2004

    should I create a db role first or db user first?

    Dear Export, After I created a new database, should I create a db role first or create a db user first? A Login for the db user exists already. Is there an easy way to copy users/roles from one database to another? Thanks
  5. shanghai2004

    can not start a job after the job was force stopped

    Dear Expert, The job execute a batch file below: ===================== osql -E -d tenrox_dev -n -b -i "c:\sama data\mssql\script files\tenrox\g_alter_user_sp.sql" echo Alter Stored Procedures(type User) completed ===================== Everything worked fine until I add two lines, date and...
  6. shanghai2004

    copy roles with their permissions from one db to another

    Dear Expert, Followed the instructions below I copied the user and roles from one database to another. But the permissions of the roles were not be copied over. Is there a way to copy the permissions of the roles over? Thanks ===================== In Enterprise Manager Right Click on your...
  7. shanghai2004

    copy views from one database to another in the same server

    Dear Expert, I need to copy all views from one database to another in the same SQL server. Can I create a SQL program to do it? If I pick all view names from sysobjects table, how do I avoid picking the system views? Thanks
  8. shanghai2004

    copy users and roles from one database to another in a SQL server

    Dear Expert, Is there a way to copy users and roles from one database to another (but not tables and views) in a SQL server? Thanks
  9. shanghai2004

    available free space in a job step command

    Dear Expert, I try to create a job for a query. I got an error message: The specified file is 4181 characters in size,which is larger than the available free space in the current job Step command(3200 characters). Do you want to continue opening this file but have its contents truncated. Is...
  10. shanghai2004

    What is the order in the data files exported from tables by BCP

    Dear Expert, I use BCP to export data from tables in one database and then import the data files to the same tables in another database with different collation. What is the row order in the data files exported from a table? Should the row order in destination table have the same order as in...
  11. shanghai2004

    how to compare to databases

    Dear Experts, With your help, I successfully used BCP to export data to files(csdata files) from all tables in a database(collation is case sensitive) and then import the csdata files to another database(collation is case insensitive). Now I need to verify that the data in both databases are...
  12. shanghai2004

    is there a limitation in BCP utility?

    Dear Expert, I use BCP to export data from tables in a database, then import the data files to the same tables in another database. I had trouble to import data to a table. The table definition is: CREATE TABLE [dbo].[TWORKFLOWMAPXMLDEF] ( [ORGANIZATIONID] [int] NOT NULL , [UNIQUEID] [int]...
  13. shanghai2004

    extra space lines in data file that exported from a table

    Dear Expert, I have a table created as following: CREATE TABLE [dbo].[TMAPDATA] ( [ORGANIZATIONID] [int] NOT NULL , [TABLENAME] [varchar] (32) COLLATE Latin1_General_CS_AS NOT NULL , [FIELDKEY] [varchar] (80) COLLATE Latin1_General_CS_AS NOT NULL , [LANGUAGE] [smallint] NOT NULL ...
  14. shanghai2004

    find unique indexes in tables

    Dear expert, I have to change a database collation from case sensitive to case insensitive. So I need to develop queries to find all potential duplicates in unique indexes and primary keys. A query to find all potential duplicates in primary keys is done (refer to sp_pkeys stored procedure). But...
  15. shanghai2004

    collations

    Dear Expert, What is the different between SQL_Latin1_General_Cp1_CI_AS and Latin1_General_CI_AS ? What does Cp1 represent for? Where do I find this kind information? I searched from SQL help, but I did not find the answer. Help please! Happy New Year
  16. shanghai2004

    how do I drop constraints from a table

    Dear Expert, I exported data from one database and need to import to another database (all tables are empty) using BCP utility. But some tables have foreign keys and it doesn't let me import. How do I drop those constraints and then put them on when import data is done? Thanks
  17. shanghai2004

    how to find field that is an identity for a table

    Dear Expert, Our company installed Tenrox(an application) to SQL server. The installer assumed the collation of the SQL server is case insensitive which is Tenrox required. But the SQL server was set as case sensitive. Now I need to fix this problem. Alter database and alter table statements...
  18. shanghai2004

    alter a database collate

    Hi Expert, My SQL server default collation is Latin1_General_CS_AS. Now I need to change a database collation to Lantin1_General_CS_AS. I execute the following SQL statements: ALTER DATABASE TESTDB collate Latin1_General_CI_AS I got error message: Server: Msg 5030, level 16, state 2, Line 1...
  19. shanghai2004

    reinstall SQL server 2000 from scratch

    Hi, My boss will wipe out everything from a server and start it from scratch. The operating system on the server is window 2000 server. I installed SQL server 2000 on the server; and applied PK3a and MS03-31 hotfix on it. My question is how do I bring the system back to the current stage after...
  20. shanghai2004

    how smart the hotfix can be

    Hi, I will apply MS03-031 hotfix to a SQL server. On the server the SQL system files are located in C: drive. The SQL data files are located in E: drive. When I apply hotfix to the SQL server, some system files and data files will be replaced. Will the hotfix be smart enough to know that the...

Part and Inventory Search

Back
Top