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 strongm 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

    Yes, I did set to remove both old database and transaction logs backups.
  3. 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...
  4. 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...
  5. 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
  6. 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...
  7. 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...
  8. shanghai2004

    copy views from one database to another in the same server

    Hi Denis, I think that 'run the script twice for the procs' does not solve my problem because there are drop procedure statements in the script. Also all the drop statements are executed before executing create procedures statements. If I do not drop a procedure will SQL lets me create a new...
  9. shanghai2004

    copy views from one database to another in the same server

    Hi Jim, Follow your instructions I copied Views successfully from one database to another. But when I tried to copy Stored Procedures I got many messages like the following: Cannot add rows to sysdepends for the current stored procedure because it depends on the missing object...
  10. 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
  11. 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
  12. 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...
  13. 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...
  14. 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...
  15. shanghai2004

    is there a limitation in BCP utility?

    Thanks expert. I use /r/n as row delimitor it solved my all problems in BCP import.
  16. shanghai2004

    is there a limitation in BCP utility?

    Thanks! I will follow your suggestions and do more test. There are two languages, English and French in Char. fields. If I keep the same code page ACP, some French letters are not converted correctly. I use RAW in import (it means no convention from one code page to another occurs during the...
  17. 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]...
  18. shanghai2004

    extra space lines in data file that exported from a table

    I don't know how to view data in Hex codes in DOS environment. But I did upload the data file to a HP mainframe. I used fcopy command to view the data in Hex code. There is no CR or LF but blanks for the extra rows. How comes there is no Hex codes for the extra rows? Anyway, I deleted the extra...
  19. 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 ...
  20. 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...

Part and Inventory Search

Back
Top